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

Setup pytest and github actions for testing and release #21

Merged
merged 9 commits into from
Mar 18, 2021

Conversation

davidt0x
Copy link
Contributor

I tried to make pytests for most of the functionality that is currently tested in testAll.sh There is still a bunch more that need to be done though. Some are set to expected fail as well, but these are minor issues, see the reasons.

I also made some minor changes to how the package is organized. This is to follow more modern python packaging trends. I moved almost everything out of setup.py and put it into setup.cfg instead. I added a pyproject.toml for setting up build isolation and scm versioning. The scm versioning integrating with setuptools will make it easy to publish new releases to pypi with correct version. We just need to tag a release on GitHub with the semantic version (e.g. v0.1.0) and this will trigger a github action that runs tests and pushes to pypi if all goes well. Do we have a pypi project setup, if so we just need to add the API key to the repo's secrets.

- Added a pyproject.toml for defining build isolation.
- Added a setup.cfg and moved almost all of package configuration to
  there.
- Made setup.py as bare bones as possible. Still includes extra_requires
  though.
- Added some default configuration options for pytest, flake8, mypy, and
  isort.
- Setup SCM versioning in pyproject.toml and added modeci_mdf/version.py
  to gitignore to prevent it from getting checked into the repo.
@pgleeson pgleeson mentioned this pull request Mar 17, 2021
@davidt0x davidt0x requested a review from pgleeson March 17, 2021 18:59
See for .pre-commit-config.yaml for all installed hooks.

Currently, I have disabled black formatting, flake8, isort, and mypy.
@davidt0x davidt0x merged commit b4eaa64 into development Mar 18, 2021
@davidt0x davidt0x deleted the pytest_ci branch March 18, 2021 17:09
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.

None yet

1 participant