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

💡 Replace Version Check Script with Unit Test #341

Open
Nicoretti opened this issue Jan 22, 2025 · 0 comments
Open

💡 Replace Version Check Script with Unit Test #341

Nicoretti opened this issue Jan 22, 2025 · 0 comments
Labels
💡idea Idea for future features/improvments

Comments

@Nicoretti
Copy link
Member

Summary

Currently, the project version is validated through a script as follows:

poetry run version-check `poetry run python -c "from noxconfig import PROJECT_CONFIG; print(PROJECT_CONFIG.version_file)"`

This script is used in this project and others that utilize the same toolbox. We propose replacing this version check script with a dedicated unit test to validate the correctness of the version.

Proposal

  1. Unit Test for Version Validation: Create a unit test to check the project's version. This test will ensure the version is correctly configured, making the previous script redundant.

  2. Integration with Existing CI/CD: Integrate this unit test into the current CI/CD pipelines. The version-check step can now simply run this unit test.

  3. Project Template Change: Update the project-template (cookiecutter template) to include this new unit test:

    • Replace the existing empty smoke test in the template with a dummy test for version validation.
    • If this test initially fails, it will guide the developers on what needs to be implemented or configured, making the process clearer.

By implementing this change, we can improve the maintainability and clarity of version checks across different projects.

@Nicoretti Nicoretti added the 💡idea Idea for future features/improvments label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡idea Idea for future features/improvments
Projects
None yet
Development

No branches or pull requests

1 participant