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
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
root_path = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
sys.path.insert(0, root_path)

from pybop.version import __version__ # noqa: E402
from pybop._version import __version__ # noqa: E402

# -- Project information -----------------------------------------------------
project = "PyBOP"
Expand Down
2 changes: 1 addition & 1 deletion pybop/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
# Version info
#
from pybop.version import __version__
from pybop._version import __version__

#
# Constants
Expand Down
3 changes: 3 additions & 0 deletions pybop/_version.py
agriyakhetarpal marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import importlib.metadata

__version__ = importlib.metadata.version("pybop")
1 change: 0 additions & 1 deletion pybop/version.py

This file was deleted.

59 changes: 59 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
[build-system]
requires = ["setuptools>=64"]
build-backend = "setuptools.build_meta"

[project]
name = "pybop"
version = "23.12"
authors = [
{name = "The PyBOP Team"},
]
maintainers = [
{name = "The PyBOP Team"},
]
description = "Python Battery Optimisation and Parameterisation"
readme = "README.md"
license = { file = "LICENSE" }
# https://pypi.org/classifiers/
classifiers = []
requires-python = ">=3.8, <=3.12"
agriyakhetarpal marked this conversation as resolved.
Show resolved Hide resolved
dependencies = [
"pybamm>=23.5",
"numpy>=1.16",
"scipy>=1.3",
"pandas>=1.0",
"pints>=0.5",
]

[project.optional-dependencies]
plot = ["plotly>=5.0"]
docs = [
"sphinx>=6",
"pydata-sphinx-theme",
"sphinx-autobuild",
"sphinx-autoapi",
"sphinx_copybutton",
"sphinx_favicon",
"sphinx_design",
"myst-parser",
]
all = ["pybop[plot]"]
agriyakhetarpal marked this conversation as resolved.
Show resolved Hide resolved

[tool.setuptools.packages.find]
include = ["pybop", "pybop.*"]

[project.urls]
Homepage = "https://github.com/pybop-team/PyBOP"

[tool.pytest.ini_options]
addopts = "--showlocals -v"

[tool.ruff]
extend-include = ["*.ipynb"]
extend-exclude = ["__init__.py"]

[tool.ruff.lint]
ignore = ["E501","E741"]

[tool.ruff.lint.per-file-ignores]
"**.ipynb" = ["E402", "E703"]
3 changes: 0 additions & 3 deletions pytest.ini

This file was deleted.

8 changes: 0 additions & 8 deletions ruff.toml

This file was deleted.

51 changes: 0 additions & 51 deletions setup.py

This file was deleted.

Loading