AdsorPy 1.2.0__tar.gz → 1.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {adsorpy-1.2.0 → adsorpy-1.2.2}/PKG-INFO +45 -12
- {adsorpy-1.2.0 → adsorpy-1.2.2}/README.md +26 -4
- {adsorpy-1.2.0 → adsorpy-1.2.2}/pyproject.toml +62 -12
- adsorpy-1.2.2/sbom.cdx.json +14368 -0
- {adsorpy-1.2.0 → adsorpy-1.2.2}/src/adsorpy/molecule_lib.py +52 -2
- {adsorpy-1.2.0 → adsorpy-1.2.2}/src/adsorpy/randomsequentialadsorption.py +36 -46
- {adsorpy-1.2.0 → adsorpy-1.2.2}/src/adsorpy/rsa_calculator.py +1 -1
- {adsorpy-1.2.0 → adsorpy-1.2.2}/src/adsorpy/run_simulation.py +3 -3
- adsorpy-1.2.0/.github/ISSUE_TEMPLATE/bug_report.md +0 -32
- adsorpy-1.2.0/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- adsorpy-1.2.0/.github/PULL_REQUEST_TEMPLATE.md +0 -19
- adsorpy-1.2.0/.github/dependabot.yml +0 -38
- adsorpy-1.2.0/.github/workflows/docs-ci.yml +0 -67
- adsorpy-1.2.0/.github/workflows/publish_to_PyPI.yml +0 -49
- adsorpy-1.2.0/.github/workflows/tests-ci.yml +0 -60
- adsorpy-1.2.0/CHANGELOG.md +0 -117
- adsorpy-1.2.0/CODE_OF_CONDUCT.md +0 -128
- adsorpy-1.2.0/CONTRIBUTING.md +0 -151
- adsorpy-1.2.0/SECURITY.md +0 -48
- adsorpy-1.2.0/docs/Makefile +0 -20
- adsorpy-1.2.0/docs/make.bat +0 -35
- adsorpy-1.2.0/docs/source/adsorpy.molecule_lib.rst +0 -7
- adsorpy-1.2.0/docs/source/adsorpy.randomsequentialadsorption.rst +0 -7
- adsorpy-1.2.0/docs/source/adsorpy.rsa_calculator.rst +0 -7
- adsorpy-1.2.0/docs/source/adsorpy.rsa_config.rst +0 -7
- adsorpy-1.2.0/docs/source/adsorpy.rst +0 -20
- adsorpy-1.2.0/docs/source/adsorpy.run_simulation.rst +0 -7
- adsorpy-1.2.0/docs/source/adsorpy.typing.rst +0 -7
- adsorpy-1.2.0/docs/source/conf.py +0 -110
- adsorpy-1.2.0/docs/source/index.rst +0 -21
- adsorpy-1.2.0/docs/source/modules.rst +0 -7
- adsorpy-1.2.0/images/AdsorPy_Covered_Surface.png +0 -0
- adsorpy-1.2.0/py.typed +0 -0
- adsorpy-1.2.0/src/__init__.py +0 -0
- adsorpy-1.2.0/src/__main__.py +0 -8
- adsorpy-1.2.0/tests/__init__.py +0 -0
- adsorpy-1.2.0/tests/rsa_test.py +0 -659
- adsorpy-1.2.0/tests/run_simulation_test.py +0 -392
- adsorpy-1.2.0/tests/test_data/config_test_hard.json +0 -56
- adsorpy-1.2.0/tests/test_data/config_test_periodic.json +0 -56
- adsorpy-1.2.0/tests/test_data/config_test_soft.json +0 -56
- adsorpy-1.2.0/tox.toml +0 -35
- {adsorpy-1.2.0 → adsorpy-1.2.2}/LICENSE.md +0 -0
- {adsorpy-1.2.0 → adsorpy-1.2.2}/src/adsorpy/VdW_Radii.csv +0 -0
- {adsorpy-1.2.0 → adsorpy-1.2.2}/src/adsorpy/__init__.py +0 -0
- {adsorpy-1.2.0 → adsorpy-1.2.2}/src/adsorpy/config.json +0 -0
- {adsorpy-1.2.0 → adsorpy-1.2.2}/src/adsorpy/molecule_colour.json +0 -0
- {adsorpy-1.2.0 → adsorpy-1.2.2}/src/adsorpy/rsa_config.py +0 -0
- /adsorpy-1.2.0/src/adsorpy/typing.py → /adsorpy-1.2.2/src/adsorpy/types.py +0 -0
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: adsorpy
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.2
|
|
4
4
|
Summary: Random sequential adsorption (RSA) simulation, 2D lattice-based.
|
|
5
5
|
Project-URL: github, https://github.com/JoostFWMaas/AdsorPy
|
|
6
6
|
Project-URL: Documentation, https://joostfwmaas.github.io/AdsorPy
|
|
7
7
|
Project-URL: Changelog, https://github.com/JoostFWMaas/AdsorPy/blob/main/CHANGELOG.md
|
|
8
|
+
Project-URL: homepage, https://pypi.org/project/adsorpy/
|
|
9
|
+
Project-URL: issues, https://github.com/JoostFWMaas/AdsorPy/issues
|
|
10
|
+
Project-URL: download, https://pypi.org/project/adsorpy/#files
|
|
8
11
|
Author-email: "J.F.W. Maas" <j.f.w.maas@tue.nl>
|
|
9
12
|
License-Expression: MIT
|
|
10
13
|
License-File: LICENSE.md
|
|
@@ -32,34 +35,47 @@ Classifier: Typing :: Typed
|
|
|
32
35
|
Requires-Python: >=3.10
|
|
33
36
|
Requires-Dist: matplotlib>=3.10.9
|
|
34
37
|
Requires-Dist: numba>=0.65.1
|
|
35
|
-
Requires-Dist: numpy>=2.2.6
|
|
36
|
-
Requires-Dist:
|
|
38
|
+
Requires-Dist: numpy>=2.2.6
|
|
39
|
+
Requires-Dist: pydantic>=2.13.4
|
|
37
40
|
Requires-Dist: rtree>=1.4.1
|
|
38
41
|
Requires-Dist: shapely>=2.1.2
|
|
42
|
+
Provides-Extra: dev-misc
|
|
43
|
+
Requires-Dist: build>=1.5.0; extra == 'dev-misc'
|
|
44
|
+
Requires-Dist: check-wheel-contents>=0.6.3; extra == 'dev-misc'
|
|
45
|
+
Requires-Dist: twine>=6.0; extra == 'dev-misc'
|
|
39
46
|
Provides-Extra: docs
|
|
40
47
|
Requires-Dist: furo>=2025.12.19; extra == 'docs'
|
|
41
|
-
Requires-Dist: sphinx-autodoc-typehints>=3.
|
|
42
|
-
Requires-Dist: sphinx-design>=0.
|
|
48
|
+
Requires-Dist: sphinx-autodoc-typehints>=3.0; extra == 'docs'
|
|
49
|
+
Requires-Dist: sphinx-design>=0.6.0; extra == 'docs'
|
|
43
50
|
Requires-Dist: sphinx-pyproject>=0.3.0; extra == 'docs'
|
|
44
|
-
Requires-Dist: sphinx>=
|
|
51
|
+
Requires-Dist: sphinx>=8.0; extra == 'docs'
|
|
52
|
+
Provides-Extra: envs
|
|
53
|
+
Requires-Dist: tox-uv>=1.35.2; extra == 'envs'
|
|
54
|
+
Requires-Dist: tox>=4.54; extra == 'envs'
|
|
45
55
|
Provides-Extra: lint
|
|
46
56
|
Requires-Dist: mypy>=2.0.0; extra == 'lint'
|
|
47
57
|
Requires-Dist: pyright>=1.1.409; extra == 'lint'
|
|
48
58
|
Requires-Dist: ruff>=0.15.12; extra == 'lint'
|
|
59
|
+
Requires-Dist: slotscheck>=0.19.1; extra == 'lint'
|
|
60
|
+
Requires-Dist: tach>=0.34.1; extra == 'lint'
|
|
49
61
|
Provides-Extra: test
|
|
50
62
|
Requires-Dist: codecov>=2.1.13; extra == 'test'
|
|
51
63
|
Requires-Dist: hypothesis>=6.152.4; extra == 'test'
|
|
52
64
|
Requires-Dist: pytest-cov>=7.1.0; extra == 'test'
|
|
53
65
|
Requires-Dist: pytest>=9.0.3; extra == 'test'
|
|
54
|
-
Requires-Dist: scipy
|
|
55
|
-
Requires-Dist: scipy>=1.17.1; (python_version >= '3.11') and extra == 'test'
|
|
66
|
+
Requires-Dist: scipy>=1.15.3; extra == 'test'
|
|
56
67
|
Description-Content-Type: text/markdown
|
|
57
68
|
|
|
58
69
|
# AdsorPy
|
|
59
70
|
|
|
60
|
-
](https://pypi.python.org/pypi/adsorpy) <!-- [](https://anaconda.org/conda-forge/adsorpy) -->
|
|
61
72
|

|
|
73
|
+
[](https://joostfwmaas.github.io/AdsorPy/)
|
|
62
74
|
[](https://codecov.io/github/JoostFWMaas/AdsorPy)
|
|
75
|
+
[](https://scorecard.dev/viewer/?uri=github.com/JoostFWMaas/AdsorPy)
|
|
76
|
+
[](https://www.bestpractices.dev/projects/12810)
|
|
77
|
+
[](https://www.bestpractices.dev/projects/12810)
|
|
78
|
+
|
|
63
79
|
|
|
64
80
|
Lattice-based random sequential adsorption (RSA) Python 3.10+ script.
|
|
65
81
|
|
|
@@ -70,16 +86,31 @@ is found, or until the list is exhausted.
|
|
|
70
86
|
All available sites are checked, and various metrics can be extracted afterwards such as the coverage, covered area, and
|
|
71
87
|
gap size distribution.
|
|
72
88
|
|
|
89
|
+
<img src="https://raw.githubusercontent.com/JoostFWMaas/AdsorPy/ccedff9c0a4cca1e89c4d461dbfeb91c49e38b21/images/AdsorPy_Covered_Surface.png" alt="Output of an AdsorPy run, an image of a covered surface." style="width:50%; height:auto;">
|
|
90
|
+
|
|
73
91
|
## How to use
|
|
74
92
|
|
|
93
|
+
This package can be found on PyPI as [adsorpy](https://pypi.org/project/adsorpy/), so we recommend the following:
|
|
94
|
+
```bash
|
|
95
|
+
pip install adsorpy
|
|
96
|
+
```
|
|
97
|
+
|
|
75
98
|
Run the `adsorpy.main` in order to run a simple single run using the standard disk-shaped molecule on hexagonal aluminium oxide.
|
|
76
99
|
New molecules can be created by running the `adsorpy.molecule_lib` or by calling the `adsorpy.molecule_lib.first_time_loader()` function. Molecules can be generated from `.xyz` files. It is
|
|
77
100
|
recommended to run `adsorpy.molecule_lib` directly from command line to define the molecule orientation, then store the new
|
|
78
101
|
molecule string for repeated use.
|
|
79
102
|
|
|
80
103
|
Run the `adsorpy.run_simulation.run_simulation()` function with the molecule footprints generated in the previous step. Output can be printed to stdout, plotted, and saved.
|
|
104
|
+
An example for dog-bone molecules with rotations of 360 // 12 = 30 degrees:
|
|
105
|
+
```python
|
|
106
|
+
from adsorpy.run_simulation import run_simulation
|
|
107
|
+
from adsorpy.molecule_lib import dogbonium
|
|
108
|
+
molecule = dogbonium()
|
|
109
|
+
output = run_simulation(molecules_list=molecule, rotation_counts=12, plot_output_flag=True)
|
|
110
|
+
```
|
|
111
|
+
|
|
81
112
|
|
|
82
|
-
User
|
|
113
|
+
User-friendliness will be updated at a later stage, allowing the user to define simulation modes, surfaces, and
|
|
83
114
|
molecules more easily.
|
|
84
115
|
|
|
85
116
|
Documentation (generated with `sphinx`): https://joostfwmaas.github.io/AdsorPy/
|
|
@@ -94,13 +125,15 @@ Because AdsorPy has been made with scientific rigour in mind, the package is tes
|
|
|
94
125
|
- Unit tests (`pytest`) of the code ensure correct behaviour for expected input.
|
|
95
126
|
- Property tests (`hypothesis`) of the most critical code components ensure correct behaviour for unexpected input as well.
|
|
96
127
|
- `mypy` (in `--strict` mode) and `pyright` (`strict`) ensure that the package is correctly-typed, as if it were static. The `py.typed` file, a promise that the code is type-hinted properly, is added because the code passes this test.
|
|
97
|
-
- `ruff` is used as a linter with almost all rules enabled (see the pyproject.toml for the list of exclusions and reasons).
|
|
128
|
+
- `ruff` is used as a linter with almost all rules enabled (see the `pyproject.toml` for the list of exclusions and reasons).
|
|
129
|
+
- `slotscheck` ensures that all dataclass slots are set up correctly.
|
|
130
|
+
- `tach` ensures that internal dependencies are handled correctly (from low level to high), preventing circular dependencies.
|
|
98
131
|
- `tox` is used to run all of the aforementioned tests in parallel for multiple Python versions to ensure correct behaviour.
|
|
99
132
|
- CI is used for automated testing.
|
|
100
133
|
|
|
101
134
|
The package also makes use of an optional config file that falls back on standard behaviour, because configs are often used in scientific software (set-and-forget).
|
|
102
135
|
|
|
103
|
-
|
|
136
|
+
## Openness and academic collaboration
|
|
104
137
|
|
|
105
138
|
The script was made public for the sake of openness and academic collaboration. Please let me know if you have questions about the script, or if you have discovered any issues/bugs.
|
|
106
139
|
At the end of this file, I will place a list of papers that make use of this work. Feel free to contact me if you want your work to be added to the list as well.
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
# AdsorPy
|
|
2
2
|
|
|
3
|
-
](https://pypi.python.org/pypi/adsorpy) <!-- [](https://anaconda.org/conda-forge/adsorpy) -->
|
|
4
4
|

|
|
5
|
+
[](https://joostfwmaas.github.io/AdsorPy/)
|
|
5
6
|
[](https://codecov.io/github/JoostFWMaas/AdsorPy)
|
|
7
|
+
[](https://scorecard.dev/viewer/?uri=github.com/JoostFWMaas/AdsorPy)
|
|
8
|
+
[](https://www.bestpractices.dev/projects/12810)
|
|
9
|
+
[](https://www.bestpractices.dev/projects/12810)
|
|
10
|
+
|
|
6
11
|
|
|
7
12
|
Lattice-based random sequential adsorption (RSA) Python 3.10+ script.
|
|
8
13
|
|
|
@@ -13,16 +18,31 @@ is found, or until the list is exhausted.
|
|
|
13
18
|
All available sites are checked, and various metrics can be extracted afterwards such as the coverage, covered area, and
|
|
14
19
|
gap size distribution.
|
|
15
20
|
|
|
21
|
+
<img src="https://raw.githubusercontent.com/JoostFWMaas/AdsorPy/ccedff9c0a4cca1e89c4d461dbfeb91c49e38b21/images/AdsorPy_Covered_Surface.png" alt="Output of an AdsorPy run, an image of a covered surface." style="width:50%; height:auto;">
|
|
22
|
+
|
|
16
23
|
## How to use
|
|
17
24
|
|
|
25
|
+
This package can be found on PyPI as [adsorpy](https://pypi.org/project/adsorpy/), so we recommend the following:
|
|
26
|
+
```bash
|
|
27
|
+
pip install adsorpy
|
|
28
|
+
```
|
|
29
|
+
|
|
18
30
|
Run the `adsorpy.main` in order to run a simple single run using the standard disk-shaped molecule on hexagonal aluminium oxide.
|
|
19
31
|
New molecules can be created by running the `adsorpy.molecule_lib` or by calling the `adsorpy.molecule_lib.first_time_loader()` function. Molecules can be generated from `.xyz` files. It is
|
|
20
32
|
recommended to run `adsorpy.molecule_lib` directly from command line to define the molecule orientation, then store the new
|
|
21
33
|
molecule string for repeated use.
|
|
22
34
|
|
|
23
35
|
Run the `adsorpy.run_simulation.run_simulation()` function with the molecule footprints generated in the previous step. Output can be printed to stdout, plotted, and saved.
|
|
36
|
+
An example for dog-bone molecules with rotations of 360 // 12 = 30 degrees:
|
|
37
|
+
```python
|
|
38
|
+
from adsorpy.run_simulation import run_simulation
|
|
39
|
+
from adsorpy.molecule_lib import dogbonium
|
|
40
|
+
molecule = dogbonium()
|
|
41
|
+
output = run_simulation(molecules_list=molecule, rotation_counts=12, plot_output_flag=True)
|
|
42
|
+
```
|
|
43
|
+
|
|
24
44
|
|
|
25
|
-
User
|
|
45
|
+
User-friendliness will be updated at a later stage, allowing the user to define simulation modes, surfaces, and
|
|
26
46
|
molecules more easily.
|
|
27
47
|
|
|
28
48
|
Documentation (generated with `sphinx`): https://joostfwmaas.github.io/AdsorPy/
|
|
@@ -37,13 +57,15 @@ Because AdsorPy has been made with scientific rigour in mind, the package is tes
|
|
|
37
57
|
- Unit tests (`pytest`) of the code ensure correct behaviour for expected input.
|
|
38
58
|
- Property tests (`hypothesis`) of the most critical code components ensure correct behaviour for unexpected input as well.
|
|
39
59
|
- `mypy` (in `--strict` mode) and `pyright` (`strict`) ensure that the package is correctly-typed, as if it were static. The `py.typed` file, a promise that the code is type-hinted properly, is added because the code passes this test.
|
|
40
|
-
- `ruff` is used as a linter with almost all rules enabled (see the pyproject.toml for the list of exclusions and reasons).
|
|
60
|
+
- `ruff` is used as a linter with almost all rules enabled (see the `pyproject.toml` for the list of exclusions and reasons).
|
|
61
|
+
- `slotscheck` ensures that all dataclass slots are set up correctly.
|
|
62
|
+
- `tach` ensures that internal dependencies are handled correctly (from low level to high), preventing circular dependencies.
|
|
41
63
|
- `tox` is used to run all of the aforementioned tests in parallel for multiple Python versions to ensure correct behaviour.
|
|
42
64
|
- CI is used for automated testing.
|
|
43
65
|
|
|
44
66
|
The package also makes use of an optional config file that falls back on standard behaviour, because configs are often used in scientific software (set-and-forget).
|
|
45
67
|
|
|
46
|
-
|
|
68
|
+
## Openness and academic collaboration
|
|
47
69
|
|
|
48
70
|
The script was made public for the sake of openness and academic collaboration. Please let me know if you have questions about the script, or if you have discovered any issues/bugs.
|
|
49
71
|
At the end of this file, I will place a list of papers that make use of this work. Feel free to contact me if you want your work to be added to the list as well.
|
|
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "adsorpy"
|
|
7
7
|
#dynamic = ["version"] # The Python guide says that this will use the Git tag to fill it in.
|
|
8
|
-
version = "1.2.
|
|
8
|
+
version = "1.2.2" # The Python guide says that this will use the Git tag to fill it in.
|
|
9
9
|
description = "Random sequential adsorption (RSA) simulation, 2D lattice-based."
|
|
10
10
|
authors = [{ name = "J.F.W. Maas", email = "j.f.w.maas@tue.nl" }]
|
|
11
11
|
readme = "README.md"
|
|
@@ -57,11 +57,11 @@ keywords = [
|
|
|
57
57
|
]
|
|
58
58
|
|
|
59
59
|
dependencies = [
|
|
60
|
-
"numpy>=2.2.6
|
|
61
|
-
"numpy>=2.4.4; python_version>='3.11'",
|
|
60
|
+
"numpy>=2.2.6",
|
|
62
61
|
"numba>=0.65.1",
|
|
63
62
|
"matplotlib>=3.10.9",
|
|
64
63
|
"shapely>=2.1.2",
|
|
64
|
+
"pydantic>=2.13.4",
|
|
65
65
|
"rtree>=1.4.1",
|
|
66
66
|
]
|
|
67
67
|
|
|
@@ -70,32 +70,70 @@ test = [
|
|
|
70
70
|
"pytest>=9.0.3",
|
|
71
71
|
"pytest-cov>=7.1.0",
|
|
72
72
|
"hypothesis>=6.152.4",
|
|
73
|
-
"scipy
|
|
74
|
-
"scipy>=1.17.1; python_version>='3.11'",
|
|
73
|
+
"scipy>=1.15.3",
|
|
75
74
|
"codecov>=2.1.13",
|
|
76
75
|
]
|
|
77
76
|
lint = [
|
|
78
77
|
"mypy>=2.0.0",
|
|
79
78
|
"ruff>=0.15.12",
|
|
80
79
|
"pyright>=1.1.409",
|
|
80
|
+
"tach>=0.34.1",
|
|
81
|
+
"slotscheck>=0.19.1",
|
|
81
82
|
]
|
|
82
83
|
docs = [
|
|
83
|
-
"sphinx>=
|
|
84
|
+
"sphinx>=8.0",
|
|
84
85
|
"furo>=2025.12.19",
|
|
85
|
-
"sphinx_design>=0.
|
|
86
|
-
"sphinx-autodoc-typehints>=3.
|
|
86
|
+
"sphinx_design>=0.6.0",
|
|
87
|
+
"sphinx-autodoc-typehints>=3.0",
|
|
87
88
|
"sphinx-pyproject>=0.3.0",
|
|
88
89
|
]
|
|
90
|
+
envs = [
|
|
91
|
+
"tox>=4.54",
|
|
92
|
+
"tox-uv>=1.35.2",
|
|
93
|
+
]
|
|
94
|
+
dev-misc = [
|
|
95
|
+
"build>=1.5.0",
|
|
96
|
+
"twine>=6.0",
|
|
97
|
+
"check-wheel-contents>=0.6.3",
|
|
98
|
+
]
|
|
89
99
|
|
|
90
100
|
[project.urls]
|
|
91
101
|
github = "https://github.com/JoostFWMaas/AdsorPy"
|
|
92
102
|
Documentation = "https://joostfwmaas.github.io/AdsorPy"
|
|
93
103
|
Changelog = "https://github.com/JoostFWMaas/AdsorPy/blob/main/CHANGELOG.md"
|
|
94
|
-
|
|
104
|
+
homepage = "https://pypi.org/project/adsorpy/"
|
|
105
|
+
issues = "https://github.com/JoostFWMaas/AdsorPy/issues"
|
|
106
|
+
download = "https://pypi.org/project/adsorpy/#files"
|
|
95
107
|
|
|
96
108
|
[tool.hatch.package_data]
|
|
97
109
|
"adsorpy" = ["py.typed"]
|
|
98
110
|
|
|
111
|
+
[tool.hatch.build]
|
|
112
|
+
#include = ["src/**"]
|
|
113
|
+
#only-packages = true
|
|
114
|
+
deterministic = true
|
|
115
|
+
|
|
116
|
+
[tool.hatch.build.targets.wheel]
|
|
117
|
+
sbom-files = ["sbom.cdx.json"]
|
|
118
|
+
packages = ["src/adsorpy"]
|
|
119
|
+
|
|
120
|
+
[tool.hatch.build.targets.sdist]
|
|
121
|
+
include = [
|
|
122
|
+
"/src/adsorpy",
|
|
123
|
+
"/pyproject.toml",
|
|
124
|
+
"README.md",
|
|
125
|
+
"/LICENSE",
|
|
126
|
+
"sbom.cdx.json",
|
|
127
|
+
]
|
|
128
|
+
|
|
129
|
+
[tool.hatch.env]
|
|
130
|
+
requires = [
|
|
131
|
+
"hatch-pip-compile"
|
|
132
|
+
]
|
|
133
|
+
|
|
134
|
+
[tool.hatch.envs.default]
|
|
135
|
+
type = "pip-compile"
|
|
136
|
+
|
|
99
137
|
[tool.pytest.ini_options]
|
|
100
138
|
testpaths = ["tests"]
|
|
101
139
|
pythonpath = ["src/adsorpy"]
|
|
@@ -132,7 +170,6 @@ exclude_also = [
|
|
|
132
170
|
"@njit", # Compiled code is not seen by coverage. This code is tested with Hypothesis though. False negative.
|
|
133
171
|
]
|
|
134
172
|
|
|
135
|
-
|
|
136
173
|
[tool.mypy]
|
|
137
174
|
mypy_path = ["src", "optional", "tests"]
|
|
138
175
|
ignore_missing_imports = true
|
|
@@ -141,7 +178,12 @@ disallow_any_explicit = true
|
|
|
141
178
|
#disallow_any_decorated = true # Throws an error because geo.Polygon in a tuple is turned into Any for the @staticmethod.
|
|
142
179
|
#warn_unreachable = true # Set this to true when pushing to main?
|
|
143
180
|
exclude = ['/Scripts']
|
|
181
|
+
plugins = ["pydantic.mypy"]
|
|
144
182
|
|
|
183
|
+
[tool.pydantic-mypy]
|
|
184
|
+
init_forbid_extra = true
|
|
185
|
+
init_typed = true
|
|
186
|
+
warn_required_dynamic_aliases = true
|
|
145
187
|
|
|
146
188
|
[tool.flake8]
|
|
147
189
|
max-line-length = 120
|
|
@@ -193,7 +235,6 @@ pylint.max-statements = 80
|
|
|
193
235
|
mccabe.max-complexity = 20
|
|
194
236
|
future-annotations = true # Future annotations enabled.
|
|
195
237
|
|
|
196
|
-
|
|
197
238
|
ignore = [
|
|
198
239
|
"ERA001",
|
|
199
240
|
"TD",
|
|
@@ -206,13 +247,14 @@ ignore = [
|
|
|
206
247
|
"ARG001", # Unused function argument.
|
|
207
248
|
"D203", # Conflicts with D211: no blank line before class.
|
|
208
249
|
"D213", # Conflicts with D212: multi-line summary first line.
|
|
209
|
-
# "DOC",
|
|
210
250
|
]
|
|
211
251
|
|
|
212
252
|
[tool.ruff.lint.per-file-ignores]
|
|
213
253
|
"__init__.py" = ["D104"] # Missing docstring in public package. Not needed, package is empty.
|
|
214
254
|
"test*.py" = ["S101", "TC"] # Assert should not be used in production code! But this is test code, so here it is expected.
|
|
215
255
|
|
|
256
|
+
[tool.ruff.lint.flake8-type-checking]
|
|
257
|
+
runtime-evaluated-decorators = ["pydantic.dataclasses.dataclass"]
|
|
216
258
|
|
|
217
259
|
[tool.pyright]
|
|
218
260
|
include = ["src", "tests"]
|
|
@@ -238,3 +280,11 @@ reportPrivateUsage = "warning"
|
|
|
238
280
|
reportUnnecessaryTypeIgnoreComment = "warning"
|
|
239
281
|
reportUnnecessaryComparison = "warning" # These are usually included to prevent the user from breaking things.
|
|
240
282
|
|
|
283
|
+
[tool.slotscheck]
|
|
284
|
+
strict-imports = true
|
|
285
|
+
include-modules = """
|
|
286
|
+
(
|
|
287
|
+
src
|
|
288
|
+
# |tests
|
|
289
|
+
)
|
|
290
|
+
"""
|