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

Add automated tests and release v0.5.0-dev #135

Merged
merged 5 commits into from
Aug 28, 2023

Conversation

AH-Merii
Copy link
Contributor

@AH-Merii AH-Merii commented Jul 22, 2023

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:

  1. 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.

  2. 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.

  3. 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.

  4. 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

  • Added a note about the modification or contribution to the ./docs/sources/CHANGELOG.md file (if applicable)
  • Added appropriate unit test functions in the ./biopandas/*/tests directories (if applicable)
  • Modify documentation in the corresponding Jupyter Notebook under biopandas/docs/sources/ (if applicable)
  • Ran 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)
  • Checked for style issues by running flake8 ./biopandas

This makes the workflow run on every pull request, this is helpful because it gives visibility to the maintainers that the tests are indeed passing before merging the PR. The publishing job is only run when a tag is given
@AH-Merii AH-Merii marked this pull request as ready for review July 22, 2023 23:09
@AH-Merii AH-Merii changed the title Create release 0.5.0dev Add automated tests and release v0.5.0-dev Jul 22, 2023
@AH-Merii
Copy link
Contributor Author

@a-r-j Gentle ping.

@a-r-j a-r-j merged commit 32b8deb into BioPandas:main Aug 28, 2023
@rasbt
Copy link
Member

rasbt commented Aug 28, 2023

Just saw a notification about the 0.5 release the other day @a-r-j and wanted to say thanks for maintaining this project!

Personally, I am not working in bio anymore/at the moment, and I am so swamped with other projects that I would have never found the time for this. But I am glad that the project is in good hands!!

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.

3 participants