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 PEP517/518 pyproject.toml support #203

Merged

Conversation

agriyakhetarpal
Copy link
Member

Some of the key changes in this PR are as follows:

  1. Declarative metadata via TOML tables
  2. The ruff and pytest configurations are included in the newly-added pyproject.toml
  3. distutils is deprecated, so I removed the setup.py shim file altogether considering that PyBOP in itself is a pure-Python package
  4. Marked pybop.version as a private sub-module for pybop – this ensures that no one imports pybop.version.__version__ since the correct and intended way is through accessing pybop.__version__, which is unchanged except for the fact that the version is now defined in pyproject.toml; the good thing about this is that the package will now not have to be imported via import pybop to parse the version string

P.S. I should perhaps look at doing point 4 for PyBaMM too.

pyproject.toml Outdated Show resolved Hide resolved
pybop/_version.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Feb 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c72cf71) 94.57% compared to head (45df796) 94.58%.
Report is 15 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #203   +/-   ##
========================================
  Coverage    94.57%   94.58%           
========================================
  Files           44       44           
  Lines         1826     1829    +3     
========================================
+ Hits          1727     1730    +3     
  Misses          99       99           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@BradyPlanden BradyPlanden left a comment

Choose a reason for hiding this comment

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

Excellent, thanks for the contribution @agriyakhetarpal! Just one spot that's worth updating.

pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
@BradyPlanden BradyPlanden merged commit d3c845e into pybop-team:develop Feb 19, 2024
19 checks passed
@agriyakhetarpal agriyakhetarpal deleted the add-pep517/518-pyproject branch February 19, 2024 17:16
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.

2 participants