Skip to content

Commit

Permalink
Replace setup.py with pyproject.toml. (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
prisae authored Oct 15, 2024
1 parent 4fa67f6 commit 20eb79a
Show file tree
Hide file tree
Showing 16 changed files with 112 additions and 110 deletions.
2 changes: 0 additions & 2 deletions .coveragerc

This file was deleted.

3 changes: 3 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst
2 changes: 1 addition & 1 deletion .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
shell: bash -l {0}
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt
python -m pip install .[docs]
- name: Check links
shell: bash -l {0}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ jobs:
conda config --show-sources
conda config --show
conda info -a
conda install ${{ matrix.case.conda }} pytest pytest-cov pytest-console-scripts coveralls flake8 setuptools-scm
conda install ${{ matrix.case.conda }} pytest pytest-cov pytest-console-scripts coveralls flake8 flake8-pyproject setuptools-scm
- name: Conda list
shell: bash -l {0}
run: conda list

- name: Flake8
shell: bash -l {0}
run: flake8 docs/conf.py setup.py empymod/ tests/ examples/
run: flake8 docs/conf.py empymod/ tests/ examples/

- name: Test with pytest
shell: bash -l {0}
Expand Down Expand Up @@ -177,7 +177,7 @@ jobs:
# Change setuptools-scm local_scheme to "no-local-version" so the
# local part of the version isn't included, making the version string
# compatible with Test PyPI.
sed --in-place 's/"root"/"local_scheme":"no-local-version","root"/g' setup.py
sed --in-place 's/version_file/local_scheme = "no-local-version"\nversion_file/g' pyproject.toml
- name: Build source and wheel distributions
run: |
Expand Down
3 changes: 2 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ formats: []
# docs
python:
install:
- requirements: requirements-dev.txt
- method: pip
path: .
extra_requirements:
- docs
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ v2.3.x
""""""


latest
------

- Maintenance:

- Changed from ``setup.py`` to ``pyproject.toml``.


v2.3.2: NumPy v2
----------------

Expand Down
4 changes: 2 additions & 2 deletions CREDITS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ namely:
through the *Gitaro.JIM* project (till 05/2021, emg3d v1.0.0), funded by
`MarTERA <https://www.martera.eu>`_ as part of Horizon 2020, a funding scheme
of the European Research Area.
- 2021-2024: `Delft University of Technology <https://www.tudelft.nl>`_ through
the `Delphi Consortium <https://www.delphi-consortium.com>`_.
- 2021-2022: `TERRASYS Geophysics GmbH & Co. KG
<https://www.terrasysgeo.com>`_.
- 2021-2024: `Delft University of Technology <https://www.tudelft.nl>`_ through
the `Delphi Consortium <https://www.delphi-consortium.com>`_.
- 2024-today: `ETH Zurich <https://ethz.ch>`_ through the group `Geothermal
Energy and Geofluids <https://geg.ethz.ch>`_.

Expand Down
7 changes: 3 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ prune .github
exclude MANIFEST.in
exclude CHANGELOG.rst
exclude Makefile
exclude requirements.txt
exclude requirements-dev.txt
exclude setup.cfg
exclude .gitignore
exclude .coveragerc
exclude .readthedocs.yml
exclude .git_archival.txt
exclude .gitattributes
exclude pyproject.toml
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ help:
@echo ""

install:
python -m pip install --no-build-isolation --use-pep517 --no-deps -e .
python -m pip install -e .

dev-install:
python -m pip install -r requirements-dev.txt && python -m pip install --no-build-isolation --use-pep517 --no-deps -e .
python -m pip install -e .[all]

.ONESHELL:
pytest:
Expand All @@ -28,7 +28,7 @@ pytest:
rm matplotlibrc

flake8:
flake8 docs/conf.py setup.py empymod/ tests/ examples/
flake8 docs/conf.py empymod/ tests/ examples/

html:
cd docs && make html
Expand Down
17 changes: 0 additions & 17 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,6 @@
:target: https://emsig.xyz
:alt: empymod logo

|
.. image:: https://img.shields.io/pypi/v/empymod.svg
:target: https://pypi.python.org/pypi/empymod/
:alt: PyPI
.. image:: https://img.shields.io/conda/v/conda-forge/empymod.svg
:target: https://anaconda.org/conda-forge/empymod/
:alt: conda-forge
.. image:: https://img.shields.io/badge/python-3.10+-blue.svg
:target: https://www.python.org/downloads/
:alt: Supported Python Versions
.. image:: https://img.shields.io/badge/platform-linux,win,osx-blue.svg
:target: https://anaconda.org/conda-forge/empymod/
:alt: Linux, Windows, OSX

|
Open-source full 3D electromagnetic modeller for 1D VTI media

- **Website:** https://emsig.xyz
Expand Down
86 changes: 86 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[project]
name = "empymod"
description = "Open-source full 3D electromagnetic modeller for 1D VTI media"
readme = "README.rst"
requires-python = ">=3.10"
authors = [
{name = "The emsig community", email = "[email protected]"},
]
dependencies = [
"scipy>=1.10",
"numba",
"libdlf",
"scooby",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
]
dynamic = ["version"]

[project.license]
file = "LICENSE"

[project.urls]
Homepage = "https://emsig.xyz"
Documentation = "https://empymod.emsig.xyz"
Repository = "https://github.com/emsig/empymod"

[project.optional-dependencies]
docs = [
"matplotlib",
"sphinx>=7.3",
"numpydoc",
"sphinx_design",
"sphinx_numfig",
"sphinx_gallery>=0.16",
"memory_profiler",
"pydata_sphinx_theme",
"sphinx_automodapi",
"ipykernel",
"ipympl",
"pickleshare",
]

tests = [
"asv",
"flake8",
"pytest",
"coveralls",
"pytest_cov",
"pytest_mpl",
"flake8-pyproject",
"pytest-console-scripts",
]

all = [
"empymod[docs]",
"empymod[tests]",
]

build = [
"setuptools_scm>=8",
"setuptools>=64",
]

[project.scripts]
empymod = "empymod.__main__:main"

[tool.setuptools.packages.find]
include = ["empymod*"]

[tool.setuptools_scm]
version_file = "empymod/version.py"

[tool.flake8]
per-file-ignores = [
"__init__.py: F401, F403, F821",
]

[tool.coverage.run]
relative_files = true
30 changes: 0 additions & 30 deletions requirements-dev.txt

This file was deleted.

1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

44 changes: 0 additions & 44 deletions setup.py

This file was deleted.

0 comments on commit 20eb79a

Please sign in to comment.