mapkgsutils 0.0.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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Javier Millan Acosta
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,385 @@
1
+ Metadata-Version: 2.4
2
+ Name: mapkgsutils
3
+ Version: 0.0.2
4
+ Summary: Utils shared by several mapping set generation tools for biomedical databases
5
+ Keywords: snekpack,cookiecutter
6
+ Author: Javier Millan Acosta
7
+ Author-email: Javier Millan Acosta <javier.millanacosta@gmail.com>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Classifier: Development Status :: 1 - Planning
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Framework :: Pytest
15
+ Classifier: Framework :: Sphinx
16
+ Classifier: Natural Language :: English
17
+ Classifier: Programming Language :: Python
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
23
+ Classifier: Programming Language :: Python :: 3 :: Only
24
+ Classifier: Typing :: Typed
25
+ Requires-Dist: more-itertools
26
+ Requires-Dist: tqdm
27
+ Requires-Dist: click
28
+ Requires-Dist: more-click
29
+ Requires-Dist: typing-extensions
30
+ Requires-Dist: pydantic>=2.0
31
+ Requires-Dist: pyyaml
32
+ Requires-Dist: sssom==0.4.21
33
+ Requires-Dist: sssom-schema==1.1.0a5
34
+ Requires-Dist: curies>=0.7.0
35
+ Requires-Dist: polars>=0.20.0
36
+ Requires-Dist: polars-runtime-32
37
+ Requires-Dist: pandas
38
+ Requires-Dist: numpy
39
+ Requires-Dist: httpx>=0.24.0
40
+ Maintainer: Javier Millan Acosta
41
+ Maintainer-email: Javier Millan Acosta <javier.millanacosta@gmail.com>
42
+ Requires-Python: >=3.10
43
+ Project-URL: Bug Tracker, https://github.com//mapkgsutils/issues
44
+ Project-URL: Homepage, https://github.com//mapkgsutils
45
+ Project-URL: Repository, https://github.com//mapkgsutils.git
46
+ Project-URL: Documentation, https://mapkgsutils.readthedocs.io
47
+ Project-URL: Funding, https://github.com/sponsors/jmillanacosta
48
+ Description-Content-Type: text/markdown
49
+
50
+ <!--
51
+ <p align="center">
52
+ <img src="https://github.com//mapkgsutils/raw/main/docs/source/logo.png" height="150">
53
+ </p>
54
+ -->
55
+
56
+ <h1 align="center">
57
+ MaPkgsUtilS
58
+ </h1>
59
+
60
+ <p align="center">
61
+ <a href="https://github.com//mapkgsutils/actions/workflows/tests.yml">
62
+ <img alt="Tests" src="https://github.com//mapkgsutils/actions/workflows/tests.yml/badge.svg" /></a>
63
+ <a href="https://pypi.org/project/mapkgsutils">
64
+ <img alt="PyPI" src="https://img.shields.io/pypi/v/mapkgsutils" /></a>
65
+ <a href="https://pypi.org/project/mapkgsutils">
66
+ <img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/mapkgsutils" /></a>
67
+ <a href="https://github.com//mapkgsutils/blob/main/LICENSE">
68
+ <img alt="PyPI - License" src="https://img.shields.io/pypi/l/mapkgsutils" /></a>
69
+ <a href='https://mapkgsutils.readthedocs.io/en/latest/?badge=latest'>
70
+ <img src='https://readthedocs.org/projects/mapkgsutils/badge/?version=latest' alt='Documentation Status' /></a>
71
+ <a href="https://codecov.io/gh//mapkgsutils/branch/main">
72
+ <img src="https://codecov.io/gh//mapkgsutils/branch/main/graph/badge.svg" alt="Codecov status" /></a>
73
+ <a href="https://github.com/cthoyt/cookiecutter-python-package">
74
+ <img alt="Cookiecutter template from @cthoyt" src="https://img.shields.io/badge/Cookiecutter-snekpack-blue" /></a>
75
+ <a href="https://github.com/astral-sh/ruff">
76
+ <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff" style="max-width:100%;"></a>
77
+ <a href="https://github.com//mapkgsutils/blob/main/.github/CODE_OF_CONDUCT.md">
78
+ <img src="https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg" alt="Contributor Covenant"/></a>
79
+ <!-- uncomment if you archive on zenodo
80
+ <a href="https://doi.org/10.5281/zenodo.XXXXXX">
81
+ <img src="https://zenodo.org/badge/DOI/10.5281/zenodo.XXXXXX.svg" alt="DOI"></a>
82
+ -->
83
+ </p>
84
+
85
+ Utils shared by several mapping set generation tools for biomedical databases.
86
+
87
+ ## 💪 Getting Started
88
+
89
+ > TODO show in a very small amount of space the **MOST** useful thing your
90
+ > package can do. Make it as short as possible! You have an entire set of docs
91
+ > for later.
92
+
93
+ ### Command Line Interface
94
+
95
+ The `mapkgsutils` command line tool is automatically installed. It can be used
96
+ from the console with the `--help` flag to show all subcommands:
97
+
98
+ ```console
99
+ $ mapkgsutils --help
100
+ ```
101
+
102
+ > TODO show the most useful thing the CLI does! The CLI will have documentation
103
+ > auto-generated by `sphinx`.
104
+
105
+ ## 🚀 Installation
106
+
107
+ <!-- Uncomment this section after your first ``just finish``
108
+ The most recent release can be installed from
109
+ [PyPI](https://pypi.org/project/mapkgsutils/) with uv:
110
+
111
+ ```console
112
+ $ uv pip install mapkgsutils
113
+ ```
114
+
115
+ or with pip:
116
+
117
+ ```console
118
+ $ python3 -m pip install mapkgsutils
119
+ ```
120
+ -->
121
+
122
+ The most recent code and data can be installed directly from GitHub with uv:
123
+
124
+ ```console
125
+ $ uv pip install git+https://github.com//mapkgsutils.git
126
+ ```
127
+
128
+ or with pip:
129
+
130
+ ```console
131
+ $ python3 -m pip install git+https://github.com//mapkgsutils.git
132
+ ```
133
+
134
+ ## 👐 Contributing
135
+
136
+ Contributions, whether filing an issue, making a pull request, or forking, are
137
+ appreciated. See
138
+ [CONTRIBUTING.md](https://github.com//mapkgsutils/blob/main/.github/CONTRIBUTING.md)
139
+ for more information on getting involved.
140
+
141
+ ## 👋 Attribution
142
+
143
+ ### ⚖️ License
144
+
145
+ The code in this package is licensed under the MIT License.
146
+
147
+ <!--
148
+ ### 📖 Citation
149
+
150
+ Citation goes here!
151
+ -->
152
+
153
+ <!--
154
+ ### 🎁 Support
155
+
156
+ This project has been supported by the following organizations (in alphabetical order):
157
+
158
+ - [Biopragmatics Lab](https://biopragmatics.github.io)
159
+
160
+ -->
161
+
162
+ <!--
163
+ ### 💰 Funding
164
+
165
+ This project has been supported by the following grants:
166
+
167
+ | Funding Body | Program | Grant Number |
168
+ |---------------|--------------------------------------------------------------|--------------|
169
+ | Funder | [Grant Name (GRANT-ACRONYM)](https://example.com/grant-link) | ABCXYZ |
170
+ -->
171
+
172
+ ### 🍪 Cookiecutter
173
+
174
+ This package was created with
175
+ [@audreyfeldroy](https://github.com/audreyfeldroy)'s
176
+ [cookiecutter](https://github.com/cookiecutter/cookiecutter) package using
177
+ [@cthoyt](https://github.com/cthoyt)'s
178
+ [cookiecutter-snekpack](https://github.com/cthoyt/cookiecutter-snekpack)
179
+ template.
180
+
181
+ ## 🛠️ For Developers
182
+
183
+ <details>
184
+ <summary>See developer instructions</summary>
185
+
186
+ The final section of the README is for if you want to get involved by making a
187
+ code contribution.
188
+
189
+ ### Development Installation
190
+
191
+ To install in development mode, use the following:
192
+
193
+ ```console
194
+ $ git clone git+https://github.com//mapkgsutils.git
195
+ $ cd mapkgsutils
196
+ $ uv pip install -e .
197
+ ```
198
+
199
+ Alternatively, install using pip:
200
+
201
+ ```console
202
+ $ python3 -m pip install -e .
203
+ ```
204
+
205
+ ### Pre-commit
206
+
207
+ You can optionally use [pre-commit](https://pre-commit.com) to automate running
208
+ key code quality checks on each commit. Enable it with:
209
+
210
+ ```console
211
+ $ uvx pre-commit install
212
+ ```
213
+
214
+ Or using `pip`:
215
+
216
+ ```console
217
+ $ pip install pre-commit
218
+ $ pre-commit install
219
+ ```
220
+
221
+ ### 🥼 Testing
222
+
223
+ After cloning the repository and installing `just` with
224
+ `uv tool install rust-just` or `python3 -m pip install rust-just`, the unit
225
+ tests in the `tests/` folder can be run reproducibly with:
226
+
227
+ ```console
228
+ $ just test
229
+ ```
230
+
231
+ Additionally, these tests are automatically re-run with each commit in a
232
+ [GitHub Action](https://github.com//mapkgsutils/actions?query=workflow%3ATests).
233
+
234
+ ### 📖 Building the Documentation
235
+
236
+ The documentation can be built locally using the following:
237
+
238
+ ```console
239
+ $ git clone git+https://github.com//mapkgsutils.git
240
+ $ cd mapkgsutils
241
+ $ just docs
242
+ $ open docs/build/html/index.html
243
+ ```
244
+
245
+ The documentation automatically installs the package as well as the `docs` extra
246
+ specified in the [`pyproject.toml`](pyproject.toml). `sphinx` plugins like
247
+ `texext` can be added there. Additionally, they need to be added to the
248
+ `extensions` list in [`docs/source/conf.py`](docs/source/conf.py).
249
+
250
+ The documentation can be deployed to [ReadTheDocs](https://readthedocs.io) using
251
+ [this guide](https://docs.readthedocs.io/en/stable/intro/import-guide.html). The
252
+ [`.readthedocs.yml`](.readthedocs.yml) YAML file contains all the configuration
253
+ you'll need. You can also set up continuous integration on GitHub to check not
254
+ only that Sphinx can build the documentation in an isolated environment (i.e.,
255
+ with `just docs-test`) but also that
256
+ [ReadTheDocs can build it too](https://docs.readthedocs.io/en/stable/pull-requests.html).
257
+
258
+ </details>
259
+
260
+ ## 🧑‍💻 For Maintainers
261
+
262
+ <details>
263
+ <summary>See maintainer instructions</summary>
264
+
265
+ ### Initial Configuration
266
+
267
+ #### Configuring ReadTheDocs
268
+
269
+ [ReadTheDocs](https://readthedocs.org) is an external documentation hosting
270
+ service that integrates with GitHub's CI/CD. Do the following for each
271
+ repository:
272
+
273
+ 1. Log in to ReadTheDocs with your GitHub account to install the integration at
274
+ https://readthedocs.org/accounts/login/?next=/dashboard/
275
+ 2. Import your project by navigating to https://readthedocs.org/dashboard/import
276
+ then clicking the plus icon next to your repository
277
+ 3. You can rename the repository on the next screen using a more stylized name
278
+ (i.e., with spaces and capital letters)
279
+ 4. Click next, and you're good to go!
280
+
281
+ #### Configuring Archival on Zenodo
282
+
283
+ [Zenodo](https://zenodo.org) is a long-term archival system that assigns a DOI
284
+ to each release of your package. Do the following for each repository:
285
+
286
+ 1. Log in to Zenodo via GitHub with this link:
287
+ https://zenodo.org/oauth/login/github/?next=%2F. This brings you to a page
288
+ that lists all of your organizations and asks you to approve installing the
289
+ Zenodo app on GitHub. Click "grant" next to any organizations you want to
290
+ enable the integration for, then click the big green "approve" button. This
291
+ step only needs to be done once.
292
+ 2. Navigate to https://zenodo.org/account/settings/github/, which lists all of
293
+ your GitHub repositories (both in your username and any organizations you
294
+ enabled). Click the on/off toggle for any relevant repositories. When you
295
+ make a new repository, you'll have to come back to this
296
+
297
+ After these steps, you're ready to go! After you make "release" on GitHub (steps
298
+ for this are below), you can navigate to
299
+ https://zenodo.org/account/settings/github/repository//mapkgsutils to see the
300
+ DOI for the release and link to the Zenodo record for it.
301
+
302
+ #### Registering with the Python Package Index (PyPI)
303
+
304
+ The [Python Package Index (PyPI)](https://pypi.org) hosts packages so they can
305
+ be easily installed with `pip`, `uv`, and equivalent tools.
306
+
307
+ 1. Register for an account [here](https://pypi.org/account/register)
308
+ 2. Navigate to https://pypi.org/manage/account and make sure you have verified
309
+ your email address. A verification email might not have been sent by default,
310
+ so you might have to click the "options" dropdown next to your address to get
311
+ to the "re-send verification email" button
312
+ 3. 2-Factor authentication is required for PyPI since the end of 2023 (see this
313
+ [blog post from PyPI](https://blog.pypi.org/posts/2023-05-25-securing-pypi-with-2fa/)).
314
+ This means you have to first issue account recovery codes, then set up
315
+ 2-factor authentication
316
+ 4. Issue an API token from https://pypi.org/manage/account/token
317
+
318
+ This only needs to be done once per developer.
319
+
320
+ #### Configuring your machine's connection to PyPI
321
+
322
+ This needs to be done once per machine.
323
+
324
+ ```console
325
+ $ uv tool install keyring
326
+ $ keyring set https://upload.pypi.org/legacy/ __token__
327
+ $ keyring set https://test.pypi.org/legacy/ __token__
328
+ ```
329
+
330
+ Note that this deprecates previous workflows using `.pypirc`.
331
+
332
+ ### 📦 Making a Release
333
+
334
+ #### Uploading to PyPI
335
+
336
+ After installing the package in development mode and installing `just` with
337
+ `uv tool install rust-just` or `python3 -m pip install rust-just`, run the
338
+ following from the console:
339
+
340
+ ```console
341
+ $ just finish
342
+ ```
343
+
344
+ This script does the following:
345
+
346
+ 1. Uses [bump-my-version](https://github.com/callowayproject/bump-my-version) to
347
+ switch the version number in the `pyproject.toml`,`CITATION.cff`,
348
+ `src/mapkgsutils/version.py`, and
349
+ [`docs/source/conf.py`](docs/source/conf.py) to not have the `-dev` suffix
350
+ 2. Packages the code in both a tar archive and a wheel using
351
+ [`uv build`](https://docs.astral.sh/uv/guides/publish/#building-your-package)
352
+ 3. Uploads to PyPI using
353
+ [`uv publish`](https://docs.astral.sh/uv/guides/publish/#publishing-your-package).
354
+ 4. Push to GitHub. You'll need to make a release going with the commit where the
355
+ version was bumped.
356
+ 5. Bump the version to the next patch. If you made big changes and want to bump
357
+ the version by minor, you can use `tox -e bumpversion -- minor` after.
358
+
359
+ #### Releasing on GitHub
360
+
361
+ 1. Navigate to https://github.com//mapkgsutils/releases/new to draft a new
362
+ release
363
+ 2. Click the "Choose a Tag" dropdown and select the tag corresponding to the
364
+ release you just made
365
+ 3. Click the "Generate Release Notes" button to get a quick outline of recent
366
+ changes. Modify the title and description as you see fit
367
+ 4. Click the big green "Publish Release" button
368
+
369
+ This will trigger Zenodo to assign a DOI to your release as well.
370
+
371
+ ### Updating Package Boilerplate
372
+
373
+ This project uses `cruft` to keep boilerplate (i.e., configuration, contribution
374
+ guidelines, documentation configuration) up-to-date with the upstream
375
+ cookiecutter package. Install cruft with either `uv tool install cruft` or
376
+ `python3 -m pip install cruft` then run:
377
+
378
+ ```console
379
+ $ cruft update
380
+ ```
381
+
382
+ More info on Cruft's update command is available
383
+ [here](https://github.com/cruft/cruft?tab=readme-ov-file#updating-a-project).
384
+
385
+ </details>