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

Allow custom snakebids version in app template #376

Merged
merged 4 commits into from
Feb 20, 2024

Conversation

pvandyken
Copy link
Contributor

@pvandyken pvandyken commented Feb 19, 2024

Adds flag --snakebids-version to the snakebids create cli. It can be set to either a version specifier (e.g. >=a.b, ==x.y.z) or a url (e.g. @ scheme://domain-or-path/....). Paths and git repositories are identified and properly formatted for a poetry pyproject.toml. It does not handle markers (following a ;) or extras (in between [...]). Some minimal validation in the CLI command will help catch these.

This is primarily intended for testing: with this improvement we can specify the path the snakebids repo in our template dry run tests, allowing us to test the current repository with all installation methods. Previously it was downloading snakebids from pip, but this causes errors in e.g. #362, where the template itself is updated and no longer compatible with the pypi installation.

Nevertheless, the cli command is documented and tested and suitable for public use within its defined scope.

(Note: technically this is an enhancement, but I'm labeling maintenance since the primary focus here is internal)

Adds flag --snakebids-version to the snakebids create cli that takes
either a version specifier or @url
The dry run tests now specify the development repository as the
snakebids version to be installed, rather than pulling from pip
@pvandyken pvandyken added the maintenance Updates or improvements that do not change functionality of the code label Feb 19, 2024
Copy link

codecov bot commented Feb 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7558fc9) 91.61% compared to head (f25478b) 92.02%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #376      +/-   ##
==========================================
+ Coverage   91.61%   92.02%   +0.40%     
==========================================
  Files          39       40       +1     
  Lines        1730     1767      +37     
==========================================
+ Hits         1585     1626      +41     
+ Misses        145      141       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

When snakebids version is directly specified as a path, we need this
configured for hatch for the install to work
Copy link
Contributor

@kaitj kaitj left a comment

Choose a reason for hiding this comment

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

Given the snakebids ver

@pvandyken pvandyken merged commit d1031ff into khanlab:main Feb 20, 2024
36 checks passed
@pvandyken pvandyken deleted the feat/template/snakebids-version branch February 20, 2024 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Updates or improvements that do not change functionality of the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants