pyhelpers 2.5.2__tar.gz → 2.5.4__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.
- pyhelpers-2.5.4/.gitignore +34 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/CHANGELOG.md +41 -1
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/PKG-INFO +52 -7
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/README.md +47 -6
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/__init__.py +17 -10
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/data/user-agent-strings.json +117 -111
- pyhelpers-2.5.4/pyhelpers/dbms/__init__.py +31 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/dbms/_base.py +2 -3
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/dbms/mssql.py +128 -75
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/dbms/postgresql.py +17 -25
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/dbms/utils.py +45 -29
- pyhelpers-2.5.4/pyhelpers/dirs/__init__.py +52 -0
- pyhelpers-2.5.4/pyhelpers/geom/__init__.py +27 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/geom/transforms.py +76 -46
- pyhelpers-2.5.4/pyhelpers/ops/__init__.py +30 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/ops/downloads.py +68 -42
- pyhelpers-2.5.4/pyhelpers/settings/__init__.py +26 -0
- pyhelpers-2.5.4/pyhelpers/store/__init__.py +30 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/store/converters.py +4 -3
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/store/loaders.py +71 -41
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/store/savers.py +78 -52
- pyhelpers-2.5.4/pyhelpers/text/__init__.py +26 -0
- pyhelpers-2.5.4/pyhelpers/viz/__init__.py +37 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/viz/maps.py +32 -10
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyproject.toml +50 -20
- pyhelpers-2.5.2/.gitignore +0 -28
- pyhelpers-2.5.2/pyhelpers/data/.metadata +0 -11
- pyhelpers-2.5.2/pyhelpers/dbms/__init__.py +0 -11
- pyhelpers-2.5.2/pyhelpers/dirs/__init__.py +0 -32
- pyhelpers-2.5.2/pyhelpers/geom/__init__.py +0 -7
- pyhelpers-2.5.2/pyhelpers/ops/__init__.py +0 -10
- pyhelpers-2.5.2/pyhelpers/settings/__init__.py +0 -6
- pyhelpers-2.5.2/pyhelpers/store/__init__.py +0 -10
- pyhelpers-2.5.2/pyhelpers/text/__init__.py +0 -6
- pyhelpers-2.5.2/pyhelpers/viz/__init__.py +0 -17
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/CITATION.cff +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/LICENSE +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/_cache.py +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/data/ansi-escape-codes.json +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/data/english-numerals.json +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/data/xlsx2csv.vbs +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/dirs/formatting.py +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/dirs/management.py +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/dirs/navigation.py +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/dirs/validation.py +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/geom/distances.py +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/geom/shapes.py +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/ops/apis.py +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/ops/computation.py +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/ops/general.py +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/ops/manipulation.py +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/ops/web.py +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/settings/configurations.py +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/settings/preferences.py +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/store/utils.py +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/text/preprocessing.py +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/text/similarity.py +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/viz/color_utils.py +0 -0
- {pyhelpers-2.5.2 → pyhelpers-2.5.4}/pyhelpers/viz/colormap.py +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Environment
|
|
2
|
+
.env
|
|
3
|
+
.idea/
|
|
4
|
+
.venv/
|
|
5
|
+
*/vscode/
|
|
6
|
+
**/__pycache__/
|
|
7
|
+
venv/
|
|
8
|
+
|
|
9
|
+
# Python runtime and bytecode
|
|
10
|
+
__pycache__/
|
|
11
|
+
*.py[cod]
|
|
12
|
+
|
|
13
|
+
# Sphinx documentation
|
|
14
|
+
docs/build/
|
|
15
|
+
docs/source/api/
|
|
16
|
+
|
|
17
|
+
# Jupyter Notebooks
|
|
18
|
+
.ipynb_checkpoints/
|
|
19
|
+
|
|
20
|
+
# Testing and code coverage
|
|
21
|
+
.coverage
|
|
22
|
+
.coverage.*
|
|
23
|
+
reports/
|
|
24
|
+
.pytest_cache/
|
|
25
|
+
|
|
26
|
+
# Distribution and packaging
|
|
27
|
+
dist/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
|
|
30
|
+
# Project-specific directories / files
|
|
31
|
+
tutorials/*
|
|
32
|
+
!tutorials/.gitkeep
|
|
33
|
+
.pypirc
|
|
34
|
+
cmd.md
|
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
# Changelog / Release notes
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## [2.5.4](https://github.com/mikeqfu/pyhelpers/releases/tag/2.5.4)
|
|
5
|
+
|
|
6
|
+
(*20 November 2026*)
|
|
7
|
+
|
|
8
|
+
### Notable [changes](https://github.com/mikeqfu/pyhelpers/compare/2.5.3...2.5.4) since [2.5.3](https://pypi.org/project/pyhelpers/2.5.3/):
|
|
9
|
+
|
|
10
|
+
- **Subpackage refinements & bug fixes:**
|
|
11
|
+
* Configured `GitHubFileDownloader` with a `certifi`-backed SSL context and private opener to fix certificate verification failures (#165, #170).
|
|
12
|
+
* Modernised Shapely geometry transform logic and fixed variable scoping in `geom` subpackage (#168).
|
|
13
|
+
* Replaced deprecated `ExcelFile.parse` with `pandas.read_excel` (#163, #169).
|
|
14
|
+
* Fixed `load_parquet` returning `None` and stopped forwarding `engine='auto'` to Pandas when saving Parquet files (#166, #167).
|
|
15
|
+
- **Documentation & project metadata:**
|
|
16
|
+
* Renamed Sphinx autosummary output directory from `_generated` to `api`, removed redundant `requirements.txt` from documentation source and added clean build targets (#171).
|
|
17
|
+
* Standardised metadata keys, updated build configuration in `pyproject.toml` (#171).
|
|
18
|
+
- **CI/CD & maintenance:**
|
|
19
|
+
* Configured CI test coverage workflow, refined unit test suite and upgraded `astral-sh/setup-uv` Action dependencies (#155, #159, #161).
|
|
20
|
+
* Refined `.gitignore` patterns, added `.gitkeep` placeholder for tutorials directory and locked latest package dependencies in `uv.lock` (#160, #171).
|
|
21
|
+
|
|
22
|
+
**For more information and detailed specifications, check out the [PyHelpers 2.5.4 documentation](https://pyhelpers.readthedocs.io/en/2.5.4/).**
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [2.5.3](https://github.com/mikeqfu/pyhelpers/releases/tag/2.5.3)
|
|
26
|
+
|
|
27
|
+
(*20 September 2026*)
|
|
28
|
+
|
|
29
|
+
### Notable [changes](https://github.com/mikeqfu/pyhelpers/compare/2.5.2...2.5.3) since [2.5.2](https://pypi.org/project/pyhelpers/2.5.2/):
|
|
30
|
+
|
|
31
|
+
- **CI/CD & test coverage:**
|
|
32
|
+
* Added automated test coverage workflow using GitHub Actions and Codecov with an 80% target (#155).
|
|
33
|
+
* Integrated Codecov status badges into repository `README` and Sphinx documentation index (#156).
|
|
34
|
+
- **Subpackage refinements & bug fixes:**
|
|
35
|
+
* Extended unit test suites for `dbms`, `store` and `_cache` subpackages, updating default ODBC driver configuration to v18 (#155).
|
|
36
|
+
* Fixed keyword argument iteration in `add_sql_query_condition` (#155).
|
|
37
|
+
- **Maintenance & dependency management:**
|
|
38
|
+
* Added `python-dotenv` dependency, updated `.gitignore` rules and synchronized dependency lockfile (`uv.lock`) (#155, #156).
|
|
39
|
+
* Prepared project metadata and version bump for release 2.5.3 (#156).
|
|
40
|
+
|
|
41
|
+
**For more information and detailed specifications, check out the [PyHelpers 2.5.3 documentation](https://pyhelpers.readthedocs.io/en/2.5.3/).**
|
|
42
|
+
|
|
43
|
+
|
|
4
44
|
## [2.5.2](https://github.com/mikeqfu/pyhelpers/releases/tag/2.5.2)
|
|
5
45
|
|
|
6
46
|
(*25 August 2026*)
|
|
@@ -9,7 +49,7 @@
|
|
|
9
49
|
|
|
10
50
|
- **Packaging & metadata resolution:**
|
|
11
51
|
* Standardised `license`, `authors` and `[project.urls]` tables in `pyproject.toml` to fix PyPI metadata rendering.
|
|
12
|
-
* Standardised `__title__` string formatting in package
|
|
52
|
+
* Standardised `__title__` string formatting in package initialization module (`__init__.py`).
|
|
13
53
|
- **Documentation & maintenance:**
|
|
14
54
|
* Standardised copyright format in Sphinx configuration (`docs/conf.py`).
|
|
15
55
|
* Updated `uv.lock` dependency lockfile.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: pyhelpers
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.4
|
|
4
4
|
Summary: An open-source toolkit for facilitating Python users' data manipulation tasks.
|
|
5
5
|
Project-URL: Homepage, https://github.com/mikeqfu/pyhelpers
|
|
6
6
|
Project-URL: Documentation, https://pyhelpers.readthedocs.io/en/latest/
|
|
@@ -17,6 +17,10 @@ Classifier: Intended Audience :: Science/Research
|
|
|
17
17
|
Classifier: Operating System :: Microsoft :: Windows
|
|
18
18
|
Classifier: Operating System :: POSIX :: Linux
|
|
19
19
|
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
24
|
Classifier: Topic :: Education
|
|
21
25
|
Classifier: Topic :: Scientific/Engineering
|
|
22
26
|
Classifier: Topic :: Software Development
|
|
@@ -89,11 +93,12 @@ Description-Content-Type: text/markdown
|
|
|
89
93
|
|
|
90
94
|
*An open-source toolkit for facilitating Python users' data manipulation tasks.*
|
|
91
95
|
|
|
92
|
-
[](https://www.python.org/downloads/)
|
|
93
97
|
[](https://github.com/mikeqfu/pyhelpers/blob/master/LICENSE)
|
|
94
98
|
[](https://pyhelpers.readthedocs.io/en/latest/?badge=latest)
|
|
95
99
|
[](https://github.com/mikeqfu/pyhelpers/actions)
|
|
96
100
|
[](https://app.codacy.com/gh/mikeqfu/pyhelpers/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
|
|
101
|
+
[](https://codecov.io/gh/mikeqfu/pyhelpers)
|
|
97
102
|
[](https://doi.org/10.5281/zenodo.4017438)
|
|
98
103
|
|
|
99
104
|
PyHelpers is an open-source Python package designed to streamline data (pre-)processing and manipulation tasks. It accommodates a wide range of functions and classes grounded in practical applications, making common data operations more accessible and efficient. This toolkit is particularly useful for Python learners, researchers and data scientists seeking to enhance their workflows.
|
|
@@ -104,18 +109,18 @@ With its comprehensive suite of practical tools, PyHelpers simplifies complex da
|
|
|
104
109
|
|
|
105
110
|
## Installation
|
|
106
111
|
|
|
107
|
-
PyHelpers can be installed using [`uv`](https://docs.astral.sh/uv/) (recommended) or [`pip`](https://pip.pypa.io/en/stable/cli/pip/).
|
|
112
|
+
PyHelpers can be installed using [`uv`](https://docs.astral.sh/uv/) (recommended for speed, reliability and modern dependency resolution), [`conda-forge`](https://anaconda.org/conda-forge/pyhelpers) (including [`pixi`](https://pixi.sh/)) or traditional [`pip`](https://pip.pypa.io/en/stable/cli/pip/).
|
|
108
113
|
|
|
109
114
|
<details open>
|
|
110
115
|
<summary><b>Using <code>uv</code> (Recommended)</b></summary>
|
|
111
116
|
|
|
112
|
-
To add PyHelpers to an existing project:
|
|
117
|
+
To add PyHelpers to an existing project managed by [`uv`](https://docs.astral.sh/uv/):
|
|
113
118
|
|
|
114
119
|
```bash
|
|
115
120
|
uv add pyhelpers
|
|
116
121
|
```
|
|
117
122
|
|
|
118
|
-
To include all optional features (e.g. geospatial and database
|
|
123
|
+
To include all optional features (e.g. geospatial drivers and database connectors):
|
|
119
124
|
|
|
120
125
|
```bash
|
|
121
126
|
uv add "pyhelpers[full]"
|
|
@@ -127,12 +132,39 @@ If you are working in an activated virtual environment:
|
|
|
127
132
|
uv pip install --upgrade pyhelpers
|
|
128
133
|
```
|
|
129
134
|
|
|
135
|
+
To install all optional features inside an active virtual environment:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
uv pip install --upgrade "pyhelpers[full]"
|
|
139
|
+
```
|
|
130
140
|
</details>
|
|
131
141
|
|
|
132
142
|
<details>
|
|
133
|
-
<summary><b>Using
|
|
143
|
+
<summary><b>Using <code>pixi</code></b></summary>
|
|
144
|
+
|
|
145
|
+
To add the core PyHelpers package to a workspace using [`pixi`](https://pixi.sh/):
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
pixi add pyhelpers
|
|
149
|
+
```
|
|
134
150
|
|
|
135
|
-
|
|
151
|
+
To add PyHelpers along with optional dependencies (e.g. `gdal`, `pyarrow`, `fiona` and so on) via `pixi`:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
pixi add pyhelpers gdal pyarrow fiona
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Alternatively, to install PyHelpers with PyPI extras inside a `pixi` project:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
pixi add --pypi "pyhelpers[full]"
|
|
161
|
+
```
|
|
162
|
+
</details>
|
|
163
|
+
|
|
164
|
+
<details>
|
|
165
|
+
<summary><b>Using <code>pip</code></b></summary>
|
|
166
|
+
|
|
167
|
+
To install PyHelpers into an active environment using [`pip`](https://pip.pypa.io/en/stable/cli/pip/):
|
|
136
168
|
|
|
137
169
|
```bash
|
|
138
170
|
pip install --upgrade pyhelpers
|
|
@@ -143,7 +175,20 @@ To install with all optional dependencies:
|
|
|
143
175
|
```bash
|
|
144
176
|
pip install --upgrade "pyhelpers[full]"
|
|
145
177
|
```
|
|
178
|
+
</details>
|
|
146
179
|
|
|
180
|
+
<details>
|
|
181
|
+
<summary><b>Using <code>conda</code></b></summary>
|
|
182
|
+
|
|
183
|
+
To install PyHelpers into an active environment using [`conda`](https://docs.conda.io/) (or [`mamba`](https://mamba.readthedocs.io/)):
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
# Core package
|
|
187
|
+
conda install -c conda-forge pyhelpers
|
|
188
|
+
|
|
189
|
+
# Full suite with binary C-extensions
|
|
190
|
+
conda install -c conda-forge pyhelpers gdal pyarrow fiona
|
|
191
|
+
```
|
|
147
192
|
</details>
|
|
148
193
|
|
|
149
194
|
For detailed options, development setup and Windows troubleshooting (e.g. installing C-extension wheels), see the full [Installation Guide](https://pyhelpers.readthedocs.io/en/latest/installation.html).
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
*An open-source toolkit for facilitating Python users' data manipulation tasks.*
|
|
4
4
|
|
|
5
|
-
[](https://www.python.org/downloads/)
|
|
6
6
|
[](https://github.com/mikeqfu/pyhelpers/blob/master/LICENSE)
|
|
7
7
|
[](https://pyhelpers.readthedocs.io/en/latest/?badge=latest)
|
|
8
8
|
[](https://github.com/mikeqfu/pyhelpers/actions)
|
|
9
9
|
[](https://app.codacy.com/gh/mikeqfu/pyhelpers/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
|
|
10
|
+
[](https://codecov.io/gh/mikeqfu/pyhelpers)
|
|
10
11
|
[](https://doi.org/10.5281/zenodo.4017438)
|
|
11
12
|
|
|
12
13
|
PyHelpers is an open-source Python package designed to streamline data (pre-)processing and manipulation tasks. It accommodates a wide range of functions and classes grounded in practical applications, making common data operations more accessible and efficient. This toolkit is particularly useful for Python learners, researchers and data scientists seeking to enhance their workflows.
|
|
@@ -17,18 +18,18 @@ With its comprehensive suite of practical tools, PyHelpers simplifies complex da
|
|
|
17
18
|
|
|
18
19
|
## Installation
|
|
19
20
|
|
|
20
|
-
PyHelpers can be installed using [`uv`](https://docs.astral.sh/uv/) (recommended) or [`pip`](https://pip.pypa.io/en/stable/cli/pip/).
|
|
21
|
+
PyHelpers can be installed using [`uv`](https://docs.astral.sh/uv/) (recommended for speed, reliability and modern dependency resolution), [`conda-forge`](https://anaconda.org/conda-forge/pyhelpers) (including [`pixi`](https://pixi.sh/)) or traditional [`pip`](https://pip.pypa.io/en/stable/cli/pip/).
|
|
21
22
|
|
|
22
23
|
<details open>
|
|
23
24
|
<summary><b>Using <code>uv</code> (Recommended)</b></summary>
|
|
24
25
|
|
|
25
|
-
To add PyHelpers to an existing project:
|
|
26
|
+
To add PyHelpers to an existing project managed by [`uv`](https://docs.astral.sh/uv/):
|
|
26
27
|
|
|
27
28
|
```bash
|
|
28
29
|
uv add pyhelpers
|
|
29
30
|
```
|
|
30
31
|
|
|
31
|
-
To include all optional features (e.g. geospatial and database
|
|
32
|
+
To include all optional features (e.g. geospatial drivers and database connectors):
|
|
32
33
|
|
|
33
34
|
```bash
|
|
34
35
|
uv add "pyhelpers[full]"
|
|
@@ -40,12 +41,39 @@ If you are working in an activated virtual environment:
|
|
|
40
41
|
uv pip install --upgrade pyhelpers
|
|
41
42
|
```
|
|
42
43
|
|
|
44
|
+
To install all optional features inside an active virtual environment:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
uv pip install --upgrade "pyhelpers[full]"
|
|
48
|
+
```
|
|
43
49
|
</details>
|
|
44
50
|
|
|
45
51
|
<details>
|
|
46
|
-
<summary><b>Using
|
|
52
|
+
<summary><b>Using <code>pixi</code></b></summary>
|
|
53
|
+
|
|
54
|
+
To add the core PyHelpers package to a workspace using [`pixi`](https://pixi.sh/):
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pixi add pyhelpers
|
|
58
|
+
```
|
|
47
59
|
|
|
48
|
-
|
|
60
|
+
To add PyHelpers along with optional dependencies (e.g. `gdal`, `pyarrow`, `fiona` and so on) via `pixi`:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pixi add pyhelpers gdal pyarrow fiona
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Alternatively, to install PyHelpers with PyPI extras inside a `pixi` project:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pixi add --pypi "pyhelpers[full]"
|
|
70
|
+
```
|
|
71
|
+
</details>
|
|
72
|
+
|
|
73
|
+
<details>
|
|
74
|
+
<summary><b>Using <code>pip</code></b></summary>
|
|
75
|
+
|
|
76
|
+
To install PyHelpers into an active environment using [`pip`](https://pip.pypa.io/en/stable/cli/pip/):
|
|
49
77
|
|
|
50
78
|
```bash
|
|
51
79
|
pip install --upgrade pyhelpers
|
|
@@ -56,7 +84,20 @@ To install with all optional dependencies:
|
|
|
56
84
|
```bash
|
|
57
85
|
pip install --upgrade "pyhelpers[full]"
|
|
58
86
|
```
|
|
87
|
+
</details>
|
|
59
88
|
|
|
89
|
+
<details>
|
|
90
|
+
<summary><b>Using <code>conda</code></b></summary>
|
|
91
|
+
|
|
92
|
+
To install PyHelpers into an active environment using [`conda`](https://docs.conda.io/) (or [`mamba`](https://mamba.readthedocs.io/)):
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Core package
|
|
96
|
+
conda install -c conda-forge pyhelpers
|
|
97
|
+
|
|
98
|
+
# Full suite with binary C-extensions
|
|
99
|
+
conda install -c conda-forge pyhelpers gdal pyarrow fiona
|
|
100
|
+
```
|
|
60
101
|
</details>
|
|
61
102
|
|
|
62
103
|
For detailed options, development setup and Windows troubleshooting (e.g. installing C-extension wheels), see the full [Installation Guide](https://pyhelpers.readthedocs.io/en/latest/installation.html).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2026 Qian Fu
|
|
1
|
+
# Copyright (c) 2019-2026 Qian Fu
|
|
2
2
|
#
|
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
4
|
# of this software and associated documentation files (the "Software"), to deal
|
|
@@ -75,22 +75,25 @@ def _load_metadata():
|
|
|
75
75
|
cfg = tomllib.load(f)
|
|
76
76
|
|
|
77
77
|
project_info = cfg.get('project', {})
|
|
78
|
-
custom_info = cfg.get('tool', {}).get('
|
|
78
|
+
custom_info = cfg.get('tool', {}).get('pyhelpers', {}).get('metadata', {})
|
|
79
79
|
|
|
80
80
|
name = project_info.get('name', package_name)
|
|
81
81
|
version = version or project_info.get('version')
|
|
82
82
|
description = description or project_info.get('description')
|
|
83
83
|
|
|
84
|
-
authors_str = ', '.join(a.get('name', '') for a in project_info
|
|
84
|
+
authors_str = ', '.join(a.get('name', '') for a in project_info.get('authors', []))
|
|
85
85
|
|
|
86
86
|
# Format copyright string
|
|
87
87
|
start_year = 2019
|
|
88
88
|
current_year = datetime.date.today().year
|
|
89
89
|
years = f'{start_year}-{current_year}' if current_year > start_year else f'{start_year}'
|
|
90
|
-
copyright_str =
|
|
90
|
+
copyright_str = (
|
|
91
|
+
f'Copyright (c) {years} {authors_str}'.strip() if authors_str
|
|
92
|
+
else f'Copyright (c) {years}'
|
|
93
|
+
)
|
|
91
94
|
|
|
92
95
|
# Parse corresponding author details
|
|
93
|
-
corr_auth_list = custom_info.get('
|
|
96
|
+
corr_auth_list = custom_info.get('corresponding-author', [])
|
|
94
97
|
corr_author_str = ''
|
|
95
98
|
affiliation_str = ''
|
|
96
99
|
|
|
@@ -111,8 +114,9 @@ def _load_metadata():
|
|
|
111
114
|
'copyright': copyright_str,
|
|
112
115
|
|
|
113
116
|
# Custom medata
|
|
114
|
-
'
|
|
115
|
-
'
|
|
117
|
+
'project-name': custom_info.get('project-name', ''),
|
|
118
|
+
'project-start': custom_info.get('project-start', ''),
|
|
119
|
+
'corresponding-author': corr_author_str,
|
|
116
120
|
'affiliation': affiliation_str,
|
|
117
121
|
'funder': custom_info.get('funder', ''),
|
|
118
122
|
}
|
|
@@ -120,19 +124,22 @@ def _load_metadata():
|
|
|
120
124
|
|
|
121
125
|
METADATA = _load_metadata()
|
|
122
126
|
|
|
123
|
-
__project__ = '
|
|
127
|
+
__project__ = METADATA.get('project-name')
|
|
124
128
|
__pkgname__ = METADATA.get('name')
|
|
125
129
|
__description__ = METADATA.get('description')
|
|
130
|
+
|
|
126
131
|
__title__ = f"{__project__}: {__description__.strip('.')}" if __description__ else __project__
|
|
132
|
+
|
|
127
133
|
__version__ = METADATA.get('version')
|
|
128
134
|
__license__ = METADATA.get('license')
|
|
129
135
|
__copyright__ = METADATA.get('copyright')
|
|
130
|
-
|
|
136
|
+
|
|
137
|
+
__first_release__ = METADATA.get('project-start')
|
|
131
138
|
|
|
132
139
|
__funder__ = METADATA.get("funder")
|
|
133
140
|
|
|
134
141
|
__author__ = METADATA.get('authors')
|
|
135
|
-
__corresponding_author__ = METADATA.get('
|
|
142
|
+
__corresponding_author__ = METADATA.get('corresponding-author')
|
|
136
143
|
__affiliation__ = METADATA.get('affiliation')
|
|
137
144
|
|
|
138
145
|
__all__ = [
|