Closed kwankyu closed 3 years ago
json is recommended. I have no experience with serializing objects in json. Is it practically doable with any Sage object?
Branch pushed to git repo; I updated commit sha1. New commits:
2b03e24 | Abandon using pickle jar for doctesting |
As a few people expressed concerns using pickles for doctesting and there is no alternative practical way to store sage objects, I decided to abandon saved objects for speed up doctesting.
Now most doctests are tagged # long time
except the class level examples.
Branch pushed to git repo; I updated commit sha1. New commits:
7097dc7 | More refined "# long time" marked tests. |
I feel it is better to mark any long test as long rather than separate out the class-level tests. This also led to a test that took 8s to run on my machine not marked as long. I also removed the long marked things that weren't needed for me as per --warn-long
.
Something that we could consider doing is having a hidden @cached_function
that just creates all of the necessary objects and returns them as a tuple. Since testing in Sage does not reset the session after each block, the result is cached as we only need to pay the penalty once when running the file. We would only use this in the hidden attributes; especially for the ones that have trivial output such as _latex_
. Although perhaps there is a more trivial example that could be done for those?
Replying to @tscrim:
I feel it is better to mark any long test as long rather than separate out the class-level tests. This also led to a test that took 8s to run on my machine not marked as long. I also removed the long marked things that weren't needed for me as per
--warn-long
.
Okay.
Something that we could consider doing is having a hidden
@cached_function
that just creates all of the necessary objects and returns them as a tuple. Since testing in Sage does not reset the session after each block, the result is cached as we only need to pay the penalty once when running the file. We would only use this in the hidden attributes; especially for the ones that have trivial output such as_latex_
. Although perhaps there is a more trivial example that could be done for those?
This sounds not much different from what I did originally. Moreover I don't want to clutter the code only for testing things. I think we did enough for this ticket regarding doctesting.
Replying to @kwankyu:
Replying to @tscrim:
Something that we could consider doing is having a hidden
@cached_function
that just creates all of the necessary objects and returns them as a tuple. Since testing in Sage does not reset the session after each block, the result is cached as we only need to pay the penalty once when running the file. We would only use this in the hidden attributes; especially for the ones that have trivial output such as_latex_
. Although perhaps there is a more trivial example that could be done for those?This sounds not much different from what I did originally. Moreover I don't want to clutter the code only for testing things. I think we did enough for this ticket regarding doctesting.
The difference would be that it is created as part of the Sage session that is easily modified. However, I agree that the current state is sufficient (despite lacking a good solution). So we can set this to a positive review once the patchbot comes back green.
Replying to @tscrim:
The difference would be that it is created as part of the Sage session that is easily modified.
I now see your point. It is a clever idea.
However, I agree that the current state is sufficient (despite lacking a good solution).
I do too.
So we can set this to a positive review once the patchbot comes back green.
Okay. Thank you.
Replying to @kwankyu:
Replying to @tscrim:
The difference would be that it is created as part of the Sage session that is easily modified.
I now see your point. It is a clever idea.
However, I agree that the current state is sufficient (despite lacking a good solution).
I do too.
So we can set this to a positive review once the patchbot comes back green.
Okay. Thank you.
Green bot. I am guessing you don't want to switch, correct?
Replying to @tscrim:
Replying to @kwankyu:
Replying to @tscrim:
The difference would be that it is created as part of the Sage session that is easily modified.
I now see your point. It is a clever idea.
However, I agree that the current state is sufficient (despite lacking a good solution).
I do too.
So we can set this to a positive review once the patchbot comes back green.
Okay. Thank you.
Green bot. I am guessing you don't want to switch, correct?
Correct. No.
Changed branch from public/coding/ag-codes-27957 to 7097dc7
We add AG codes and unique decoders for AG codes.
In Attachments below, there are Jupyter notebooks demonstrating the new features provided by this ticket. These were presented in 2019 SIAM Conference on Algebraic Geometry.
The author was supported by NRF of Korea 2018, 2019, 2020
Component: coding theory
Author: Kwankyu Lee
Branch/Commit:
7097dc7
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/27957