Skip to content

Commit ade673d

Browse files
authored
Maintenance and v1.8.2 (#314)
- Typo in io.convert - Linkcheck: Exclude all doi's - Tests: added Python 3.11, dropped Python 3.7. - Update minimum requirements - Simplify copyright statement - v1.8.2
1 parent bc919cc commit ade673d

33 files changed

+73
-62
lines changed

.github/workflows/linux.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -31,31 +31,31 @@ jobs:
3131
matrix:
3232
os: [ubuntu, ] # macos, windows] # Only Linux currently.
3333
case:
34-
- python-version: "3.7"
34+
- python-version: "3.8"
3535
name: minimal
3636
os: ubuntu
37-
conda: "'scipy=1.4' 'numpy=1.17' 'numba=0.45'"
38-
- python-version: "3.8"
37+
conda: "'scipy=1.5' 'numpy=1.19' 'numba=0.50'"
38+
- python-version: "3.9"
3939
name: full
4040
os: ubuntu
4141
conda: "numba scipy xarray empymod h5py scooby discretize matplotlib" # tqdm
42-
- python-version: "3.8"
42+
- python-version: "3.9"
4343
name: plain
4444
os: ubuntu
4545
conda: "numba scipy"
46-
- python-version: "3.9"
46+
- python-version: "3.10"
4747
name: plain
4848
os: ubuntu
4949
conda: "numba scipy"
50-
- python-version: "3.9"
50+
- python-version: "3.10"
5151
name: full
5252
os: ubuntu
5353
conda: "numba scipy xarray tqdm empymod h5py scooby discretize matplotlib"
54-
- python-version: "3.10"
54+
- python-version: "3.11"
5555
name: plain
5656
os: ubuntu
5757
conda: "numba scipy"
58-
- python-version: "3.10"
58+
- python-version: "3.11"
5959
name: full
6060
os: ubuntu
6161
conda: "numba scipy xarray tqdm empymod h5py scooby discretize matplotlib"
@@ -120,7 +120,7 @@ jobs:
120120
- name: Test with pytest
121121
shell: bash -l {0}
122122
run: |
123-
python setup.py install
123+
pip install --no-build-isolation --no-deps .
124124
pytest --cov=emg3d
125125
126126
- name: Coveralls

.github/workflows/macos_windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,5 @@ jobs:
8383
- name: Test with pytest
8484
shell: bash -l {0}
8585
run: |
86-
python setup.py install
86+
pip install --no-build-isolation --no-deps .
8787
pytest

.readthedocs.yml

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ formats: []
1313
python:
1414
version: 3.8
1515
install:
16+
# Temporary workaround to have discretize wheels built.
17+
- requirements: .rtd-requirements.txt
1618
- requirements: requirements-dev.txt
1719
- method: pip
1820
path: .

.rtd-requirements.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Temporary workaround to have discretize wheels built.
2+
numpy
3+
cython
4+

CHANGELOG.rst

+18-3
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,30 @@ Changelog
66
""""""""""
77

88

9-
latest
10-
------
9+
v1.8.2 : convert & pip-full
10+
---------------------------
11+
12+
**2023-05-31**
1113

1214

1315
- ``io``: New function ``convert`` to convert a file that was saved with emg3d
14-
to another file format.
16+
from one file format to another file format.
1517
- Installation through pip has new the option ``pip install emg3d[full]``,
1618
which installs all soft dependencies as well.
1719

20+
- Bumped the minimum requirements to:
21+
22+
- Python 3.8
23+
- NumPy 1.19
24+
- SciPy 1.5
25+
- Numba 0.50
26+
27+
- Bug fixes, small improvements and maintenance
28+
29+
- Testing: added Python 3.11, dropped Python 3.7.
30+
- Adjust copyright notice to only include original year, so it has not to be
31+
adjusted each year.
32+
1833

1934
v1.8.1 : Bugfix ellipse
2035
-----------------------

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
.. image:: https://img.shields.io/conda/v/conda-forge/emg3d.svg
1111
:target: https://anaconda.org/conda-forge/emg3d/
1212
:alt: conda-forge
13-
.. image:: https://img.shields.io/badge/python-3.7+-blue.svg
13+
.. image:: https://img.shields.io/badge/python-3.8+-blue.svg
1414
:target: https://www.python.org/downloads/
1515
:alt: Supported Python Versions
1616
.. image:: https://img.shields.io/badge/platform-linux,win,osx-blue.svg

docs/conf.py

+5-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import time
21
from emg3d import __version__
32

43
# ==== 1. Extensions ====
@@ -57,7 +56,7 @@
5756
# General information about the project.
5857
project = 'emg3d'
5958
author = 'The emsig community'
60-
copyright = f'2018-{time.strftime("%Y")}, {author}'
59+
copyright = f'2018, {author}'
6160

6261
# |version| and |today| tags (|release|-tag is not used).
6362
version = __version__
@@ -103,17 +102,9 @@
103102

104103
# ==== 4. linkcheck ====
105104

106-
# Many journals do not allow the ping (???)
105+
# Many journals do not allow the ping; no idea why. I exclude all DOI's from
106+
# the check; they "should" be permanent, that is their entire purpose; doi.org
107+
# is responsible for resolving them.
107108
linkcheck_ignore = [
108-
'https://doi.org/10.1111/j.1365-246X.2010.04544.x',
109-
'https://doi.org/10.1088/0266-5611/24/3/034012',
110-
'https://doi.org/10.1093/gji/ggab171',
111-
'https://doi.org/10.2528/PIER10052807',
112-
'https://doi.org/10.2528/PIER00080103',
113-
'https://doi.org/10.1137/0731021',
114-
'https://doi.org/10.1137/1.9780898719505',
115-
'https://doi.org/10.1111/j.1365-2478.2010.00899.x',
116-
'https://doi.org/10.1111/j.1365-2478.2006.00558.x',
117-
'https://www.terrasysgeo.com',
118-
'https://www.pygimli.org',
109+
"https://doi.org/10.*",
119110
]

docs/manual/installation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ or via ``pip``:
1313
1414
pip install emg3d
1515
16-
Minimum requirements are Python version 3.7 or higher and the modules ``scipy``
16+
Minimum requirements are Python version 3.8 or higher and the modules ``scipy``
1717
and ``numba``. Various other packages are recommended or required for some
1818
advanced functionalities, namely:
1919

docs/manual/license.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This work is licensed under Attribution 4.0 International (CC-BY-4.0).
1818
License of Code
1919
---------------
2020

21-
Copyright 2018-2023 The emsig community.
21+
Copyright 2018 The emsig community.
2222

2323
Licensed under the Apache License, Version 2.0 (the "License");
2424
you may not use this file except in compliance with the License.

emg3d/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018-2023 The emsig community.
1+
# Copyright 2018 The emsig community.
22
#
33
# This file is part of emg3d.
44
#

emg3d/__main__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018-2023 The emsig community.
1+
# Copyright 2018 The emsig community.
22
#
33
# This file is part of emg3d.
44
#

emg3d/_multiprocessing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Helper routines to call functions with multiprocessing/concurrent.futures.
33
"""
4-
# Copyright 2018-2023 The emsig community.
4+
# Copyright 2018 The emsig community.
55
#
66
# This file is part of emg3d.
77
#

emg3d/cli/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018-2023 The emsig community.
1+
# Copyright 2018 The emsig community.
22
#
33
# This file is part of emg3d.
44
#

emg3d/cli/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Entry point for the command-line interface (CLI).
33
"""
4-
# Copyright 2018-2023 The emsig community.
4+
# Copyright 2018 The emsig community.
55
#
66
# This file is part of emg3d.
77
#

emg3d/cli/parser.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Parser for the configuration file of the command-line interface.
33
"""
4-
# Copyright 2018-2023 The emsig community.
4+
# Copyright 2018 The emsig community.
55
#
66
# This file is part of emg3d.
77
#

emg3d/cli/run.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Functions that actually call emg3d within the CLI interface.
33
"""
4-
# Copyright 2018-2023 The emsig community.
4+
# Copyright 2018 The emsig community.
55
#
66
# This file is part of emg3d.
77
#

emg3d/core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
start, as by far the most time is spent in these functions, particularly in
2121
:func:`solve`.
2222
"""
23-
# Copyright 2018-2023 The emsig community.
23+
# Copyright 2018 The emsig community.
2424
#
2525
# This file is part of emg3d.
2626
#

emg3d/electrodes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Electrodes define any type of sources and receivers used in a survey.
33
"""
4-
# Copyright 2018-2023 The emsig community.
4+
# Copyright 2018 The emsig community.
55
#
66
# This file is part of emg3d.
77
#

emg3d/fields.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
magnetic field, generating the source field; obtaining the fields at receiver
44
locations.
55
"""
6-
# Copyright 2018-2023 The emsig community.
6+
# Copyright 2018 The emsig community.
77
#
88
# This file is part of emg3d.
99
#

emg3d/io.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Utility functions for writing and reading data.
33
"""
4-
# Copyright 2018-2023 The emsig community.
4+
# Copyright 2018 The emsig community.
55
#
66
# This file is part of emg3d.
77
#
@@ -227,8 +227,7 @@ def convert(ifname, ofname, **kwargs):
227227
Parameters
228228
----------
229229
ifname, ofname : str
230-
{Input;Output} file name with absolute or relative path including
231-
suffix, which defines the used data format. Implemented are currently:
230+
{Input;Output} file names (absolute or relative path) including suffix.
232231
233232
"""
234233
data = load(ifname, **kwargs)

emg3d/maps.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
Interpolation routines mapping values between different grids.
77
"""
8-
# Copyright 2018-2023 The emsig community.
8+
# Copyright 2018 The emsig community.
99
#
1010
# This file is part of emg3d.
1111
#

emg3d/meshes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Everything related to meshes appropriate for the multigrid solver.
33
"""
4-
# Copyright 2018-2023 The emsig community.
4+
# Copyright 2018 The emsig community.
55
#
66
# This file is part of emg3d.
77
#

emg3d/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Everything to store electromagnetic material properties for the solver.
33
"""
4-
# Copyright 2018-2023 The emsig community.
4+
# Copyright 2018 The emsig community.
55
#
66
# This file is part of emg3d.
77
#

emg3d/simulations.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
The simulation module combines the different pieces of ``emg3d`` providing
66
a high-level, specialised modelling tool for the end user.
77
"""
8-
# Copyright 2018-2023 The emsig community.
8+
# Copyright 2018 The emsig community.
99
#
1010
# This file is part of emg3d.
1111
#

emg3d/solver.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
and its implementation.
1111
1212
"""
13-
# Copyright 2018-2023 The emsig community.
13+
# Copyright 2018 The emsig community.
1414
#
1515
# This file is part of emg3d.
1616
#

emg3d/surveys.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
A survey stores a set of sources and their frequencies, receivers, and the
33
measured data.
44
"""
5-
# Copyright 2018-2023 The emsig community.
5+
# Copyright 2018 The emsig community.
66
#
77
# This file is part of emg3d.
88
#

emg3d/time.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Functionalities related to time-domain modelling using a frequency-domain code.
33
"""
4-
# Copyright 2018-2023 The emsig community.
4+
# Copyright 2018 The emsig community.
55
#
66
# This file is part of emg3d.
77
#

emg3d/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Utility functions for the multigrid solver.
33
"""
4-
# Copyright 2018-2023 The emsig community.
4+
# Copyright 2018 The emsig community.
55
#
66
# This file is part of emg3d.
77
#

setup.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import sys
55
from setuptools import setup
66

7-
if not sys.version_info[:2] >= (3, 7):
8-
sys.exit(f"emg3d is only meant for Python 3.7 and up.\n"
7+
if not sys.version_info[:2] >= (3, 8):
8+
sys.exit(f"emg3d is only meant for Python 3.8 and up.\n"
99
f"Current version: {sys.version_info[0]}.{sys.version_info[1]}.")
1010

1111
# Get README and remove badges.
@@ -24,20 +24,20 @@
2424
classifiers=[
2525
"Development Status :: 5 - Production/Stable",
2626
"License :: OSI Approved :: Apache Software License",
27-
"Programming Language :: Python :: 3.7",
2827
"Programming Language :: Python :: 3.8",
2928
"Programming Language :: Python :: 3.9",
3029
"Programming Language :: Python :: 3.10",
30+
"Programming Language :: Python :: 3.11",
3131
],
3232
entry_points={
3333
"console_scripts": [
3434
"emg3d=emg3d.cli.main:main",
3535
],
3636
},
37-
python_requires=">=3.7",
37+
python_requires=">=3.8",
3838
install_requires=[
39-
"scipy>=1.4",
40-
"numba>=0.45",
39+
"scipy>=1.5",
40+
"numba>=0.50",
4141
],
4242
extras_require={
4343
'full': [

tests/alternatives.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
not) be easier to understand.
1414
1515
"""
16-
# Copyright 2018-2023 The emsig community.
16+
# Copyright 2018 The emsig community.
1717
#
1818
# This file is part of emg3d.
1919
#

tests/test_cli.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ def test_main(script_runner):
6464
assert "* ERROR :: Config file not found: " in ret.stderr
6565

6666

67-
# Skip test for 3.7, it fails. Not sure why.
67+
# Skip test for minimal, it fails. Not sure why.
6868
# Something multiprocessing/numba/sem_open/synchronization primitives.
6969
@disable_numba()
7070
@pytest.mark.script_launch_mode('subprocess')
71-
@pytest.mark.skipif(sys.version_info < (3, 8), reason="Exclude for Python 3.7")
71+
@pytest.mark.skipif(sys.version_info < (3, 9), reason="Exclude for Python 3.8")
7272
def test_main2(script_runner):
7373

7474
# Test emg3d/__main__.py by calling the folder emg3d.

0 commit comments

Comments
 (0)