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

Switch to hatchling backend #4747

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions MANIFEST.in

This file was deleted.

5 changes: 0 additions & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -37,7 +37,6 @@ def set_environment_variables(env_dict, session):
def run_coverage(session):
"""Run the coverage tests and generate an XML report."""
set_environment_variables(PYBAMM_ENV, session=session)
session.install("setuptools", silent=False)
session.install("coverage", silent=False)
# Using plugin here since coverage runs unit tests on linux with latest python version.
if "CI" in os.environ:
@@ -50,7 +49,6 @@ def run_coverage(session):
def run_integration(session):
"""Run the integration tests."""
set_environment_variables(PYBAMM_ENV, session=session)
session.install("setuptools", silent=False)
if (
"CI" in os.environ
and sys.version_info[:2] == (3, 12)
@@ -80,7 +78,6 @@ def run_doctests(session):
def run_unit(session):
"""Run the unit tests."""
set_environment_variables(PYBAMM_ENV, session=session)
session.install("setuptools", silent=False)
session.install("-e", ".[all,dev,jax]", silent=False)
session.run("python", "-m", "pytest", "-m", "unit")

@@ -89,7 +86,6 @@ def run_unit(session):
def run_examples(session):
"""Run the examples tests for Jupyter notebooks."""
set_environment_variables(PYBAMM_ENV, session=session)
session.install("setuptools", silent=False)
session.install("-e", ".[all,dev,jax]", silent=False)
notebooks_to_test = session.posargs if session.posargs else []
session.run(
@@ -134,7 +130,6 @@ def set_dev(session):
def run_tests(session):
"""Run the unit tests and integration tests sequentially."""
set_environment_variables(PYBAMM_ENV, session=session)
session.install("setuptools", silent=False)
session.install("-e", ".[all,dev,jax]", silent=False)
session.run(
"python",
25 changes: 6 additions & 19 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
requires = [
"setuptools",
"hatchling>=1.13.0",
]
build-backend = "setuptools.build_meta"
build-backend = "hatchling.build"

[project]
name = "pybamm"
@@ -146,25 +146,12 @@ ECM_Example = "pybamm.input.parameters.ecm.example_set:get_parameter_values"
MSMR_Example = "pybamm.input.parameters.lithium_ion.MSMR_example_set:get_parameter_values"
Chayambuka2022 = "pybamm.input.parameters.sodium_ion.Chayambuka2022:get_parameter_values"

[tool.setuptools]
include-package-data = true

# List of files to include as package data. These are mainly the parameter CSV files in
# the input/parameters/ subdirectories. Other files such as the CITATIONS file, relevant
# README.md files, and specific .txt files inside the pybamm/ directory are also included.
# These are specified to be included in the SDist through MANIFEST.in.
[tool.setuptools.package-data]
pybamm = [
"*.txt",
"*.md",
"*.csv",
"*.py",
"src/pybamm/CITATIONS.bib",
"src/pybamm/plotting/mplstyle",
[tool.hatch]
build.targets.sdist.include = [
"src/pybamm",
"CITATION.cff",
]

[tool.setuptools.packages.find]
where = ["src"]
[tool.ruff]
extend-include = ["*.ipynb"]
extend-exclude = ["__init__.py"]