From 6823c2bd7a50f872809ddf4a5030888946185154 Mon Sep 17 00:00:00 2001 From: Marcel Stimberg Date: Tue, 14 Jan 2025 14:18:31 +0100 Subject: [PATCH] Move to src layout and pdm for packaging --- pyproject.toml | 78 +++++++------------- {QuantSI => src/QuantSI}/__init__.py | 0 {QuantSI => src/QuantSI}/allunits.py | 0 {QuantSI => src/QuantSI}/conftest.py | 0 {QuantSI => src/QuantSI}/constants.py | 0 {QuantSI => src/QuantSI}/fundamentalunits.py | 0 {QuantSI => src/QuantSI}/stdunits.py | 0 {QuantSI => src/QuantSI}/tests/__init__.py | 0 {QuantSI => src/QuantSI}/tests/test_units.py | 0 9 files changed, 25 insertions(+), 53 deletions(-) rename {QuantSI => src/QuantSI}/__init__.py (100%) rename {QuantSI => src/QuantSI}/allunits.py (100%) rename {QuantSI => src/QuantSI}/conftest.py (100%) rename {QuantSI => src/QuantSI}/constants.py (100%) rename {QuantSI => src/QuantSI}/fundamentalunits.py (100%) rename {QuantSI => src/QuantSI}/stdunits.py (100%) rename {QuantSI => src/QuantSI}/tests/__init__.py (100%) rename {QuantSI => src/QuantSI}/tests/test_units.py (100%) diff --git a/pyproject.toml b/pyproject.toml index 5c63d6a..350c79e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,17 +1,18 @@ [project] name = "QuantSI" +version = "0.1.0" +description = "unit system as used by the Brian2 simulator" authors = [ - {name = 'Sorin Birchi'}, + {name = "Sorin Birchi"}, + {name = "Marcel Stimberg}, + {name = "Dan Goodman"}, + {name = "Romain Brette"}, ] -requires-python = '>=3.10' -dependencies = [ - 'numpy>=1.23.5', - 'sympy>=1.2', - 'setuptools>=61' -] -dynamic = ["version", "readme"] -description = 'unit system as used by the Brian2 simulator' -keywords = ['computational neuroscience', 'simulation', 'system units'] +dependencies = ["numpy>=1.25", "sympy>=1.2"] +requires-python = ">=3.10" +readme = "README.md" +license = {text = "GPLv3"} +keywords = ['SI', 'SI units', 'unit system', 'physical quantities'] classifiers = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Science/Research', @@ -20,51 +21,22 @@ classifiers = [ 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Topic :: Scientific/Engineering :: Bio-Informatics' + 'Topic :: Scientific/Engineering' ] [project.optional-dependencies] -test = ['pytest', 'pytest-xdist>=1.22.3'] -docs = ['sphinx>=7', 'ipython>=5', 'sphinx-tabs'] - -[project.urls] -Documentation ='https://QuantSI.readthedocs.io/en/latest/' -Source = 'https://github.com/brian-team/QuantSI' -Tracker = 'https://github.com/brian-team/QuantSI/issues' - -[build-system] -requires = [ - "setuptools>=61", - "numpy>=2.0.0rc1", - "wheel", - "setuptools_scm[toml]>=6.2" +test = [ + "pytest>=8.3.4", + "pytest-xdist>=1.22.3", ] -build-backend = "setuptools.build_meta" - -[tool.setuptools] -zip-safe = false -include-package-data = true - -[tool.setuptools.packages.find] -include = ["QuantSI*"] - -[tool.setuptools.dynamic] -readme = {file = 'README.md', content-type = "text/markdown"} - -[tool.setuptools_scm] -version_scheme = 'post-release' -local_scheme = 'no-local-version' -write_to = 'QuantSI/_version.py' -fallback_version = 'unknown' - -[tool.black] -target-version = ['py310'] -include = '^/QuantSI/.*\.pyi?$' +docs = [ + "sphinx>=7", + "ipython>=5", + "sphinx-tabs>=3.4.7", +] +[build-system] +requires = ["pdm-backend"] +build-backend = "pdm.backend" -[tool.isort] -atomic = true -profile = "black" -py_version = "311" -skip_gitignore = true -# NOTE: isort has no "include" option, only "skip". -skip_glob = ["docs_sphinx/*"] +[tool.pdm] +distribution = true diff --git a/QuantSI/__init__.py b/src/QuantSI/__init__.py similarity index 100% rename from QuantSI/__init__.py rename to src/QuantSI/__init__.py diff --git a/QuantSI/allunits.py b/src/QuantSI/allunits.py similarity index 100% rename from QuantSI/allunits.py rename to src/QuantSI/allunits.py diff --git a/QuantSI/conftest.py b/src/QuantSI/conftest.py similarity index 100% rename from QuantSI/conftest.py rename to src/QuantSI/conftest.py diff --git a/QuantSI/constants.py b/src/QuantSI/constants.py similarity index 100% rename from QuantSI/constants.py rename to src/QuantSI/constants.py diff --git a/QuantSI/fundamentalunits.py b/src/QuantSI/fundamentalunits.py similarity index 100% rename from QuantSI/fundamentalunits.py rename to src/QuantSI/fundamentalunits.py diff --git a/QuantSI/stdunits.py b/src/QuantSI/stdunits.py similarity index 100% rename from QuantSI/stdunits.py rename to src/QuantSI/stdunits.py diff --git a/QuantSI/tests/__init__.py b/src/QuantSI/tests/__init__.py similarity index 100% rename from QuantSI/tests/__init__.py rename to src/QuantSI/tests/__init__.py diff --git a/QuantSI/tests/test_units.py b/src/QuantSI/tests/test_units.py similarity index 100% rename from QuantSI/tests/test_units.py rename to src/QuantSI/tests/test_units.py