Skip to content

Add PEP517/518 pyproject.toml support#203

Merged
BradyPlanden merged 9 commits into
pybop-team:developfrom
agriyakhetarpal:add-pep517/518-pyproject
Feb 19, 2024
Merged

Add PEP517/518 pyproject.toml support#203
BradyPlanden merged 9 commits into
pybop-team:developfrom
agriyakhetarpal:add-pep517/518-pyproject

Conversation

@agriyakhetarpal

Copy link
Copy Markdown
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.

Comment thread pyproject.toml Outdated
Comment thread pybop/_version.py
@codecov

codecov Bot commented Feb 16, 2024

Copy link
Copy Markdown

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.

@BradyPlanden BradyPlanden left a comment

Copy link
Copy Markdown
Member

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.

Comment thread pyproject.toml Outdated
Comment thread pyproject.toml
@BradyPlanden BradyPlanden merged commit d3c845e into pybop-team:develop Feb 19, 2024
@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