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

Fix: move to hatch scripts for tests and move to pytest #90

Merged
merged 3 commits into from
Feb 21, 2024

Conversation

lwasser
Copy link
Member

@lwasser lwasser commented Feb 21, 2024

closes #89

This is a small PR to begin moving to hatch scripts for easier test runs and automation.
i also moved us over to pytest to take advantage of pytest.parametrize

[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "src/pyosmeta/_version.py"

[tool.hatch.envs.test]
Copy link
Member Author

Choose a reason for hiding this comment

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

This sets up a test envt with whatever deps you want

"pytest-cov",
]

[tool.hatch.envs.test.scripts]
Copy link
Member Author

Choose a reason for hiding this comment

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

this sets up a script that like nox can be run.

so running hatch run test:run-tests
where test is the envt name and run-tests is the script to call will run our tests and make sure pytest is installed. you can also setup envt defaults if you want

@lwasser lwasser merged commit 11ba036 into pyOpenSci:main Feb 21, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setup test suite runs with pytest and hatch scripts
1 participant