Skip to content

Commit

Permalink
Merge branch 'main' into numpy2afterdiscretize
Browse files Browse the repository at this point in the history
  • Loading branch information
prisae committed Oct 17, 2024
2 parents e1e26ae + 058a9c8 commit 9798a21
Show file tree
Hide file tree
Showing 18 changed files with 127 additions and 127 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 @@ -95,15 +95,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/ setup.py emg3d/ tests/
run: flake8 docs/ emg3d/ tests/

- name: Test with pytest
shell: bash -l {0}
Expand Down Expand Up @@ -171,7 +171,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 @@ -6,6 +6,14 @@ Changelog
""""""""""


latest
------

- Maintenance:

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


v1.8.4 : NumPy v2
-----------------

Expand Down
4 changes: 2 additions & 2 deletions CREDITS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,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
6 changes: 2 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ 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
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ 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]

pytest:
rm -rf .coverage htmlcov/ .pytest_cache/ && pytest --cov=emg3d && coverage html

flake8:
flake8 docs/ setup.py emg3d/ tests/
flake8 docs/ emg3d/ tests/

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: emg3d logo

|
.. image:: https://img.shields.io/pypi/v/emg3d.svg
:target: https://pypi.python.org/pypi/emg3d/
:alt: PyPI
.. image:: https://img.shields.io/conda/v/conda-forge/emg3d.svg
:target: https://anaconda.org/conda-forge/emg3d/
: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/emg3d/
:alt: Linux, Windows, OSX

|
A multigrid solver for 3D electromagnetic diffusion in Python.

- **Website:** https://emsig.xyz
Expand Down
15 changes: 11 additions & 4 deletions docs/dev/maintenance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,14 @@ To check the environment in which the documentation was built.
.. ipython::

In [1]: import emg3d
...: emg3d.Report(
...: ['sphinx', 'numpydoc', 'ipykernel', 'sphinx_numfig',
...: 'sphinx_design', 'sphinx_automodapi', 'pydata_sphinx_theme']
...: )
...: emg3d.Report([
...: "ipympl",
...: "sphinx",
...: "numpydoc",
...: "ipykernel",
...: "pickleshare",
...: "sphinx_design",
...: "sphinx_numfig",
...: "sphinx_automodapi",
...: "pydata_sphinx_theme",
...: ])
6 changes: 3 additions & 3 deletions docs/manual/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ or via ``pip``:
pip install emg3d
Requirements are the modules ``scipy``, ``numba``, and ``empymod``. Various
other packages are recommended or required for some advanced functionalities,
namely:
Requirements are the modules ``numpy``, ``scipy``, ``numba``, and ``empymod``.
Various other packages are recommended or required for some advanced
functionalities, namely:

- ``xarray``: For the :class:`emg3d.surveys.Survey` and
:class:`emg3d.simulations.Simulation` classes (model many sources and
Expand Down
88 changes: 88 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[project]
name = "emg3d"
description = "A multigrid solver for 3D electromagnetic diffusion"
readme = "README.rst"
requires-python = ">=3.10"
authors = [
{name = "The emsig community", email = "[email protected]"},
]
dependencies = [
"numpy",
"scipy>=1.10",
"numba",
"empymod>=2.3.2",
]
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://emg3d.emsig.xyz"
Repository = "https://github.com/emsig/emg3d"

[project.optional-dependencies]
full = [
"tqdm",
"h5py",
"xarray",
"discretize",
"matplotlib",
"ipympl",
# "pygimli>=1.5.2", # Only once implemented
# "simpeg>=0.22.1", # Only once implemented
]
docs = [
"emg3d[full]",
"sphinx",
"numpydoc",
"ipykernel",
"pickleshare",
"sphinx_design",
"sphinx_numfig",
"sphinx_automodapi",
"pydata_sphinx_theme",
]
tests = [
"flake8",
"pytest",
"coveralls",
"pytest_cov",
"flake8-pyproject",
"pytest-console-scripts",
]
all = [
"emg3d[docs]",
"emg3d[tests]",
]
build = [
"setuptools_scm>=8",
"setuptools>=64",
]

[project.scripts]
emg3d = "emg3d.cli.main:main"

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

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

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

[tool.coverage.run]
relative_files = true
33 changes: 0 additions & 33 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.

51 changes: 0 additions & 51 deletions setup.py

This file was deleted.

0 comments on commit 9798a21

Please sign in to comment.