lsapy 0.3.0__tar.gz → 0.4.0__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.
Files changed (74) hide show
  1. {lsapy-0.3.0 → lsapy-0.4.0}/CHANGELOG.rst +63 -13
  2. {lsapy-0.3.0 → lsapy-0.4.0}/PKG-INFO +49 -18
  3. {lsapy-0.3.0 → lsapy-0.4.0}/README.rst +46 -17
  4. {lsapy-0.3.0 → lsapy-0.4.0}/docs/api.rst +0 -1
  5. {lsapy-0.3.0 → lsapy-0.4.0}/docs/getting_started/index.rst +3 -0
  6. lsapy-0.4.0/docs/index.rst +40 -0
  7. {lsapy-0.3.0 → lsapy-0.4.0}/docs/notebooks/criteria.ipynb +3 -2
  8. {lsapy-0.3.0 → lsapy-0.4.0}/docs/notebooks/index.rst +0 -1
  9. {lsapy-0.3.0 → lsapy-0.4.0}/docs/notebooks/lsa.ipynb +4 -3
  10. {lsapy-0.3.0 → lsapy-0.4.0}/environment.yml +2 -1
  11. {lsapy-0.3.0 → lsapy-0.4.0}/noxfile.py +1 -1
  12. {lsapy-0.3.0 → lsapy-0.4.0}/pyproject.toml +4 -1
  13. {lsapy-0.3.0 → lsapy-0.4.0}/src/lsapy/__init__.py +1 -2
  14. {lsapy-0.3.0 → lsapy-0.4.0}/src/lsapy/aggregate.py +5 -10
  15. {lsapy-0.3.0 → lsapy-0.4.0}/src/lsapy/core/formatting.py +2 -10
  16. {lsapy-0.3.0 → lsapy-0.4.0}/src/lsapy/criteria.py +15 -5
  17. lsapy-0.4.0/src/lsapy/data/registry.txt +3 -0
  18. {lsapy-0.3.0 → lsapy-0.4.0}/src/lsapy/lsa.py +11 -8
  19. {lsapy-0.3.0 → lsapy-0.4.0}/src/lsapy/standardize.py +10 -16
  20. {lsapy-0.3.0 → lsapy-0.4.0}/src/lsapy/stats.py +12 -6
  21. {lsapy-0.3.0 → lsapy-0.4.0}/src/lsapy/utils/_utils.py +20 -8
  22. {lsapy-0.3.0 → lsapy-0.4.0}/tests/conftest.py +61 -21
  23. {lsapy-0.3.0 → lsapy-0.4.0}/tests/test_aggregate.py +7 -1
  24. {lsapy-0.3.0 → lsapy-0.4.0}/tests/test_criteria.py +30 -6
  25. {lsapy-0.3.0 → lsapy-0.4.0}/tests/test_fitting.py +1 -1
  26. {lsapy-0.3.0 → lsapy-0.4.0}/tests/test_formatting.py +1 -8
  27. {lsapy-0.3.0 → lsapy-0.4.0}/tests/test_lsa.py +7 -1
  28. {lsapy-0.3.0 → lsapy-0.4.0}/tests/test_utils.py +7 -3
  29. lsapy-0.3.0/docs/api/deprecated.rst +0 -26
  30. lsapy-0.3.0/docs/index.rst +0 -33
  31. lsapy-0.3.0/docs/notebooks/functions.ipynb +0 -153
  32. lsapy-0.3.0/src/lsapy/data/registry.txt +0 -3
  33. lsapy-0.3.0/src/lsapy/functions/__init__.py +0 -21
  34. lsapy-0.3.0/src/lsapy/functions/_discrete.py +0 -72
  35. lsapy-0.3.0/src/lsapy/functions/_suitability.py +0 -137
  36. lsapy-0.3.0/src/lsapy/functions/membership.py +0 -395
  37. lsapy-0.3.0/tests/test_functions.py +0 -315
  38. lsapy-0.3.0/tests/test_membership_fitting.py +0 -105
  39. {lsapy-0.3.0 → lsapy-0.4.0}/CODE_OF_CONDUCT.md +0 -0
  40. {lsapy-0.3.0 → lsapy-0.4.0}/CONTRIBUTING.rst +0 -0
  41. {lsapy-0.3.0 → lsapy-0.4.0}/LICENSE +0 -0
  42. {lsapy-0.3.0 → lsapy-0.4.0}/docs/Makefile +0 -0
  43. {lsapy-0.3.0 → lsapy-0.4.0}/docs/api/criteria.rst +0 -0
  44. {lsapy-0.3.0 → lsapy-0.4.0}/docs/api/lsa.rst +0 -0
  45. {lsapy-0.3.0 → lsapy-0.4.0}/docs/api/standardize.rst +0 -0
  46. {lsapy-0.3.0 → lsapy-0.4.0}/docs/api/stats.rst +0 -0
  47. {lsapy-0.3.0 → lsapy-0.4.0}/docs/api/utils.rst +0 -0
  48. {lsapy-0.3.0 → lsapy-0.4.0}/docs/changelog.rst +0 -0
  49. {lsapy-0.3.0 → lsapy-0.4.0}/docs/community/code_of_conduct.rst +0 -0
  50. {lsapy-0.3.0 → lsapy-0.4.0}/docs/community/contributing.rst +0 -0
  51. {lsapy-0.3.0 → lsapy-0.4.0}/docs/community/index.rst +0 -0
  52. {lsapy-0.3.0 → lsapy-0.4.0}/docs/conf.py +0 -0
  53. {lsapy-0.3.0 → lsapy-0.4.0}/docs/logos/FT2050-full_colour.png +0 -0
  54. {lsapy-0.3.0 → lsapy-0.4.0}/docs/logos/UCBlack.png +0 -0
  55. {lsapy-0.3.0 → lsapy-0.4.0}/docs/logos/UCWhite.png +0 -0
  56. {lsapy-0.3.0 → lsapy-0.4.0}/docs/logos/lsapy/LSAPy_Icon.png +0 -0
  57. {lsapy-0.3.0 → lsapy-0.4.0}/docs/logos/lsapy/LSAPy_Icon.svg +0 -0
  58. {lsapy-0.3.0 → lsapy-0.4.0}/docs/logos/lsapy/LSAPy_Logo_Dark.png +0 -0
  59. {lsapy-0.3.0 → lsapy-0.4.0}/docs/logos/lsapy/LSAPy_Logo_FullColour.png +0 -0
  60. {lsapy-0.3.0 → lsapy-0.4.0}/docs/logos/lsapy/LSAPy_Logo_FullColour.svg +0 -0
  61. {lsapy-0.3.0 → lsapy-0.4.0}/docs/logos/lsapy/LSAPy_Logo_FullDark.png +0 -0
  62. {lsapy-0.3.0 → lsapy-0.4.0}/docs/logos/lsapy/LSAPy_Logo_FullLight.png +0 -0
  63. {lsapy-0.3.0 → lsapy-0.4.0}/docs/logos/lsapy/LSAPy_Logo_Light.png +0 -0
  64. {lsapy-0.3.0 → lsapy-0.4.0}/docs/logos/lsapy/branding.md +0 -0
  65. {lsapy-0.3.0 → lsapy-0.4.0}/docs/make.bat +0 -0
  66. {lsapy-0.3.0 → lsapy-0.4.0}/docs/readme.rst +0 -0
  67. {lsapy-0.3.0 → lsapy-0.4.0}/docs/references.bib +0 -0
  68. {lsapy-0.3.0 → lsapy-0.4.0}/docs/references.rst +0 -0
  69. {lsapy-0.3.0 → lsapy-0.4.0}/src/lsapy/core/__init__.py +0 -0
  70. {lsapy-0.3.0 → lsapy-0.4.0}/src/lsapy/core/functions.py +0 -0
  71. {lsapy-0.3.0 → lsapy-0.4.0}/src/lsapy/core/options.py +0 -0
  72. {lsapy-0.3.0 → lsapy-0.4.0}/src/lsapy/utils/__init__.py +0 -0
  73. {lsapy-0.3.0 → lsapy-0.4.0}/tests/test_standardize.py +0 -0
  74. {lsapy-0.3.0 → lsapy-0.4.0}/tests/test_stats.py +0 -0
@@ -2,13 +2,63 @@
2
2
  Changelog
3
3
  =========
4
4
 
5
- v0.3.0 (2025-10-11)
5
+ v0.4.0 (2026-05-14)
6
+ -------------------
7
+ Contributor to this version: Baptiste Hamon (@baptistehamon).
8
+
9
+ New features
10
+ ^^^^^^^^^^^^
11
+ * ``SuitabilityCriteria`` now supports "inplace" computation, meaning that the suitability values are stored in the ``indicator`` attribute of the criteria (issue `#118 <https://github.com/baptistehamon/lsapy/issues/118>`_, PR `#123 <https://github.com/baptistehamon/lsapy/pull/123>`_).
12
+ * LSAPy is now supports Python 3.14 (issue `#127 <https://github.com/baptistehamon/lsapy/issues/127>`_, PR `#128 <https://github.com/baptistehamon/lsapy/pull/128>`_).
13
+
14
+ Bug fixes
15
+ ^^^^^^^^^
16
+ * Fix ``lsapy.core.formatting.sc_repr`` function to handle ``SuitabilityCriteria`` with non-empty ``xr.DataArray`` indicators and undefined ``func`` (issue `#115 <https://github.com/baptistehamon/lsapy/issues/115>`_, PR `#116 <https://github.com/baptistehamon/lsapy/pull/116>`_).
17
+ * Fix ``lsapy.aggregate.aggregate`` function for ``mean`` and ``gmean`` aggregation when weights are provided (issue `#121 <https://github.com/baptistehamon/lsapy/issues/121>`_, PR `#122 <https://github.com/baptistehamon/lsapy/pull/122>`_).
18
+ * Fix ``LandSuitabilityAnalysis.run`` to reassign attrs to each criteria in the return ``xr.Dataset`` (issue `#119 <https://github.com/baptistehamon/lsapy/issues/119>`_, PR `#124 <https://github.com/baptistehamon/lsapy/pull/124>`_).
19
+ * Fix issue with ``open_data`` due to the release of the v2.0 of *NZGLID* (issue `#145 <https://github.com/baptistehamon/lsapy/issues/145>`_, PR `#146 <https://github.com/baptistehamon/lsapy/pull/146>`_).
20
+ * Fix ``open_data`` list of supported variables printing and update docstring (issue `#143 <https://github.com/baptistehamon/lsapy/issues/143>`_, PR `#144 <https://github.com/baptistehamon/lsapy/pull/144>`_).
21
+ * Update sample data hash in the registry file after *NZGLID* v2.0 modifications (PR `#149 <https://github.com/baptistehamon/lsapy/pull/149>`_).
22
+
23
+ Breaking changes
24
+ ^^^^^^^^^^^^^^^^
25
+ * The ``lsapy.functions`` module has been removed (PR `#104 <https://github.com/baptistehamon/lsapy/pull/104>`_).
26
+ * The ``SuitabilityFunction`` class has been removed.
27
+ * All the standardization functions contained in this module have been removed and are now only available in the ``lsapy.standardize`` module.
28
+ * The ``fit_membership`` function has been removed and ``lsapy.standardize.fit`` should be used instead.
29
+ * The example data provided for the *land* realm with the package has been updated reflecting the changes in the v2.0 of *NZGLID* dataset (issue `#145 <https://github.com/baptistehamon/lsapy/issues/145>`_, PR `#146 <https://github.com/baptistehamon/lsapy/pull/146>`_):
30
+ * Minor changes in the data values have been introduced.
31
+ * The variable *rock* has been renamed to *rock_outcrops_surface_boulders*.
32
+ * The variable *carbon_content* has been removed.
33
+
34
+ Internal changes
35
+ ^^^^^^^^^^^^^^^^
36
+ * ``h5py`` has been added to the project dev dependencies (PR `#112 <https://github.com/baptistehamon/lsapy/pull/112>`_).
37
+ * ``lsapy.aggregate._agg_weights`` has been modified to return a ``xr.DataArray`` where weights are distributed only along the ``variable`` dimension (issue `#117 <https://github.com/baptistehamon/lsapy/issues/117>`_, PR `#122 <https://github.com/baptistehamon/lsapy/pull/122>`_).
38
+ * Dependabot has been configured to check version updates (issue `#129 <https://github.com/baptistehamon/lsapy/issues/129>`_, PR `#130 <https://github.com/baptistehamon/lsapy/pull/130>`_).
39
+ * The registry file for example data has been updated and the DOIs have been set to the v2.0 of `NZGLID` (issue `#145 <https://github.com/baptistehamon/lsapy/issues/145>`_, PR `#146 <https://github.com/baptistehamon/lsapy/pull/146>`_).
40
+ * ``_check_realm_vars`` test has been updated to unsure supported variables are correctly printed (issue `#143 <https://github.com/baptistehamon/lsapy/issues/143>`_, PR `#144 <https://github.com/baptistehamon/lsapy/pull/144>`_).
41
+ * Update LSAPy description in the README file and documentation home page (PR `#151 <https://github.com/baptistehamon/lsapy/pull/151>`_).
42
+ * The links to the development installation instructions have been added to the README and documentation (issue `#142 <https://github.com/baptistehamon/lsapy/issues/142>`_, PR `#151 <https://github.com/baptistehamon/lsapy/pull/151>`_).
43
+ * Update the README file:
44
+ * A new section *Citation* has been added with the citation information of LSAPy (issue `#142 <https://github.com/baptistehamon/lsapy/issues/142>`_, PR `#151 <https://github.com/baptistehamon/lsapy/pull/151>`_).
45
+ * The *Quick Start* section has been split into two sections: *Quick install* and *Land Suitability Analysis (LSA)* (PR `#151 <https://github.com/baptistehamon/lsapy/pull/151>`_).
46
+
47
+ v0.3.1 (2025-11-14)
48
+ -------------------
49
+ Contributor to this version: Baptiste Hamon (@baptistehamon).
50
+
51
+ Bug fixes
52
+ ^^^^^^^^^
53
+ * The `np.vectorize` decorator has been removed of standardization functions to fix fitting functions issues (issue `#101 <https://github.com/baptistehamon/lsapy/issues/101>`_, PR `#102 <https://github.com/baptistehamon/lsapy/pull/102>`_).
54
+
55
+ v0.3.0 (2025-11-10)
6
56
  -------------------
7
57
  Contributor to this version: Baptiste Hamon (@baptistehamon).
8
58
 
9
59
  Announcements
10
60
  ^^^^^^^^^^^^^
11
- * `LSAPy` is now available on `conda-forge <https://anaconda.org/conda-forge/lsapy>`_ (issue `#68 <https://github.com/baptistehamon/lsapy/issues/68>`_, PR `#74 <https://github.com/baptistehamon/lsapy/pull/74>`_).
61
+ * LSAPy is now available on `conda-forge <https://anaconda.org/conda-forge/lsapy>`_ (issue `#68 <https://github.com/baptistehamon/lsapy/issues/68>`_, PR `#74 <https://github.com/baptistehamon/lsapy/pull/74>`_).
12
62
 
13
63
  New features
14
64
  ^^^^^^^^^^^^
@@ -48,7 +98,7 @@ New features
48
98
  ^^^^^^^^^^^^
49
99
  * Functions' alternative names can now be used in ``SuitabilityFunction`` (PR `#43 <https://github.com/baptistehamon/lsapy/pull/43>`_).
50
100
  * The documentation of membership functions has been improved (PR `#43 <https://github.com/baptistehamon/lsapy/pull/43>`_).
51
- * `LSAPy` officially supports Python>=3.10 and is OS independent (PR `#46 <https://github.com/baptistehamon/lsapy/pull/46>`_).
101
+ * LSAPy officially supports Python>=3.10 and is OS independent (PR `#46 <https://github.com/baptistehamon/lsapy/pull/46>`_).
52
102
  * ``repr`` methods of ``SuitabilityFunction``, ``SuitabilityCriteria`` and ``LandSuitabilityAnalysis`` have been modified to provide more user-friendly information (issue `#55 <https://github.com/baptistehamon/lsapy/issues/55>`_, PR `#59 <https://github.com/baptistehamon/lsapy/pull/59>`_).
53
103
  * A setter has been added to the ``attrs`` method of ``SuitabilityCriteria`` and ``LandSuitabilityAnalysis`` (issue `#55 <https://github.com/baptistehamon/lsapy/issues/55>`_, PR `#59 <https://github.com/baptistehamon/lsapy/pull/59>`_).
54
104
  * The ``open_data`` function has been added to the ``lsapy.utils`` module to load data from the LSAPy data repository (issue `#60 <https://github.com/baptistehamon/lsapy/issues/60>`_, PR `#62 <https://github.com/baptistehamon/lsapy/pull/62>`_).
@@ -68,7 +118,7 @@ Breaking changes
68
118
 
69
119
  Internal changes
70
120
  ^^^^^^^^^^^^^^^^
71
- * Tests have been added for currently implemented `LSAPy` functionalities (issue `#7 <https://github.com/baptistehamon/lsapy/issues/7>`_, PR `#46 <https://github.com/baptistehamon/lsapy/pull/46>`_).
121
+ * Tests have been added for currently implemented LSAPy functionalities (issue `#7 <https://github.com/baptistehamon/lsapy/issues/7>`_, PR `#46 <https://github.com/baptistehamon/lsapy/pull/46>`_).
72
122
  * ``pytest`` is used as the testing framework to run all unit tests, doctests and test notebooks.
73
123
  * ``nox`` has been set up and is used to run tests in CI workflows.
74
124
  * A CI GitHub Actions workflow has been added (issue `#8 <https://github.com/baptistehamon/lsapy/issues/8>`_, PR `#46 <https://github.com/baptistehamon/lsapy/pull/46>`_)
@@ -81,17 +131,17 @@ Internal changes
81
131
  * Update package metadata: keywords, classifiers (python versions) and project URLs.
82
132
  * Update package sdist files.
83
133
  * The ``lsapy.core.formatting`` module has been added and contains ``repr`` formatting functions (issue `#55 <https://github.com/baptistehamon/lsapy/issues/55>`_, PR `#59 <https://github.com/baptistehamon/lsapy/pull/59>`_).
84
- * `LSAPy` sample data management has been improved (issue `#60 <https://github.com/baptistehamon/lsapy/issues/60>`_, PR `#62 <https://github.com/baptistehamon/lsapy/pull/62>`_):
85
- * `LSAPy` now uses `pooch` to fetch sample data.
134
+ * LSAPy sample data management has been improved (issue `#60 <https://github.com/baptistehamon/lsapy/issues/60>`_, PR `#62 <https://github.com/baptistehamon/lsapy/pull/62>`_):
135
+ * LSAPy now uses ``pooch`` to fetch sample data.
86
136
  * Old data files have been removed from the data folder, and the new climate data file has been added.
87
137
  * A registry file has been added to store sample data file names, hashes and URLs.
88
- * Aggregation functions have been moved to the `lsapy.core.aggregation` module (PR `#63 <https://github.com/baptistehamon/lsapy/pull/63>`_).
89
- * A relaxed configuration of `mypy` has been added to the project (PR `#66 <https://github.com/baptistehamon/lsapy/pull/66>`_).
138
+ * Aggregation functions have been moved to the ``lsapy.core.aggregation`` module (PR `#63 <https://github.com/baptistehamon/lsapy/pull/63>`_).
139
+ * A relaxed configuration of ``mypy`` has been added to the project (PR `#66 <https://github.com/baptistehamon/lsapy/pull/66>`_).
90
140
 
91
141
  Bug fixes
92
142
  ^^^^^^^^^
93
143
  * Fix issues with representations of ``SuitabilityFunction`` when no parameters are provided (issue `#61 <https://github.com/baptistehamon/lsapy/issues/61>`_, PR `#65 <https://github.com/baptistehamon/lsapy/pull/65>`_).
94
- * Add `**kwargs` to `SuitabilityCriteria.compute` and `LandSuitabilityAnalysis.run` to allow handling Dask arrays (issue `#64 <https://github.com/baptistehamon/lsapy/issues/64>`_, PR `#65 <https://github.com/baptistehamon/lsapy/pull/65>`_).
144
+ * Add ``**kwargs`` to ``SuitabilityCriteria.compute`` and ``LandSuitabilityAnalysis.run`` to allow handling Dask arrays (issue `#64 <https://github.com/baptistehamon/lsapy/issues/64>`_, PR `#65 <https://github.com/baptistehamon/lsapy/pull/65>`_).
95
145
  * The codebase has been modified to improve typing and fix mypy errors (issue `#35 <https://github.com/baptistehamon/lsapy/issues/35>`_, PR `#66 <https://github.com/baptistehamon/lsapy/pull/66>`_).
96
146
 
97
147
  v0.1.1 (2025-07-26)
@@ -126,8 +176,8 @@ Internal changes
126
176
  * Templates for requesting new features, asking question and submitting PR have been added (issue `#11 <https://github.com/baptistehamon/lsapy/issues/11>`_, PR `#12 <https://github.com/baptistehamon/lsapy/pull/12>`_).
127
177
  * The README has been updated to make links permanent and to add a docs badge (PR `#13 <https://github.com/baptistehamon/lsapy/pull/13>`_).
128
178
  * A configuration file for Zenodo integration has been added to the repository (PR `#14 <https://github.com/baptistehamon/lsapy/pull/14>`_).
129
- * `Pre-commit` has been setup and `ruff`, `codespell` and `numpydoc` hooks have been added (issue `#8 <https://github.com/baptistehamon/lsapy/issues/8>`_, PR `#18 <https://github.com/baptistehamon/lsapy/pull/18>`_/PR `#19 <https://github.com/baptistehamon/lsapy/pull/19>`_).
130
- * The autoupdate schedule of `pre-commit` has been set to weekly (PR `#21 <https://github.com/baptistehamon/lsapy/pull/21>`_)
179
+ * *Pre-commit* has been setup and ``ruff``, ``codespell`` and ``numpydoc`` hooks have been added (issue `#8 <https://github.com/baptistehamon/lsapy/issues/8>`_, PR `#18 <https://github.com/baptistehamon/lsapy/pull/18>`_/PR `#19 <https://github.com/baptistehamon/lsapy/pull/19>`_).
180
+ * The autoupdate schedule of ``pre-commit`` has been set to weekly (PR `#21 <https://github.com/baptistehamon/lsapy/pull/21>`_)
131
181
  * The unused ``introduction.ipynb`` notebook has been removed (issue `#15 <https://github.com/baptistehamon/lsapy/issues/15>`_, PR `#20 <https://github.com/baptistehamon/lsapy/pull/20>`_).
132
182
  * The structure around ``SuitabilityFunction`` (PR `#30 <https://github.com/baptistehamon/lsapy/pull/30>`_):
133
183
  * The ``SuitabilityFunction`` has been moved to LSAPy ``function._suitability`` module.
@@ -148,7 +198,7 @@ Internal changes
148
198
  ^^^^^^^^^^^^^^^^
149
199
  * Major changes for documentation (issue `#2 <https://github.com/baptistehamon/lsapy/issues/2>`_, PR `#9 <https://github.com/baptistehamon/lsapy/pull/9>`_):
150
200
  * All public objects are now documented using the `NumPy-style <https://numpydoc.readthedocs.io/en/latest/format.html>`_.
151
- * *introduction.ipynb* has been slip into three different ones: *criteria.ipynb*, *function.ipynb*, and *lsa.ipynb*.
201
+ * ``introduction.ipynb`` has been slip into three different ones: ``criteria.ipynb``, ``function.ipynb``, and ``lsa.ipynb``.
152
202
  * The top-level documentation has been updated/created:
153
203
  * The format of README and CHANGELOG files is now reStructuredText (RST).
154
204
  * A proper README has been created.
@@ -158,7 +208,7 @@ Internal changes
158
208
  * The documentation building using `Sphinx <https://www.sphinx-doc.org/en/master/>`_ has been setup:
159
209
  * The documentation uses the `PyData theme <https://pydata-sphinx-theme.readthedocs.io/en/stable/>`_.
160
210
  * A User-facing documentation is now available and has been published on `Read the Docs <https://readthedocs.org/>`_.
161
- * The project dependencies have been updated and made consistent across *pyproject.toml* and *environments.yml* files.
211
+ * The project dependencies have been updated and made consistent across ``pyproject.toml`` and ``environments.yml`` files.
162
212
 
163
213
  v0.1.0-dev1 (2025-05-16)
164
214
  ------------------------
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lsapy
3
- Version: 0.3.0
3
+ Version: 0.4.0
4
4
  Summary: A Python package for Land Suitability Analysis.
5
5
  Keywords: LSAPy,Land Suitability Analysis,Geospatial Analysis,GIS,Geography
6
6
  Author-email: Baptiste Hamon <baptiste.hamon@pg.canterbury.ac.nz>
@@ -17,6 +17,7 @@ Classifier: Programming Language :: Python :: 3.10
17
17
  Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: 3.12
19
19
  Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
20
21
  Classifier: Topic :: Scientific/Engineering :: GIS
21
22
  License-File: LICENSE
22
23
  Requires-Dist: geopandas >=0.14.0
@@ -34,6 +35,7 @@ Requires-Dist: codespell >=2.4.1 ; extra == "dev"
34
35
  Requires-Dist: coverage[toml] >=7.7.0 ; extra == "dev"
35
36
  Requires-Dist: flit >=3.11 ; extra == "dev"
36
37
  Requires-Dist: h5netcdf >=1.4.0 ; extra == "dev"
38
+ Requires-Dist: h5py ; extra == "dev"
37
39
  Requires-Dist: ipython >=8.20.0 ; extra == "dev"
38
40
  Requires-Dist: matplotlib >=3.9.0 ; extra == "dev"
39
41
  Requires-Dist: mypy >=1.17.1 ; extra == "dev"
@@ -65,6 +67,10 @@ Provides-Extra: all
65
67
  Provides-Extra: dev
66
68
  Provides-Extra: docs
67
69
 
70
+ ==========================================
71
+ LSAPy: Land Suitability Analysis in Python
72
+ ==========================================
73
+
68
74
  .. image:: https://raw.githubusercontent.com/baptistehamon/lsapy/main/docs/logos/lsapy/LSAPy_Logo_FullColour.png
69
75
  :class: dark-light
70
76
  :align: center
@@ -72,19 +78,26 @@ Provides-Extra: docs
72
78
  :width: 400px
73
79
  :alt: LSAPy Logo
74
80
 
75
- LSAPy: Land Suitability Analysis in Python
76
- ==========================================
77
- |pypi| |conda| |python-versions| |status| |testing| |coverage| |ruff| |pre-commit| |docs| |question| |zenodo|
81
+ |pypi| |conda| |python-versions| |status| |testing| |coverage| |ruff| |pre-commit| |docs| |question| |preprint| |zenodo|
82
+
83
+ *LSAPy* (Land Suitability Analysis in Python) is a highly customizable, open-source Python library designed
84
+ to streamline and enhance Land Suitability Analysis (LSA) workflows. Its objective is to make conducting LSA
85
+ in Python easier and more accessible to users. The package implements a fuzzy-logic approach and provides a
86
+ set of objects that work together to deliver a flexible and user-defined LSA framework.
78
87
 
79
- `LSAPy` stands for Land Suitability Analysis (LSA) in Python. Its objective is to make conducting
80
- LSA in Python easier and more accessible to users. It provides a set of objects built around
81
- `xarray`_ and operating together, making LSA's workflow straight forward and easy to understand.
88
+ By relying on `xarray`_ objects for computation, *LSAPy* is specifically designed to facilitate LSA under climate
89
+ change projections. Moreover, the use of `xarray`_ allows for seamless integration with the broader Python ecosystem,
90
+ such as `dask`_ for efficient parallel processing and `matplotlib`_ for data visualisation. The modular design of
91
+ *LSAPy* addresses some limitations of existing LSA tools by offering greater flexibility, reproducibility, and
92
+ scalability for research and practical applications.
82
93
 
83
94
  .. _`xarray`: https://xarray.pydata.org/en/stable/
95
+ .. _`dask`: https://docs.dask.org/en/stable/
96
+ .. _`matplotlib`: https://matplotlib.org/stable/
84
97
 
85
- Quick Start
86
- -----------
87
- To install `LSAPy`, you can use `pip`:
98
+ Quick Install
99
+ -------------
100
+ To install *LSAPy*, you can use `pip`:
88
101
 
89
102
  .. code-block:: shell
90
103
 
@@ -96,7 +109,14 @@ or `conda`:
96
109
 
97
110
  conda install -c conda-forge lsapy
98
111
 
99
- You can now perform your LSA:
112
+ You can find the development installation instructions in the `Contribution`_ section.
113
+
114
+ Land Suitability Analysis (LSA)
115
+ -------------------------------
116
+
117
+ Below is a quick example of how to conduct a land suitability analysis using *LSAPy*.
118
+
119
+ .. _`User Guide`: https://lsapy.readthedocs.io/en/latest/notebooks/index.html
100
120
 
101
121
  .. code-block:: python
102
122
 
@@ -129,29 +149,36 @@ You can now perform your LSA:
129
149
  # run your analysis
130
150
  lsa.run(params)
131
151
 
132
- More detailed tutorials and examples can be found in the `User Guide`_.
133
-
134
- .. _`User Guide`: https://lsapy.readthedocs.io/en/latest/notebooks/index.html
135
-
152
+ For more detailed tutorials and examples, please refer to the `User Guide`_.
136
153
 
137
154
  Contributing
138
155
  ------------
139
156
 
140
- `LSAPy` is an open-source project and we welcome contributions from the community. If you are interested in contributing, please
157
+ *LSAPy* is an open-source project and we welcome contributions from the community. If you are interested in contributing, please
141
158
  refer to the `Contribution`_ section for guidelines on how to get started helping us improve the library.
142
159
 
143
- .. _`Contribution`: https://lsapy.readthedocs.io/en/latest/community/contributing.html
160
+ How to cite *LSAPy*
161
+ -------------------
162
+
163
+ If you use *LSAPy* in your research or project, please consider citing it. The software is currently under review by
164
+ `pyOpenSci <https://github.com/pyOpenSci/software-submission/issues/261>`__ for publication in the `Journal of Open Source Software`
165
+ (JOSS), and we will update this section with the relevant reference once the review process is complete. In the meantime,
166
+ you can cite the preprint, which is available on `Research Square` : https://doi.org/10.21203/rs.3.rs-8399348/v1.
167
+
168
+ If you wish to cite a specific version of the software, you can find the relevant reference on `Zenodo` :
169
+ https://doi.org/10.5281/zenodo.15015110.
144
170
 
145
171
  Credits
146
172
  -------
147
173
 
148
- The development of `LSAPy` started as part of a PhD, funded by the `Food Transition 2050`_ Joint Postgraduate School and hosted
174
+ The development of *LSAPy* started as part of a PhD, funded by the `Food Transition 2050`_ Joint Postgraduate School and hosted
149
175
  by the `University of Canterbury`_ in New Zealand.
150
176
 
151
177
  |FT2050| |UC-white| |UC-black|
152
178
 
153
179
  The Python package has been created following the `pyOpenSci Guidebook`_.
154
180
 
181
+ .. _`Contribution`: https://lsapy.readthedocs.io/en/latest/community/contributing.html
155
182
  .. _`Food Transition 2050`: https://www.foodtransitions2050.ac.nz/
156
183
  .. _`University of Canterbury`: https://www.canterbury.ac.nz/
157
184
  .. _`pyOpenSci Guidebook`: https://www.pyopensci.org/python-package-guide/
@@ -224,3 +251,7 @@ The Python package has been created following the `pyOpenSci Guidebook`_.
224
251
  :target: https://pypi.python.org/pypi/lsapy
225
252
  :alt: Supported Python Versions
226
253
 
254
+ .. |preprint| image:: https://img.shields.io/badge/preprint-10.21203%2Frs.3.rs--8399348%2Fv1-brightgreen?style=flat&color=brightgreen
255
+ :target: https://doi.org/10.21203/rs.3.rs-8399348/v1
256
+ :alt: Link to preprint on Research Square
257
+
@@ -1,3 +1,7 @@
1
+ ==========================================
2
+ LSAPy: Land Suitability Analysis in Python
3
+ ==========================================
4
+
1
5
  .. image:: https://raw.githubusercontent.com/baptistehamon/lsapy/main/docs/logos/lsapy/LSAPy_Logo_FullColour.png
2
6
  :class: dark-light
3
7
  :align: center
@@ -5,19 +9,26 @@
5
9
  :width: 400px
6
10
  :alt: LSAPy Logo
7
11
 
8
- LSAPy: Land Suitability Analysis in Python
9
- ==========================================
10
- |pypi| |conda| |python-versions| |status| |testing| |coverage| |ruff| |pre-commit| |docs| |question| |zenodo|
12
+ |pypi| |conda| |python-versions| |status| |testing| |coverage| |ruff| |pre-commit| |docs| |question| |preprint| |zenodo|
13
+
14
+ *LSAPy* (Land Suitability Analysis in Python) is a highly customizable, open-source Python library designed
15
+ to streamline and enhance Land Suitability Analysis (LSA) workflows. Its objective is to make conducting LSA
16
+ in Python easier and more accessible to users. The package implements a fuzzy-logic approach and provides a
17
+ set of objects that work together to deliver a flexible and user-defined LSA framework.
11
18
 
12
- `LSAPy` stands for Land Suitability Analysis (LSA) in Python. Its objective is to make conducting
13
- LSA in Python easier and more accessible to users. It provides a set of objects built around
14
- `xarray`_ and operating together, making LSA's workflow straight forward and easy to understand.
19
+ By relying on `xarray`_ objects for computation, *LSAPy* is specifically designed to facilitate LSA under climate
20
+ change projections. Moreover, the use of `xarray`_ allows for seamless integration with the broader Python ecosystem,
21
+ such as `dask`_ for efficient parallel processing and `matplotlib`_ for data visualisation. The modular design of
22
+ *LSAPy* addresses some limitations of existing LSA tools by offering greater flexibility, reproducibility, and
23
+ scalability for research and practical applications.
15
24
 
16
25
  .. _`xarray`: https://xarray.pydata.org/en/stable/
26
+ .. _`dask`: https://docs.dask.org/en/stable/
27
+ .. _`matplotlib`: https://matplotlib.org/stable/
17
28
 
18
- Quick Start
19
- -----------
20
- To install `LSAPy`, you can use `pip`:
29
+ Quick Install
30
+ -------------
31
+ To install *LSAPy*, you can use `pip`:
21
32
 
22
33
  .. code-block:: shell
23
34
 
@@ -29,7 +40,14 @@ or `conda`:
29
40
 
30
41
  conda install -c conda-forge lsapy
31
42
 
32
- You can now perform your LSA:
43
+ You can find the development installation instructions in the `Contribution`_ section.
44
+
45
+ Land Suitability Analysis (LSA)
46
+ -------------------------------
47
+
48
+ Below is a quick example of how to conduct a land suitability analysis using *LSAPy*.
49
+
50
+ .. _`User Guide`: https://lsapy.readthedocs.io/en/latest/notebooks/index.html
33
51
 
34
52
  .. code-block:: python
35
53
 
@@ -62,29 +80,36 @@ You can now perform your LSA:
62
80
  # run your analysis
63
81
  lsa.run(params)
64
82
 
65
- More detailed tutorials and examples can be found in the `User Guide`_.
66
-
67
- .. _`User Guide`: https://lsapy.readthedocs.io/en/latest/notebooks/index.html
68
-
83
+ For more detailed tutorials and examples, please refer to the `User Guide`_.
69
84
 
70
85
  Contributing
71
86
  ------------
72
87
 
73
- `LSAPy` is an open-source project and we welcome contributions from the community. If you are interested in contributing, please
88
+ *LSAPy* is an open-source project and we welcome contributions from the community. If you are interested in contributing, please
74
89
  refer to the `Contribution`_ section for guidelines on how to get started helping us improve the library.
75
90
 
76
- .. _`Contribution`: https://lsapy.readthedocs.io/en/latest/community/contributing.html
91
+ How to cite *LSAPy*
92
+ -------------------
93
+
94
+ If you use *LSAPy* in your research or project, please consider citing it. The software is currently under review by
95
+ `pyOpenSci <https://github.com/pyOpenSci/software-submission/issues/261>`__ for publication in the `Journal of Open Source Software`
96
+ (JOSS), and we will update this section with the relevant reference once the review process is complete. In the meantime,
97
+ you can cite the preprint, which is available on `Research Square` : https://doi.org/10.21203/rs.3.rs-8399348/v1.
98
+
99
+ If you wish to cite a specific version of the software, you can find the relevant reference on `Zenodo` :
100
+ https://doi.org/10.5281/zenodo.15015110.
77
101
 
78
102
  Credits
79
103
  -------
80
104
 
81
- The development of `LSAPy` started as part of a PhD, funded by the `Food Transition 2050`_ Joint Postgraduate School and hosted
105
+ The development of *LSAPy* started as part of a PhD, funded by the `Food Transition 2050`_ Joint Postgraduate School and hosted
82
106
  by the `University of Canterbury`_ in New Zealand.
83
107
 
84
108
  |FT2050| |UC-white| |UC-black|
85
109
 
86
110
  The Python package has been created following the `pyOpenSci Guidebook`_.
87
111
 
112
+ .. _`Contribution`: https://lsapy.readthedocs.io/en/latest/community/contributing.html
88
113
  .. _`Food Transition 2050`: https://www.foodtransitions2050.ac.nz/
89
114
  .. _`University of Canterbury`: https://www.canterbury.ac.nz/
90
115
  .. _`pyOpenSci Guidebook`: https://www.pyopensci.org/python-package-guide/
@@ -156,3 +181,7 @@ The Python package has been created following the `pyOpenSci Guidebook`_.
156
181
  .. |python-versions| image:: https://img.shields.io/pypi/pyversions/lsapy
157
182
  :target: https://pypi.python.org/pypi/lsapy
158
183
  :alt: Supported Python Versions
184
+
185
+ .. |preprint| image:: https://img.shields.io/badge/preprint-10.21203%2Frs.3.rs--8399348%2Fv1-brightgreen?style=flat&color=brightgreen
186
+ :target: https://doi.org/10.21203/rs.3.rs-8399348/v1
187
+ :alt: Link to preprint on Research Square
@@ -12,4 +12,3 @@ This page provides an overview of all functions, modules, objects implemented in
12
12
  api/lsa
13
13
  api/stats
14
14
  api/utils
15
- api/deprecated
@@ -5,6 +5,7 @@ Getting Started
5
5
  Installation
6
6
  ------------
7
7
 
8
+ .. _`Contribution`: https://lsapy.readthedocs.io/en/latest/community/contributing.html
8
9
  .. _PyPI: https://pypi.org/project/laspy/
9
10
  .. _conda-forge: https://conda-forge.org/
10
11
 
@@ -20,6 +21,8 @@ or from `conda-forge`_ using `conda`:
20
21
 
21
22
  conda install -c conda-forge lsapy
22
23
 
24
+ You can find the development installation instructions in the `Contribution`_ section.
25
+
23
26
  Land Suitability Analysis (LSA)
24
27
  -------------------------------
25
28
 
@@ -0,0 +1,40 @@
1
+ .. lsapy documentation master file, created by
2
+ sphinx-quickstart on Tue Apr 22 19:32:21 2025.
3
+ You can adapt this file completely to your liking, but it should at least
4
+ contain the root `toctree` directive.
5
+
6
+ :html_theme.sidebar_secondary.remove:
7
+
8
+ ===================
9
+ LSAPy Documentation
10
+ ===================
11
+
12
+ Description
13
+ -----------
14
+
15
+ `LSAPy` (Land Suitability Analysis in Python) is a highly customizable, open-source Python library designed
16
+ to streamline and enhance Land Suitability Analysis (LSA) workflows. Its objective is to make conducting LSA
17
+ in Python easier and more accessible to users. The package implements a fuzzy-logic approach and provides a
18
+ set of objects that work together to deliver a flexible and user-defined LSA framework.
19
+
20
+ By relying on `xarray`_ objects for computation, `LSAPy` is specifically designed to facilitate LSA under climate
21
+ change projections. Moreover, the use of `xarray`_ allows for seamless integration with the broader Python ecosystem,
22
+ such as `dask`_ for efficient parallel processing and `matplotlib`_ for data visualisation. The modular design of
23
+ `LSAPy` addresses some limitations of existing LSA tools by offering greater flexibility, reproducibility, and
24
+ scalability for research and practical applications.
25
+
26
+ .. toctree::
27
+ :maxdepth: 2
28
+ :caption: Table of Contents:
29
+
30
+ About <readme>
31
+ Getting Started <getting_started/index>
32
+ User Guide <notebooks/index>
33
+ API Reference <api>
34
+ Community <community/index>
35
+
36
+ .. toctree::
37
+ :titlesonly:
38
+
39
+ changelog
40
+ references
@@ -27,6 +27,7 @@
27
27
  "metadata": {},
28
28
  "outputs": [],
29
29
  "source": [
30
+ "import lsapy.standardize as lstd\n",
30
31
  "from lsapy import SuitabilityCriteria\n",
31
32
  "from lsapy.utils import open_data\n",
32
33
  "\n",
@@ -36,7 +37,7 @@
36
37
  " name=\"potential_root_depth\",\n",
37
38
  " long_name=\"Potential Rooting Depth Suitability\",\n",
38
39
  " indicator=potential_rooting_depth,\n",
39
- " func=\"vetharaniam2022_eq5\",\n",
40
+ " func=lstd.vetharaniam2022_eq5,\n",
40
41
  " fparams={\"a\": -11.98, \"b\": 0.459},\n",
41
42
  ")"
42
43
  ]
@@ -87,7 +88,7 @@
87
88
  " name=\"water_requirements\",\n",
88
89
  " long_name=\"Annual Rainfall Requirement Suitability\",\n",
89
90
  " indicator=prtot,\n",
90
- " func=\"vetharaniam2022_eq5\",\n",
91
+ " func=lstd.vetharaniam2022_eq5,\n",
91
92
  " fparams={\"a\": 0.876, \"b\": 1248},\n",
92
93
  ")"
93
94
  ]
@@ -11,6 +11,5 @@ and explaining how they operate together to perform Land Suitability Analysis (L
11
11
  .. toctree::
12
12
  :maxdepth: 2
13
13
 
14
- functions
15
14
  criteria
16
15
  lsa
@@ -28,6 +28,7 @@
28
28
  "import matplotlib.pyplot as plt\n",
29
29
  "from xclim.indicators.atmos import precip_accumulation\n",
30
30
  "\n",
31
+ "import lsapy.standardize as lstd\n",
31
32
  "from lsapy import LandSuitabilityAnalysis, SuitabilityCriteria\n",
32
33
  "from lsapy.utils import open_data\n",
33
34
  "\n",
@@ -54,7 +55,7 @@
54
55
  " weight=2,\n",
55
56
  " category=\"soil\",\n",
56
57
  " indicator=soil_data[\"potential_rooting_depth\"],\n",
57
- " func=\"vetharaniam2022_eq5\",\n",
58
+ " func=lstd.vetharaniam2022_eq5,\n",
58
59
  " fparams={\"a\": -11.98, \"b\": 0.459},\n",
59
60
  " ),\n",
60
61
  " \"drainage_class\": SuitabilityCriteria(\n",
@@ -63,7 +64,7 @@
63
64
  " category=\"soil\",\n",
64
65
  " long_name=\"Drainage Class Suitability\",\n",
65
66
  " indicator=soil_data[\"drainage\"],\n",
66
- " func=\"discrete\",\n",
67
+ " func=lstd.discrete,\n",
67
68
  " fparams={\"rules\": {0: 0, 1: 0.1, 2: 0.5, 3: 0.9, 4: 1}},\n",
68
69
  " ),\n",
69
70
  " \"water_requirements\": SuitabilityCriteria(\n",
@@ -72,7 +73,7 @@
72
73
  " category=\"climate\",\n",
73
74
  " long_name=\"Annual Rainfall Requirement Suitability\",\n",
74
75
  " indicator=precip_accumulation(pr, freq=\"YS\"),\n",
75
- " func=\"vetharaniam2022_eq5\",\n",
76
+ " func=lstd.vetharaniam2022_eq5,\n",
76
77
  " fparams={\"a\": 0.876, \"b\": 1248},\n",
77
78
  " ),\n",
78
79
  " },\n",
@@ -2,7 +2,7 @@ name: lsapy
2
2
  channels:
3
3
  - conda-forge
4
4
  dependencies:
5
- - python >=3.10
5
+ - python >=3.10,<3.15
6
6
  - geopandas >=0.14.0
7
7
  - numpy >=1.26.0
8
8
  - pandas >=2.2.0
@@ -19,6 +19,7 @@ dependencies:
19
19
  - deptry >=0.23.0
20
20
  - flit >=3.11
21
21
  - h5netcdf >=1.4.0
22
+ - h5py
22
23
  - ipykernel
23
24
  - ipython >=8.20.0
24
25
  - matplotlib >=3.9.0
@@ -6,7 +6,7 @@ import nox
6
6
  nox.options.sessions = ("tests", "notebooks", "doctests")
7
7
 
8
8
 
9
- @nox.session(python=["3.10", "3.11", "3.12", "3.13"])
9
+ @nox.session(python=["3.10", "3.11", "3.12", "3.13", "3.14"])
10
10
  def tests(session):
11
11
  session.install(".[dev]", "h5netcdf", "netCDF4")
12
12
  session.run("pytest")
@@ -25,6 +25,7 @@ classifiers = [
25
25
  "Programming Language :: Python :: 3.11",
26
26
  "Programming Language :: Python :: 3.12",
27
27
  "Programming Language :: Python :: 3.13",
28
+ "Programming Language :: Python :: 3.14",
28
29
  "Topic :: Scientific/Engineering :: GIS",
29
30
  ]
30
31
  dynamic = ["description", "version"]
@@ -47,6 +48,7 @@ dev = [
47
48
  "coverage[toml] >=7.7.0",
48
49
  "flit >=3.11",
49
50
  "h5netcdf >=1.4.0",
51
+ "h5py",
50
52
  "ipython >=8.20.0",
51
53
  "matplotlib >=3.9.0",
52
54
  "mypy >=1.17.1",
@@ -83,7 +85,7 @@ Issues = "https://github.com/baptistehamon/lsapy/issues"
83
85
  Zenodo = "https://doi.org/10.5281/zenodo.15015110"
84
86
 
85
87
  [tool.bumpversion]
86
- current_version = "0.3.0"
88
+ current_version = "0.4.0"
87
89
  commit = true
88
90
  commit_args = "--no-verify --signoff"
89
91
  tag = false
@@ -227,6 +229,7 @@ ignore = [
227
229
  "docs/*.py" = ["D100", "D101", "D102", "D103", "PLR6301"]
228
230
  "src/lsapy/**/__init__.py" = ["F401", "F403"]
229
231
  "tests/**/test*.py" = ["D101", "D102", "D103", "PLR2004", "PLR6301", "S101"]
232
+ "tests/**/conftest.py" = ["S101"]
230
233
 
231
234
  [tool.ruff.lint.isort]
232
235
  case-sensitive = true
@@ -1,9 +1,8 @@
1
1
  """A Python package for Land Suitability Analysis."""
2
2
 
3
3
  from lsapy.criteria import SuitabilityCriteria
4
- from lsapy.functions import *
5
4
  from lsapy.lsa import LandSuitabilityAnalysis
6
5
 
7
6
  __author__ = "Baptiste Hamon"
8
7
  __email__ = "baptiste.hamon@pg.canterbury.ac.nz"
9
- __version__ = "0.3.0"
8
+ __version__ = "0.4.0"