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

Normalize path while requesting list of assets from the server #1454

Merged
merged 4 commits into from
Jun 14, 2024

Commits on Jun 14, 2024

  1. RF test to avoid duplication

    Duplication leads to bugs and also makes it harder to read the test
    since requires mental "filtering" to disregard unnecessary duplicated
    code while ensuring that not missing some critical difference.
    
    E.g. I did miss that some have sorted() and some not.  Now it is more obvious
    IMHO.
    
    Ideally other tests with similar pattern should be redone as well.
    Ideally there might be a way to use parametric testing with a common
    fixture (did not check how/if possible yet)
    yarikoptic committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    0ebbb35 View commit details
    Browse the repository at this point in the history
  2. BF: normalize path before passing to API for querying assets

    What we call "path" is really just a prefix for dandi-archive.  To ensure more
    consistent operation for a user, let's normalize those paths, even though normalization would seemingly allow for obnoxious cases like "nonexistent/../realfolder/".
    
    According to #1452 it is likely that
    we had operation more robust at server-side before and were accepting "./"
    whenever now it just returns an empty list.  Not sure if worth seeking change
    at dandi-archive level ATM.
    yarikoptic committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    4a31880 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c291755 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0aabf16 View commit details
    Browse the repository at this point in the history