-
-
Notifications
You must be signed in to change notification settings - Fork 648
Fix broken KnotInfo URL #40553
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
base: develop
Are you sure you want to change the base?
Fix broken KnotInfo URL #40553
Conversation
Documentation preview for this PR (built with commit 1c469d8; changes) is ready! 🎉 |
src/sage/databases/knotinfo_db.py
Outdated
at the web-pages `KnotInfo <https://knotinfo.math.indiana.edu/>`__ and | ||
`LinkInfo <https://linkinfo.sitehost.iu.edu>`__. | ||
at the web-pages `KnotInfo <https://knotinfo.org/>`__ and | ||
`LinkInfo <https://https://link-info-repo.onrender.com/>`__. |
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.
copy/paste error (3 times at least)
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.
Thanks for reviewing! I've fixed it in the current commit.
@@ -317,17 +317,17 @@ def diagram_url(self, fname, single=False): | |||
sage: from sage.databases.knotinfo_db import KnotInfoDataBase | |||
sage: ki_db = KnotInfoDataBase() | |||
sage: ki_db.filename.knots.diagram_url('3_1-50.png') | |||
'https://knotinfo.math.indiana.edu/diagram_display.php?3_1-50.png' | |||
'https://knotinfo.org/diagram_display.php?3_1-50.png' |
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.
When I try this link, I get a page with
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/diagram_display.php:1) in /var/www/html/diagram_display.php on line 11
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.
Interesting! I checked
sage: KnotInfo.K3_1.diagram()
True
which launches the correct site: https://knotinfo.org/diagram_display.php?3_1
. The wrong URL is just used on invocation of KnotInfo.K3_1.diagram(single=True)
. I think these are just outdated doctest and maybe an outdated option in diagram
. I will check this later on. If this will lead to a deprecation of this option we should do that in a separate PR.
sage: ki_db.filename.knots.diagram_url('3_1', single=True) | ||
'https://knotinfo.math.indiana.edu/diagrams/3_1' | ||
'https://knotinfo.org/diagrams/3_1' |
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 get
Not Found
The requested URL was not found on this server.
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.
See the previous issue.
src/sage/knots/knotinfo.py
Outdated
@@ -1359,7 +1359,7 @@ def homfly_polynomial(self, var1='v', var2='z', original=False): | |||
|
|||
The HOMFLY-PT polynomial `P(L)` of a link `L` satisfies the following skein | |||
relation (see the corresponding `KnotInfo description page | |||
<https://knotinfo.math.indiana.edu/descriptions/jones_homfly_kauffman_description/polynomial_defn.html)>`__): | |||
<https://knotinfo.org/descriptions/jones_homfly_kauffman_description/polynomial_defn.html)>`__): |
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.
there is a )
at the end of the url to remove
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.
Fixed!
src/sage/knots/knotinfo.py
Outdated
@@ -1460,7 +1460,7 @@ def kauffman_polynomial(self, var1='a', var2='z', original=False): | |||
under regular isotopy `\Delta (L) = a^{w(L)} F(L)` where `w(L)` is the | |||
writhe of the link `L` satisfies the following skein relation | |||
(see the corresponding `KnotInfo description page | |||
<https://knotinfo.math.indiana.edu/descriptions/jones_homfly_kauffman_description/polynomial_defn.html)>`__): | |||
<https://knotinfo.org/descriptions/jones_homfly_kauffman_description/polynomial_defn.html)>`__): |
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.
remove )
at the end of url
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.
Fixed!
src/sage/knots/knotinfo.py
Outdated
@@ -1547,7 +1547,7 @@ def jones_polynomial(self, variab=None, skein_normalization=False, puiseux=False | |||
|
|||
The Jones polynomial `V(L)` of a link `L` satisfies the following skein | |||
relation (see the corresponding `KnotInfo description page | |||
<https://knotinfo.math.indiana.edu/descriptions/jones_homfly_kauffman_description/polynomial_defn.html)>`__): | |||
<https://knotinfo.org/descriptions/jones_homfly_kauffman_description/polynomial_defn.html)>`__): |
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.
remove )
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.
Fixed!
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.
ok, got for it.
LGTM.
Thanks a lot! |
<!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> The URL for KnotInfo currently specified in the Sage documentation (and used by some methods to launch description and image websites, such as `KnotInfo.K6_2.diagram()`) has been disabled. It doesn't even redirect to the [new page](https://knotinfo.org) on [render.com](https://render.com/). This PR implements the URL replacement and points Sage to the current [release 2025.8.7](https://github.com/soehms/database_knotinfo/releases/ tag/2025.8.7) of the Python wrapper. It would be great if this would be merged into 10.7! ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#40553 Reported by: Sebastian Oehms Reviewer(s): David Coudert, Sebastian Oehms
sagemathgh-40553: Fix broken KnotInfo URL <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> The URL for KnotInfo currently specified in the Sage documentation (and used by some methods to launch description and image websites, such as `KnotInfo.K6_2.diagram()`) has been disabled. It doesn't even redirect to the [new page](https://knotinfo.org) on [render.com](https://render.com/). This PR implements the URL replacement and points Sage to the current [release 2025.8.7](https://github.com/soehms/database_knotinfo/releases/ tag/2025.8.7) of the Python wrapper. It would be great if this would be merged into 10.7! ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#40553 Reported by: Sebastian Oehms Reviewer(s): David Coudert, Sebastian Oehms
sagemathgh-40553: Fix broken KnotInfo URL <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> The URL for KnotInfo currently specified in the Sage documentation (and used by some methods to launch description and image websites, such as `KnotInfo.K6_2.diagram()`) has been disabled. It doesn't even redirect to the [new page](https://knotinfo.org) on [render.com](https://render.com/). This PR implements the URL replacement and points Sage to the current [release 2025.8.7](https://github.com/soehms/database_knotinfo/releases/ tag/2025.8.7) of the Python wrapper. It would be great if this would be merged into 10.7! ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#40553 Reported by: Sebastian Oehms Reviewer(s): David Coudert, Sebastian Oehms
sagemathgh-40553: Fix broken KnotInfo URL <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> The URL for KnotInfo currently specified in the Sage documentation (and used by some methods to launch description and image websites, such as `KnotInfo.K6_2.diagram()`) has been disabled. It doesn't even redirect to the [new page](https://knotinfo.org) on [render.com](https://render.com/). This PR implements the URL replacement and points Sage to the current [release 2025.8.7](https://github.com/soehms/database_knotinfo/releases/ tag/2025.8.7) of the Python wrapper. It would be great if this would be merged into 10.7! ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#40553 Reported by: Sebastian Oehms Reviewer(s): David Coudert, Sebastian Oehms
sagemathgh-40553: Fix broken KnotInfo URL <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> The URL for KnotInfo currently specified in the Sage documentation (and used by some methods to launch description and image websites, such as `KnotInfo.K6_2.diagram()`) has been disabled. It doesn't even redirect to the [new page](https://knotinfo.org) on [render.com](https://render.com/). This PR implements the URL replacement and points Sage to the current [release 2025.8.7](https://github.com/soehms/database_knotinfo/releases/ tag/2025.8.7) of the Python wrapper. It would be great if this would be merged into 10.7! ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#40553 Reported by: Sebastian Oehms Reviewer(s): David Coudert, Sebastian Oehms
The URL for KnotInfo currently specified in the Sage documentation (and used by some methods to launch description and image websites, such as
KnotInfo.K6_2.diagram()
) has been disabled. It doesn't even redirect to the new page on render.com.This PR implements the URL replacement and points Sage to the current release 2025.8.7 of the Python wrapper.
It would be great if this would be merged into 10.7!
📝 Checklist
⌛ Dependencies