Skip to content

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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

soehms
Copy link
Member

@soehms soehms commented Aug 8, 2025

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

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

Copy link

github-actions bot commented Aug 8, 2025

Documentation preview for this PR (built with commit 1c469d8; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

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/>`__.
Copy link
Contributor

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)

Copy link
Member Author

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'
Copy link
Contributor

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

Copy link
Member Author

@soehms soehms Aug 9, 2025

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'
Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the previous issue.

@@ -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)>`__):
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

@@ -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)>`__):
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

@@ -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)>`__):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove )

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

Copy link
Contributor

@dcoudert dcoudert left a 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.

@soehms
Copy link
Member Author

soehms commented Aug 9, 2025

ok, got for it.

LGTM.

Thanks a lot!

vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 10, 2025
<!-- ^ 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
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 12, 2025
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
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 13, 2025
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
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 14, 2025
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
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 16, 2025
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants