-
Notifications
You must be signed in to change notification settings - Fork 12
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
Update to package configuration #39
Update to package configuration #39
Conversation
pep8 automatic formatting and relaxes matplotlib version requirement
Includes automatic versioning.
Codecov Report
@@ Coverage Diff @@
## develop #39 +/- ##
===========================================
- Coverage 96.34% 93.67% -2.67%
===========================================
Files 6 6
Lines 164 174 +10
===========================================
+ Hits 158 163 +5
- Misses 6 11 +5
Continue to review full report at Codecov.
|
Great to have this all in one place. Looking forward to making use of this elsewhere as well. @RemDelaporteMathurin we have a similar PR on the Paramak that has been merged already and I think this one is good to go if you are happy with it |
@shimwell @LiamPattinson thanks again for this. For some reason the CI/ testing workflow failed, does it need updating too? |
Going to be honest, I'm really not sure why that failed. It's odd that pytest ran fine, but the python calls didn't. All I can think of is that circleci might be using Python 3 for pip calls, and Python 2.7 for direct python calls. I've made it explicit, and we'll see how it goes. |
I had to play around in the openmc docker image to get to the root of this, and I think it might be as simple as doing a proper install rather than a 'develop' install in the CI. Calling |
@LiamPattinson for some reason there seem to be some conflicts with this PR and I can't run the workflow until there are fixed |
Sorry about that, the latest fix seems to have done it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @LiamPattinson
This update aims to bring openmc-plasma-source in line with PEP 517 recommendations for packaging etc. The build/install details in setup.py are moved to setup.cfg and pyproject.toml as simple input files. Rather than calling:
python setup.py install
/python setup.py develop
python setup.py sdist bdist_wheel
One should instead call:
pip install .
/pip install -e .
(for 'develop' mode)python -m build
Rather than using a requirements file, the project requirements may be listed in setup.cfg, and optional dependencies may be installed using:
pip install -e .[tests]
(-e is optional)This update also introduces automatic version inference, meaning the git tag is the 'single source of truth' for versioning. The version is updated with developer tags when between patch versions, i.e. one commit after 0.5.3 will be 0.5.4.dev0+[git commit].d[date].