-
-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade database_knotinfo to version 2024.2.1 #37014
Upgrade database_knotinfo to version 2024.2.1 #37014
Conversation
I can review this when ready. |
Very kind! In the meantime I've made some cross-checks with the new data. HOMFLY, Jones and Conway polynomials match the results calculated by Sage. With respect to Khovanov homology I compared with the computations of Khoca (because of performance reasons) using the PyPI version I created 2021 (note that this is not stable software, see LLewark/khoca#3). This cross-check found four differences for reduced homology in characteristic 2:
I will report this to Chuck Livingston. But maybe you can check independently that everthing is o.K. on the Sage side. |
I pushed the version of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am worried that you are doing something slightly strange with the control logic given the error messages. Empty strings versus something more clear like None
for invalid data seems better. If you think empty strings are best, then I think some more documentation is needed.
Also, I think we should deprecate the KhoHo
attribute. Although could there be a use for having it to select which database to use?
I'm not sure I understand your concern! The empty strings are used in the database when no value is specified for a knot or link. Such cases have increased in the new data for knots with 13 crossings, as not all properties can be easily calculated (as with the
The "KhoHo" attribute results in an |
Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
Okay, I understand, I didn't realize empty strings were used for unknown values in the database. It's a little strange that this isn't converted to, e.g., a
I would give a deprecation message (and then ignore the parameter) if the user passes it (for example; their code explicitly was passing the argument before the Sage update). That way we break less code and follow standard Sage practices. I also wasn't sure if the parameter was still useful or not in the upgraded version (as you said, it is not). |
Both tasks I've done in the current commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. One last little thing, then you can set a positive review, change the error messages to start with a lowercase letter (as we follow Python's convention).
Thanks, as well! |
Documentation preview for this PR (built with commit a36841b; changes) is ready! 🎉 |
<!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> The upgrade is necessary by two reasons: 1. Since version [2023.10.1](https://github.com/soehms/database_knotinfo /releases/tag/2023.10.1) knots with 13 crossings have been added to the database. The new data could not be used entirely, firstly because of missing adaptions on the Sage side and secondly because the HOMFLY-PT data has been incompatible on the KnotInfo side. The latter has been fixed in version 2024.1.1. 2. The old table columns `khovanov_polynomial` and `khovanov_polynomial_torsion` have been removed from the database for knots. Since these have been kept in Sage 10.1 for optional usage this breaks compatiblity with [2024.1.1](https://github.com/soehms/database_k notinfo/releases/tag/2024.1.1) completely. This PR restores compatibility with the current content of the database in both cases. Furthermore it adds `KnotInfo` and `KnotInfoSeries` to the global namespace, even in the case where only the demo part of the database is present. I made the former restriction because I unnecessarily feared this could affect the startup-time of Sage. Finally I changed a couple of inline doctest tags `# optional database_knotinfo` to according block-scoped tags. Note, that this causes 2 doctest-warnings: ``` ********************************************************************** File "src/sage/knots/link.py", line 4070, in sage.knots.link.Link.get_knotinfo Warning: Variable 'KnotInfo' referenced here was set only in doctest marked '# optional - database_knotinfo' K = KnotInfo.K10_25 ********************************************************************** File "src/sage/knots/link.py", line 4104, in sage.knots.link.Link.get_knotinfo Warning: Variable 'KnotInfo' referenced here was set only in doctest marked '# optional - database_knotinfo' L.get_knotinfo(mirror_version=False) == KnotInfo.K0_1 ``` But I think these warnings are baseless, since `KnotInfo` is in the global namespace. I guess this is a bug in doctest functionality. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#37014 Reported by: Sebastian Oehms Reviewer(s): Sebastian Oehms, Travis Scrimshaw
The upgrade is necessary by two reasons:
khovanov_polynomial
andkhovanov_polynomial_torsion
have been removed from the database for knots. Since these have been kept in Sage 10.1 for optional usage this breaks compatiblity with 2024.1.1 completely.This PR restores compatibility with the current content of the database in both cases.
Furthermore it adds
KnotInfo
andKnotInfoSeries
to the global namespace, even in the case where only the demo part of the database is present. I made the former restriction because I unnecessarily feared this could affect the startup-time of Sage.Finally I changed a couple of inline doctest tags
# optional database_knotinfo
to according block-scoped tags. Note, that this causes 2 doctest-warnings:But I think these warnings are baseless, since
KnotInfo
is in the global namespace. I guess this is a bug in doctest functionality.📝 Checklist
⌛ Dependencies