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

nextstrain remote treats Groups names as case sensitive though nextstrain.org does not #236

Open
tsibley opened this issue Nov 21, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@tsibley
Copy link
Member

tsibley commented Nov 21, 2022

Current Behavior

The CLI's nextstrain.org remote for nextstrain remote {ls,download,delete} treats paths as case-sensitive:

def matches_path(x: Resource):
if recursively:
return x.path == path or glob_match(str(x.path), str(path / "**"))
else:
return x.path == path

In general, they are so this is fine, but the names of Nextstrain Groups are special on nextstrain.org in that they're case-insensitive though (generally) case-preserving. This results in differences between what works on the web and what works via Nextstrain CLI, e.g. https://nextstrain.org/groups/BLAB/sars-like-cov in the browser works but

nextstrain remote download https://nextstrain.org/groups/BLAB/sars-like-cov

does not. Only the correct casing of blab works.

This does not affect nextstrain remote upload because it does not go thru the internal _ls() function.

Expected behavior

The names of Nextstrain Groups should be case-insensitive (at least from the user perspective) in nextstrain remote commands.

Possible solution

  1. Explicitly case-fold Groups names during path comparison in the nextstrain.org remote. This is very doable but gets messy and ugly. Probably worth it for the UX improvement, though.

  2. Implement the RESTful API endpoint for dataset/narrative listing/searching instead of relying on the Charon API endpoint. The case sensitive string-based comparison of paths only has to happen in Nextstrain CLI because we're using the existing Charon API. The new RESTful API endpoint we'd like for this functionality would ideally obviate the need to do comparisons/filtering client-side.

Additional context

First reported in a support ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Backlog
Development

No branches or pull requests

1 participant