Skip to content
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

Auto-prepend / to tile URLs #996

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

victorlin
Copy link
Member

@victorlin victorlin commented Aug 23, 2024

Description of proposed changes

Previously, the code assumed that all URLs started with / and was noted in featured-analyses.yaml. However, there was nothing to check this. A / is perfectly valid for everything except for the source check, which silently assumes everything that doesn't start with / is maintained by Nextstrain. This is a bad assumption.

The source check could either (1) be updated to work with the error or (2) throw a runtime error. I chose to go with (1) to make things easier when updating featured analyses.

Related issue(s)

Follow-up to #993 (comment)

Checklist

@victorlin victorlin self-assigned this Aug 23, 2024
@nextstrain-bot nextstrain-bot temporarily deployed to nextstrain-s-victorlin--510ohe August 23, 2024 21:02 Inactive
Previously, the code assumed that all URLs started with `/` and was
noted in featured-analyses.yaml. However, there was nothing to check
this. A `/` is perfectly valid for everything except for the source
check, which silently assumes everything that doesn't start with `/` is
maintained by Nextstrain. This is a bad assumption.

The source check could either (1) be updated to work with the error or
(2) throw a runtime error. I chose to go with (1) to make things easier
when updating featured analyses.
@victorlin victorlin force-pushed the victorlin/allow-url-without-first-slash branch from ef015c0 to 577a343 Compare August 23, 2024 21:45
@victorlin victorlin temporarily deployed to nextstrain-s-victorlin--510ohe August 23, 2024 21:46 Inactive
@victorlin victorlin marked this pull request as ready for review August 23, 2024 21:46
Copy link
Member

@jameshadfield jameshadfield left a comment

Choose a reason for hiding this comment

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

Nice work! (we discussed this back in the original PR)

@victorlin victorlin merged commit bba2a61 into master Aug 26, 2024
7 checks passed
@victorlin victorlin deleted the victorlin/allow-url-without-first-slash branch August 26, 2024 16:36
@victorlin victorlin mentioned this pull request Aug 26, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants