AdsorPy 1.1.5__tar.gz → 1.2.1__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.1.5 → adsorpy-1.2.1}/.github/PULL_REQUEST_TEMPLATE.md +2 -2
- {adsorpy-1.1.5 → adsorpy-1.2.1}/.github/workflows/docs-ci.yml +1 -1
- {adsorpy-1.1.5 → adsorpy-1.2.1}/.github/workflows/tests-ci.yml +3 -3
- {adsorpy-1.1.5 → adsorpy-1.2.1}/CHANGELOG.md +30 -2
- {adsorpy-1.1.5 → adsorpy-1.2.1}/PKG-INFO +34 -11
- {adsorpy-1.1.5 → adsorpy-1.2.1}/README.md +25 -9
- {adsorpy-1.1.5 → adsorpy-1.2.1}/docs/source/adsorpy.rst +1 -0
- adsorpy-1.2.1/docs/source/adsorpy.typing.rst +7 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/docs/source/conf.py +14 -2
- {adsorpy-1.1.5 → adsorpy-1.2.1}/docs/source/index.rst +1 -1
- {adsorpy-1.1.5 → adsorpy-1.2.1}/pyproject.toml +52 -27
- {adsorpy-1.1.5 → adsorpy-1.2.1}/src/adsorpy/molecule_lib.py +71 -73
- {adsorpy-1.1.5 → adsorpy-1.2.1}/src/adsorpy/randomsequentialadsorption.py +99 -110
- {adsorpy-1.1.5 → adsorpy-1.2.1}/src/adsorpy/rsa_calculator.py +66 -61
- {adsorpy-1.1.5 → adsorpy-1.2.1}/src/adsorpy/rsa_config.py +1 -1
- {adsorpy-1.1.5 → adsorpy-1.2.1}/src/adsorpy/run_simulation.py +118 -132
- adsorpy-1.2.1/src/adsorpy/typing.py +39 -0
- adsorpy-1.2.1/tach.toml +35 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/tests/rsa_test.py +8 -29
- {adsorpy-1.1.5 → adsorpy-1.2.1}/tests/run_simulation_test.py +14 -13
- adsorpy-1.2.1/tox.toml +44 -0
- adsorpy-1.1.5/tox.toml +0 -30
- {adsorpy-1.1.5 → adsorpy-1.2.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/.github/dependabot.yml +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/.github/workflows/publish_to_PyPI.yml +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/CODE_OF_CONDUCT.md +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/CONTRIBUTING.md +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/LICENSE.md +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/SECURITY.md +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/docs/Makefile +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/docs/make.bat +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/docs/source/adsorpy.molecule_lib.rst +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/docs/source/adsorpy.randomsequentialadsorption.rst +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/docs/source/adsorpy.rsa_calculator.rst +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/docs/source/adsorpy.rsa_config.rst +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/docs/source/adsorpy.run_simulation.rst +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/docs/source/modules.rst +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/images/AdsorPy_Covered_Surface.png +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/py.typed +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/src/__init__.py +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/src/__main__.py +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/src/adsorpy/VdW_Radii.csv +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/src/adsorpy/__init__.py +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/src/adsorpy/config.json +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/src/adsorpy/molecule_colour.json +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/tests/__init__.py +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/tests/test_data/config_test_hard.json +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/tests/test_data/config_test_periodic.json +0 -0
- {adsorpy-1.1.5 → adsorpy-1.2.1}/tests/test_data/config_test_soft.json +0 -0
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
### New Feature Submissions:
|
|
9
9
|
|
|
10
|
-
1. [ ] Does your submission pass tests?
|
|
10
|
+
1. [ ] Does your submission pass all ``pytest`` tests?
|
|
11
11
|
2. [ ] Have you lint your code locally before submission?
|
|
12
|
-
3. [ ] Does your code pass the ``mypy`` and ``ruff`` checks?
|
|
12
|
+
3. [ ] Does your code pass the ``mypy``, ``pyright``, ``tach``, ``slotscheck``, and ``ruff`` checks?
|
|
13
13
|
|
|
14
14
|
### Changes to Core Features:
|
|
15
15
|
|
|
@@ -33,13 +33,13 @@ jobs:
|
|
|
33
33
|
run: python -m pip install --upgrade pip
|
|
34
34
|
|
|
35
35
|
- name: Install tox and plugins
|
|
36
|
-
run: pip install tox tox-gh
|
|
36
|
+
run: pip install tox tox-gh
|
|
37
37
|
|
|
38
38
|
- name: Run tests with tox
|
|
39
|
-
run: tox
|
|
39
|
+
run: tox
|
|
40
40
|
|
|
41
41
|
- name: Upload test results
|
|
42
|
-
if: always() && matrix.python-version == '3.
|
|
42
|
+
if: always() && matrix.python-version == '3.14'
|
|
43
43
|
uses: actions/upload-artifact@v7
|
|
44
44
|
with:
|
|
45
45
|
name: junit-results
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
All important changes to ``AdsorPy`` will be documented in this file.
|
|
3
3
|
|
|
4
|
-
This format is based on [Keep a Changelog](http://keepachangelog.com/)
|
|
4
|
+
This format is based on [Keep a Changelog](http://keepachangelog.com/). This project adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
## [unreleased]
|
|
@@ -10,8 +10,31 @@ This format is based on [Keep a Changelog](http://keepachangelog.com/) and this
|
|
|
10
10
|
### Fixed
|
|
11
11
|
### Removed
|
|
12
12
|
|
|
13
|
+
## 1.2.1 - 2026-05-08
|
|
14
|
+
### Added
|
|
15
|
+
- Add ``tach`` for internal dependency sanitation.
|
|
16
|
+
- Add ``slotscheck`` to ensure correct use of slots in dataclasses.
|
|
17
|
+
- Add ``pydantic`` to ensure correctness of ``config.json``.
|
|
18
|
+
- Add intersphinx mapping for ``pydantic``, ``shapely``, ``numba``, ``matplotlib``, and ``rtree``.
|
|
19
|
+
### Changed
|
|
20
|
+
- Change lint checking version of Python from 3.13 to 3.14.
|
|
21
|
+
### Fixed
|
|
22
|
+
- Reduce the complexity of the ``tests-ci.yml`` and ``tox.toml``.
|
|
23
|
+
### Removed
|
|
24
|
+
|
|
25
|
+
## 1.2.0 - 2026-05-06
|
|
26
|
+
### Added
|
|
27
|
+
- Add ``pyright`` linting in strict mode.
|
|
28
|
+
- Add ``typing.py``.
|
|
29
|
+
### Changed
|
|
30
|
+
- Move all ``TypeAlias`` to the new ``typing.py``.
|
|
31
|
+
### Fixed
|
|
32
|
+
- Fix flux: was an ``np.ndarray``, is now a tuple of arrays. Beware: this changes the type of that return value of ``run_simulation()``.
|
|
33
|
+
### Removed
|
|
34
|
+
|
|
13
35
|
## 1.1.5 - 2026-05-04
|
|
14
36
|
### Added
|
|
37
|
+
- Installation can now use ``[test]``, ``[lint]``, and ``[docs]`` as optional dependencies.
|
|
15
38
|
- Add final ``ci-success`` step to the ``tests-ci.yml``.
|
|
16
39
|
- Add ``dependabot.yml`` with permission for minor/patch update pull requests.
|
|
17
40
|
- Add ``CODE_OF_CONDUCT.md``.
|
|
@@ -21,11 +44,16 @@ This format is based on [Keep a Changelog](http://keepachangelog.com/) and this
|
|
|
21
44
|
- Change ``test-ci.yml`` order: first on pull_requests, then push. Change push filter from paths to paths-ignore. Now ignores all ``.md`` files and everything in docs. Tests run whenever anything else is changed. Also puts ``main`` on ignore for push. Direct pushing to ``main`` is not allowed, and not ignoring ``main`` would result in duplicate tests.
|
|
22
45
|
- Lower ``test_gapsize_analysis()`` in ``rsa_test.py`` to 100.
|
|
23
46
|
- Change parametrised tests in ``rsa_tests.py`` to improve readability of code and test results.
|
|
24
|
-
- Move from ``tox.ini`` to ``tox.toml``.
|
|
47
|
+
- Move from ``tox.ini`` to ``tox.toml``.
|
|
25
48
|
### Fixed
|
|
26
49
|
- Fix potential vulnerabilities in the CI by reducing the scope of permissions.
|
|
27
50
|
- All tests are now ``mypy`` and ``ruff`` compliant.
|
|
51
|
+
- Fix the link to the adsorpy image. The image can now be seen on PyPI.
|
|
28
52
|
### Removed
|
|
53
|
+
- ``requirements.txt``
|
|
54
|
+
- ``requirements_dev.txt``
|
|
55
|
+
- ``requirements_lint.txt``
|
|
56
|
+
- ``requirements_docs.txt``
|
|
29
57
|
|
|
30
58
|
## 1.1.4 - 2026-04-28
|
|
31
59
|
### Added
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: adsorpy
|
|
3
|
-
Version: 1.1
|
|
3
|
+
Version: 1.2.1
|
|
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
|
|
@@ -34,6 +37,7 @@ Requires-Dist: matplotlib>=3.10.9
|
|
|
34
37
|
Requires-Dist: numba>=0.65.1
|
|
35
38
|
Requires-Dist: numpy>=2.2.6; python_version == '3.10'
|
|
36
39
|
Requires-Dist: numpy>=2.4.4; python_version >= '3.11'
|
|
40
|
+
Requires-Dist: pydantic>=2.13.4
|
|
37
41
|
Requires-Dist: rtree>=1.4.1
|
|
38
42
|
Requires-Dist: shapely>=2.1.2
|
|
39
43
|
Provides-Extra: docs
|
|
@@ -43,8 +47,11 @@ Requires-Dist: sphinx-design>=0.7.0; extra == 'docs'
|
|
|
43
47
|
Requires-Dist: sphinx-pyproject>=0.3.0; extra == 'docs'
|
|
44
48
|
Requires-Dist: sphinx>=9.1.0; extra == 'docs'
|
|
45
49
|
Provides-Extra: lint
|
|
46
|
-
Requires-Dist: mypy>=
|
|
50
|
+
Requires-Dist: mypy>=2.0.0; extra == 'lint'
|
|
51
|
+
Requires-Dist: pyright>=1.1.409; extra == 'lint'
|
|
47
52
|
Requires-Dist: ruff>=0.15.12; extra == 'lint'
|
|
53
|
+
Requires-Dist: slotscheck>=0.19.1; extra == 'lint'
|
|
54
|
+
Requires-Dist: tach>=0.34.1; extra == 'lint'
|
|
48
55
|
Provides-Extra: test
|
|
49
56
|
Requires-Dist: codecov>=2.1.13; extra == 'test'
|
|
50
57
|
Requires-Dist: hypothesis>=6.152.4; extra == 'test'
|
|
@@ -56,12 +63,13 @@ Description-Content-Type: text/markdown
|
|
|
56
63
|
|
|
57
64
|
# AdsorPy
|
|
58
65
|
|
|
59
|
-

|
|
60
66
|

|
|
61
67
|
[](https://codecov.io/github/JoostFWMaas/AdsorPy)
|
|
62
68
|
|
|
63
69
|
Lattice-based random sequential adsorption (RSA) Python 3.10+ script.
|
|
64
70
|
|
|
71
|
+
<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;">
|
|
72
|
+
|
|
65
73
|
In RSA, molecules arrive one by one at a surface. Adsorption takes place if the molecule does not overlap with molecules
|
|
66
74
|
already on the surface.
|
|
67
75
|
The list of available orientations for the molecule is traversed in random order until the first orientation that fits
|
|
@@ -71,17 +79,30 @@ gap size distribution.
|
|
|
71
79
|
|
|
72
80
|
## How to use
|
|
73
81
|
|
|
82
|
+
The easiest way to run this package:
|
|
83
|
+
```bash
|
|
84
|
+
pip install adsorpy
|
|
85
|
+
```
|
|
86
|
+
|
|
74
87
|
Run the `adsorpy.main` in order to run a simple single run using the standard disk-shaped molecule on hexagonal aluminium oxide.
|
|
75
88
|
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
|
|
76
89
|
recommended to run `adsorpy.molecule_lib` directly from command line to define the molecule orientation, then store the new
|
|
77
90
|
molecule string for repeated use.
|
|
78
91
|
|
|
79
92
|
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.
|
|
93
|
+
An example for dog-bone molecules with rotations of 360 // 12 = 30 degrees:
|
|
94
|
+
```python
|
|
95
|
+
from adsorpy.run_simulation import run_simulation
|
|
96
|
+
from adsorpy.molecule_lib import dogbonium
|
|
97
|
+
molecule = dogbonium()
|
|
98
|
+
output = run_simulation(molecules_list=molecule, rotation_counts=12, plot_output_flag=True)
|
|
99
|
+
```
|
|
100
|
+
|
|
80
101
|
|
|
81
|
-
User
|
|
102
|
+
User-friendliness will be updated at a later stage, allowing the user to define simulation modes, surfaces, and
|
|
82
103
|
molecules more easily.
|
|
83
104
|
|
|
84
|
-
Documentation (generated with `
|
|
105
|
+
Documentation (generated with `sphinx`): https://joostfwmaas.github.io/AdsorPy/
|
|
85
106
|
|
|
86
107
|
## Future additions
|
|
87
108
|
|
|
@@ -90,16 +111,18 @@ In a future update, the code will be expanded with diffusion, desorption, and sp
|
|
|
90
111
|
## Design philosophy
|
|
91
112
|
|
|
92
113
|
Because AdsorPy has been made with scientific rigour in mind, the package is tested in multiple ways:
|
|
93
|
-
- Unit tests (`
|
|
94
|
-
- Property tests (`
|
|
95
|
-
- `
|
|
96
|
-
- `
|
|
97
|
-
- `
|
|
114
|
+
- Unit tests (`pytest`) of the code ensure correct behaviour for expected input.
|
|
115
|
+
- Property tests (`hypothesis`) of the most critical code components ensure correct behaviour for unexpected input as well.
|
|
116
|
+
- `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.
|
|
117
|
+
- `ruff` is used as a linter with almost all rules enabled (see the `pyproject.toml` for the list of exclusions and reasons).
|
|
118
|
+
- `slotscheck` ensures that all dataclass slots are set up correctly.
|
|
119
|
+
- `tach` ensures that internal dependencies are handled correctly (from low level to high), preventing circular dependencies.
|
|
120
|
+
- `tox` is used to run all of the aforementioned tests in parallel for multiple Python versions to ensure correct behaviour.
|
|
98
121
|
- CI is used for automated testing.
|
|
99
122
|
|
|
100
123
|
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).
|
|
101
124
|
|
|
102
|
-
|
|
125
|
+
## Openness and academic collaboration
|
|
103
126
|
|
|
104
127
|
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.
|
|
105
128
|
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,11 +1,12 @@
|
|
|
1
1
|
# AdsorPy
|
|
2
2
|
|
|
3
|
-

|
|
4
3
|

|
|
5
4
|
[](https://codecov.io/github/JoostFWMaas/AdsorPy)
|
|
6
5
|
|
|
7
6
|
Lattice-based random sequential adsorption (RSA) Python 3.10+ script.
|
|
8
7
|
|
|
8
|
+
<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;">
|
|
9
|
+
|
|
9
10
|
In RSA, molecules arrive one by one at a surface. Adsorption takes place if the molecule does not overlap with molecules
|
|
10
11
|
already on the surface.
|
|
11
12
|
The list of available orientations for the molecule is traversed in random order until the first orientation that fits
|
|
@@ -15,17 +16,30 @@ gap size distribution.
|
|
|
15
16
|
|
|
16
17
|
## How to use
|
|
17
18
|
|
|
19
|
+
The easiest way to run this package:
|
|
20
|
+
```bash
|
|
21
|
+
pip install adsorpy
|
|
22
|
+
```
|
|
23
|
+
|
|
18
24
|
Run the `adsorpy.main` in order to run a simple single run using the standard disk-shaped molecule on hexagonal aluminium oxide.
|
|
19
25
|
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
26
|
recommended to run `adsorpy.molecule_lib` directly from command line to define the molecule orientation, then store the new
|
|
21
27
|
molecule string for repeated use.
|
|
22
28
|
|
|
23
29
|
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.
|
|
30
|
+
An example for dog-bone molecules with rotations of 360 // 12 = 30 degrees:
|
|
31
|
+
```python
|
|
32
|
+
from adsorpy.run_simulation import run_simulation
|
|
33
|
+
from adsorpy.molecule_lib import dogbonium
|
|
34
|
+
molecule = dogbonium()
|
|
35
|
+
output = run_simulation(molecules_list=molecule, rotation_counts=12, plot_output_flag=True)
|
|
36
|
+
```
|
|
37
|
+
|
|
24
38
|
|
|
25
|
-
User
|
|
39
|
+
User-friendliness will be updated at a later stage, allowing the user to define simulation modes, surfaces, and
|
|
26
40
|
molecules more easily.
|
|
27
41
|
|
|
28
|
-
Documentation (generated with `
|
|
42
|
+
Documentation (generated with `sphinx`): https://joostfwmaas.github.io/AdsorPy/
|
|
29
43
|
|
|
30
44
|
## Future additions
|
|
31
45
|
|
|
@@ -34,16 +48,18 @@ In a future update, the code will be expanded with diffusion, desorption, and sp
|
|
|
34
48
|
## Design philosophy
|
|
35
49
|
|
|
36
50
|
Because AdsorPy has been made with scientific rigour in mind, the package is tested in multiple ways:
|
|
37
|
-
- Unit tests (`
|
|
38
|
-
- Property tests (`
|
|
39
|
-
- `
|
|
40
|
-
- `
|
|
41
|
-
- `
|
|
51
|
+
- Unit tests (`pytest`) of the code ensure correct behaviour for expected input.
|
|
52
|
+
- Property tests (`hypothesis`) of the most critical code components ensure correct behaviour for unexpected input as well.
|
|
53
|
+
- `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.
|
|
54
|
+
- `ruff` is used as a linter with almost all rules enabled (see the `pyproject.toml` for the list of exclusions and reasons).
|
|
55
|
+
- `slotscheck` ensures that all dataclass slots are set up correctly.
|
|
56
|
+
- `tach` ensures that internal dependencies are handled correctly (from low level to high), preventing circular dependencies.
|
|
57
|
+
- `tox` is used to run all of the aforementioned tests in parallel for multiple Python versions to ensure correct behaviour.
|
|
42
58
|
- CI is used for automated testing.
|
|
43
59
|
|
|
44
60
|
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
61
|
|
|
46
|
-
|
|
62
|
+
## Openness and academic collaboration
|
|
47
63
|
|
|
48
64
|
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
65
|
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.
|
|
@@ -36,7 +36,13 @@ extensions = [
|
|
|
36
36
|
]
|
|
37
37
|
|
|
38
38
|
intersphinx_mapping = {
|
|
39
|
-
|
|
39
|
+
"numpy": ("https://numpy.org/doc/stable/", None),
|
|
40
|
+
"python": ("https://docs.python.org/3/", None),
|
|
41
|
+
"pydantic": ("https://docs.pydantic.dev/latest/", None),
|
|
42
|
+
"shapely": ("https://shapely.readthedocs.io/en/stable/", None),
|
|
43
|
+
"numba": ("https://numba.readthedocs.io/en/stable/", None),
|
|
44
|
+
"matplotlib": ("https://matplotlib.org/stable/", None),
|
|
45
|
+
"rtree": ("https://rtree.readthedocs.io/en/latest/", None),
|
|
40
46
|
}
|
|
41
47
|
|
|
42
48
|
sd_custom_directives = {
|
|
@@ -76,7 +82,11 @@ autodoc_default_options = {
|
|
|
76
82
|
|
|
77
83
|
autodoc_member_order = "bysource"
|
|
78
84
|
|
|
79
|
-
suppress_warnings = [
|
|
85
|
+
suppress_warnings = [
|
|
86
|
+
"config.cache",
|
|
87
|
+
"sphinx_autodoc_typehints.guarded_import",
|
|
88
|
+
"sphinx_autodoc_typehints.forward_reference",
|
|
89
|
+
]
|
|
80
90
|
|
|
81
91
|
# -- Options for HTML output -------------------------------------------------
|
|
82
92
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
|
@@ -96,6 +106,8 @@ py_files = module_directory.glob("*.py")
|
|
|
96
106
|
module_names = [f.stem for f in py_files]
|
|
97
107
|
print(module_names)
|
|
98
108
|
|
|
109
|
+
autodoc_typehints = "description"
|
|
110
|
+
|
|
99
111
|
# List of modules to mock during documentation build
|
|
100
112
|
autodoc_mock_imports = module_names
|
|
101
113
|
|
|
@@ -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.1
|
|
8
|
+
version = "1.2.1" # 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"
|
|
@@ -62,6 +62,7 @@ dependencies = [
|
|
|
62
62
|
"numba>=0.65.1",
|
|
63
63
|
"matplotlib>=3.10.9",
|
|
64
64
|
"shapely>=2.1.2",
|
|
65
|
+
"pydantic>=2.13.4",
|
|
65
66
|
"rtree>=1.4.1",
|
|
66
67
|
]
|
|
67
68
|
|
|
@@ -75,8 +76,11 @@ test = [
|
|
|
75
76
|
"codecov>=2.1.13",
|
|
76
77
|
]
|
|
77
78
|
lint = [
|
|
78
|
-
"mypy>=
|
|
79
|
+
"mypy>=2.0.0",
|
|
79
80
|
"ruff>=0.15.12",
|
|
81
|
+
"pyright>=1.1.409",
|
|
82
|
+
"tach>=0.34.1",
|
|
83
|
+
"slotscheck>=0.19.1",
|
|
80
84
|
]
|
|
81
85
|
docs = [
|
|
82
86
|
"sphinx>=9.1.0",
|
|
@@ -90,27 +94,9 @@ docs = [
|
|
|
90
94
|
github = "https://github.com/JoostFWMaas/AdsorPy"
|
|
91
95
|
Documentation = "https://joostfwmaas.github.io/AdsorPy"
|
|
92
96
|
Changelog = "https://github.com/JoostFWMaas/AdsorPy/blob/main/CHANGELOG.md"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
#testing = [
|
|
97
|
-
# "pytest",
|
|
98
|
-
# "pytest-cov",
|
|
99
|
-
# "hypothesis",
|
|
100
|
-
# "mypy",
|
|
101
|
-
# "ruff",
|
|
102
|
-
# "scipy==1.15.3; python_version <= '3.10'",
|
|
103
|
-
# "scipy>=1.16.3; python_version > '3.10'",
|
|
104
|
-
#]
|
|
105
|
-
#
|
|
106
|
-
#docs = [
|
|
107
|
-
# "sphinx",
|
|
108
|
-
# "furo",
|
|
109
|
-
# "sphinx_design",
|
|
110
|
-
# "sphinx-autodoc-typehints",
|
|
111
|
-
# "sphinx-pyproject",
|
|
112
|
-
#]
|
|
113
|
-
|
|
97
|
+
homepage = "https://pypi.org/project/adsorpy/"
|
|
98
|
+
issues = "https://github.com/JoostFWMaas/AdsorPy/issues"
|
|
99
|
+
download = "https://pypi.org/project/adsorpy/#files"
|
|
114
100
|
|
|
115
101
|
[tool.hatch.package_data]
|
|
116
102
|
"adsorpy" = ["py.typed"]
|
|
@@ -151,7 +137,6 @@ exclude_also = [
|
|
|
151
137
|
"@njit", # Compiled code is not seen by coverage. This code is tested with Hypothesis though. False negative.
|
|
152
138
|
]
|
|
153
139
|
|
|
154
|
-
|
|
155
140
|
[tool.mypy]
|
|
156
141
|
mypy_path = ["src", "optional", "tests"]
|
|
157
142
|
ignore_missing_imports = true
|
|
@@ -160,7 +145,12 @@ disallow_any_explicit = true
|
|
|
160
145
|
#disallow_any_decorated = true # Throws an error because geo.Polygon in a tuple is turned into Any for the @staticmethod.
|
|
161
146
|
#warn_unreachable = true # Set this to true when pushing to main?
|
|
162
147
|
exclude = ['/Scripts']
|
|
148
|
+
plugins = ["pydantic.mypy"]
|
|
163
149
|
|
|
150
|
+
[tool.pydantic-mypy]
|
|
151
|
+
init_forbid_extra = true
|
|
152
|
+
init_typed = true
|
|
153
|
+
warn_required_dynamic_aliases = true
|
|
164
154
|
|
|
165
155
|
[tool.flake8]
|
|
166
156
|
max-line-length = 120
|
|
@@ -212,7 +202,6 @@ pylint.max-statements = 80
|
|
|
212
202
|
mccabe.max-complexity = 20
|
|
213
203
|
future-annotations = true # Future annotations enabled.
|
|
214
204
|
|
|
215
|
-
|
|
216
205
|
ignore = [
|
|
217
206
|
"ERA001",
|
|
218
207
|
"TD",
|
|
@@ -225,9 +214,45 @@ ignore = [
|
|
|
225
214
|
"ARG001", # Unused function argument.
|
|
226
215
|
"D203", # Conflicts with D211: no blank line before class.
|
|
227
216
|
"D213", # Conflicts with D212: multi-line summary first line.
|
|
228
|
-
# "DOC",
|
|
229
217
|
]
|
|
230
218
|
|
|
231
219
|
[tool.ruff.lint.per-file-ignores]
|
|
232
220
|
"__init__.py" = ["D104"] # Missing docstring in public package. Not needed, package is empty.
|
|
233
|
-
"test*.py" = ["S101", "TC"] # Assert should not be used in production code! But this is test code, so here it is expected.
|
|
221
|
+
"test*.py" = ["S101", "TC"] # Assert should not be used in production code! But this is test code, so here it is expected.
|
|
222
|
+
|
|
223
|
+
[tool.ruff.lint.flake8-type-checking]
|
|
224
|
+
runtime-evaluated-decorators = ["pydantic.dataclasses.dataclass"]
|
|
225
|
+
|
|
226
|
+
[tool.pyright]
|
|
227
|
+
include = ["src", "tests"]
|
|
228
|
+
|
|
229
|
+
typeCheckingMode = "strict"
|
|
230
|
+
|
|
231
|
+
useLibraryCodeForTypes = true
|
|
232
|
+
|
|
233
|
+
# Avoid penalising third-party libraries.
|
|
234
|
+
reportMissingTypeStubs = "none"
|
|
235
|
+
|
|
236
|
+
# Suppress "partially unknown" noise from deps like numpy, shapely, matplotlib, etc..
|
|
237
|
+
reportUnknownMemberType = "none"
|
|
238
|
+
reportUnknownVariableType = "none"
|
|
239
|
+
reportUnknownParameterType = "none"
|
|
240
|
+
reportUnknownArgumentType = "none"
|
|
241
|
+
reportUnnecessaryCast = "none" # These are needed for mypy.
|
|
242
|
+
reportUnnecessaryIsInstance = "none" # These are needed for mypy.
|
|
243
|
+
|
|
244
|
+
# Keep useful strict checks.
|
|
245
|
+
reportImplicitOverride = "error"
|
|
246
|
+
reportPrivateUsage = "warning"
|
|
247
|
+
reportUnnecessaryTypeIgnoreComment = "warning"
|
|
248
|
+
reportUnnecessaryComparison = "warning" # These are usually included to prevent the user from breaking things.
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
[tool.slotscheck]
|
|
252
|
+
strict-imports = true
|
|
253
|
+
include-modules = """
|
|
254
|
+
(
|
|
255
|
+
src
|
|
256
|
+
# |tests
|
|
257
|
+
)
|
|
258
|
+
"""
|