-
Notifications
You must be signed in to change notification settings - Fork 206
Lint for version captures in modules #3676
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?
Conversation
…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.
Did my best, and wanted to keep the code verbatim before things really start shifting.
… version handling - Introduced separate test files for module changes, deprecations, todos, and version functionalities. - Implemented basic structure and placeholder tests for each new test file to ensure future functionality can be added. - Removed the old test_lint.py file to streamline the test organization.
…ssed tests - Updated the assertion to verify the presence of "test_snap_md5sum" in the passed tests. - Improved handling to accommodate both LintResult objects and tuple formats for better robustness.
Add new lint check `test_snap_version_content` to ensure version information in test snapshots contains actual content instead of MD5/SHA hash values. This addresses the issue where version snapshots were storing hash values like "versions.yml:md5,949da9c6297b613b50e24c421576f3f1" instead of actual version content like {"ALE": {"ale": "20180904"}}. Changes: - Add version content validation in module_tests.py with regex patterns - Add comprehensive tests for both invalid (hash) and valid (content) cases - Add pytest issue marker support for linking tests to GitHub issues - Update pyproject.toml with new pytest marker configuration Fixes: nf-core/modules#6505 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
e8bcc7b
to
c809831
Compare
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.
Will have a deeper look once the two other PRS it contains are cleared up.
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 don't want to have too much agent generated code for this repo, because it is too finicky and too deeply integrated into everything nf-core. So please remove this file. 😬
Waiting on #3592 to get merged.
PR checklist
CHANGELOG.md
is updateddocs
is updated