-
Notifications
You must be signed in to change notification settings - Fork 206
Update conda env sorting #3591
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
base: dev
Are you sure you want to change the base?
Update conda env sorting #3591
Conversation
Just had a quick look on the phone. for me having first pip and then immediately followed by pip dependencies made more sense. Is there a standard here? |
@nf-core-bot fix linting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use ruaml for yaml parsing so we don't lose comments.
Also the channel order has a meaning, so I think we shouldn't touch it.
I was just following the previous standard 🙃 I had it originally implemented with ruaml. |
@nf-core-bot fix linting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am confused. what's the difference between the functionality in this PR vs #3584
Don't the create the same result in the end?
The additional tests are fine.
*approve Stupid github phone app... |
No extra functionality, I just missed that you had fixed this 3 days ago 🙃 . |
Codecov ReportAttention: Patch coverage is
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…dling - Renamed test functions for clarity. - Introduced DummyModule and DummyLint classes to simulate module and lint behavior. - Enhanced tests for handling invalid, empty, and missing dependencies in environment.yml files. - Improved assertions to validate sorting and schema compliance.
- Replaced yaml library with ruamel.yaml for improved YAML processing. - Added schema validation for environment.yml files. - Implemented sorting for dependencies and channels, ensuring proper order. - Updated file writing to include schema lines and sorted content. - Enhanced logging for sorting actions and validation results.
…processing - Updated the YAML library from ruamel.yaml to PyYAML for improved compatibility. - Changed YAML loading to use safe_load for better security. - Enhanced YAML dumping with specific formatting options for clarity. - Adjusted error handling to reflect the new library usage.
…ent.yml processing" This reverts commit 34d5b00. Co-authored-by: mashehu <mashehu@users.noreply.github.com>
…endencies Co-authored-by: mashehu <mashehu3@gmail.com>
…l sorting - Removed channel sorting logic from environment.yml processing. - Updated related tests to reflect channel preservation instead of sorting. - Adjusted logging messages to focus solely on dependency sorting. Co-authored-by: mashehu <mashehu3@gmail.com>
- Introduced factory fixtures for creating DummyModule and DummyLint instances to streamline test setup. - Updated tests to utilize the new setup_lint_environment fixture for improved clarity and maintainability. - Enhanced assertions for YAML parsing results in the environment.yml sorting tests. - Added parameterized tests for handling invalid and empty YAML files.
- Updated pytest.ini_options in pyproject.toml to include a new "integration" marker for better test categorization.
…nt_test attribute - Changed the assertion to check for the "environment_yml_sorted" in the lint.passed list using the lint_test attribute instead of the previous tuple structure.
but it is a link to another json file
because we already have a working and tested sorting, how difficult would it be to revert the changes to it in this PR and only keep the tests? or is there a bigger difference between the two implementations i don't see? |
It uses ruaml which was a request you had
If you'd feel more comfortable, we can break the tests into a PR and then the changes into a second PR. |
That was before I understood that it re-implements the sorting functionality 🙂 |
Adds extra tests. Didn't realize #3584 added the environment.yml listing so recently.
Closes #3590
Started in: nf-core/modules#7085
This fixes an issue with the Seqera containers' naming.
The Seqera containers site doesn't care about the context of what module the
image is for. It just sorts the dependencies.
This avoids having multiple containers with a bunch of different names.
PR checklist
CHANGELOG.md
is updateddocs
is updated