Skip to content

Refactor module lint tests #3592

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

Draft
wants to merge 11 commits into
base: env-sorting
Choose a base branch
from
Draft

Conversation

edmundmiller
Copy link
Contributor

@edmundmiller edmundmiller commented May 30, 2025

Follow up to #3591

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

…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.
Copy link

codecov bot commented May 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.66%. Comparing base (b34b660) to head (32274ff).
Report is 55 commits behind head on dev.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@edmundmiller edmundmiller marked this pull request as draft May 30, 2025 16:21
@mashehu
Copy link
Contributor

mashehu commented Jun 9, 2025

can you make this independent from #3591 ? Difficult to see the changes otherwise

@edmundmiller
Copy link
Contributor Author

can you make this independent from #3591 ? Difficult to see the changes otherwise

Will do just have to wait for #3591 to be merged 🙄 but I'll point it at that branch for now.

@edmundmiller edmundmiller changed the base branch from dev to env-sorting July 1, 2025 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

2 participants