Add automated tests and release v0.5.0-dev #135
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Code of Conduct
Description
Add testing jobs to GitHub Actions workflow and update release process
This PR brings several updates and enhancements to the GitHub Actions workflow:
Changed the triggering event: Previously, the workflow was executed on push events that included tags. Now, the workflow is triggered on pull requests to the main branch. This allows us to run checks on PRs before they are merged.
Added testing jobs: Two new jobs, test-style and test-pytest, have been added to perform style checks with flake8 and run pytest tests on the biopandas directory. As part of these new jobs, test dependencies are also installed.
Updated build-n-publish job: The job to build the project and publish to PyPI now requires the test-style and test-pytest jobs to pass before it is run. Also, the condition for this job to run has been updated to only execute if the GitHub ref starts with 'v', which allows us to better control when releases are made.
Updated GitHub release process: The prerelease field in the create-release action has been updated from false to true. This marks new releases as pre-releases on GitHub.
This update ensures the CI/CD pipeline performs comprehensive checks on PRs, thus improving the code quality and robustness of the application. Furthermore, it streamlines the process of creating new releases, both on PyPI and GitHub.
I have also added the tag
v0.5.0-dev
so that the publish job will be triggered.Note:
While there are better ways to trigger the publishing of the package to PyPi, I have decided to keep your original code to publishing it unchanged, the condition to publish as mentioned above is still the same see #120.
Please review and provide your feedback.
Related issues or pull requests
Relates to #120
Pull Request Checklist
./docs/sources/CHANGELOG.md
file (if applicable)./biopandas/*/tests
directories (if applicable)biopandas/docs/sources/
(if applicable)PYTHONPATH='.' pytest ./biopandas -sv
and make sure that all unit tests pass (for small modifications, it might be sufficient to only run the specific test file, e.g.,PYTHONPATH='.' pytest ./biopandas/classifier/tests/test_stacking_cv_classifier.py -sv
)flake8 ./biopandas