phab-utils
Data processing tools and knowledge base of Centre for Earth Evolution and Dynamics and its successor Centre for Planetary Habitability.
Original project name was uio-exoplanet-group, which later got renamed to phab-utils (on 2025-01-29).
Installing
From PyPI
$ pip install phab-utils
If you need an older version from the original uio-exoplanet-group package, those are still available here.
From sources
$ cd /path/to/phab-utils/
$ pip install .
Add an -e argument, if you'd like to automatically update your locally installed package by pulling from the repository or/and if you intend to modify the sources:
$ pip install -e .
Building a wheel
You can also build a wheel and distribute/install that instead:
$ cd /path/to/phab-utils/
$ python -m build
$ pip install ./dist/phab_utils-*.whl
Data
Wherever you see a reference to some data files in documentation, examples, comments or anywhere else, for example some function taking a path like ./data/systems-528n.pkl, check the data folder - chances are, that file will be provided there.
Documentation
There are two different pieces of documentation.
API
Located in documentation. This is the package API documentation, which is published here.
It is generated with pdoc.
Unfortunately, pdoc lists only # and ## headings in the sidebar's table of contents, so to get ### headings listed too, the command below runs it in a kind of wrapper:
$ pip install pdoc
$ cd /path/to/phab-utils
$ rm -r ./documentation/_deploy/*
$ PHAB_PACKAGE_VERSION=$(git rev-parse --short HEAD) python -c \
'import sys, pdoc.__main__, pdoc.render_helpers; pdoc.render_helpers.markdown_extensions["toc"]["depth"] = 3; pdoc.__main__.cli(sys.argv[1:])' \
./src/phab/utils ./src/phab/tasks \
--template-directory ./documentation/_templates/ \
--edit-url="utils=https://github.com/retifrav/phab-utils/blob/master/src/phab/utils/" \
--edit-url="tasks=https://github.com/retifrav/phab-utils/blob/master/src/phab/tasks/" \
--output-directory ./documentation/_deploy/
$ cp ./documentation/{favicon.ico,phab.jpg} ./documentation/_deploy/
If you'd like to browse the generated documentation locally, you can just open the main index.html from ./documentation/_deploy/ in your browser. Alternatively, you can launch a basic Python server:
$ cd ./documentation/_deploy/
$ python -m http.server 8000
and open http://localhost:8000/.
wiki
Located in wiki. This is general purpose / technical manuals, articles, notes, etc: how to install/build various tools, dependencies, how to set-up environments and so on.
It is meant to be published somewhere else, but for now it will do being a part of repository. GitHub wikis could've been an option, but those are still quite bad in terms of organizing the content.
QA
Tests
To run tests:
$ pip install pytest
$ python -m pytest ./src/phab/tests/*[^_*].py
$ python -m pytest ./src/phab/tests/databases.py
$ python -m pytest ./src/phab/tests/databases.py -k "test_get_parameters_that_are_double_in_nasa"
Linting and type checking
The code is checked with ruff (linting) and ty (type checking). Both are configured in pyproject.toml, so they need no extra options, but they should be run from the repository root.
ty might need a virtual environment (venv) with the dependencies installed so it could check how the code uses them. It should run without venv too, but then the dependencies are likely to be unknown to it, so it might miss actual problems. A virtual environment in .venv in the repository root is found by ty automatically:
$ cd /path/to/phab-utils/
$ uv venv --python 3.12 .venv
$ uv pip install --python .venv -e . pytest
$ uvx ruff@0.17.6 check
$ uvx ty@0.0.107 check --error-on-warning
$ rm -r .venv
$ rm -r src/phab_utils.egg-info
Some notes:
- the tool versions are pinned on purpose. New
ruffversions might add new rules to its default set, andtyis not stable yet (it is still0.0.x), so its rules change quite often. Without pinning, the checks might start failing on a new version of the tools for commits that didn't change anything; pytestis installed for its types, other dependencies are installed fromsetup.cfg;--error-on-warningmakes ty fail on warnings too (such as deprecations);- don't use
ruff format, as the code isn't formatted with it.
Donation
You can support this project via GitHub Sponsors or by donating cryptocurrency to either of the following wallets (signed variant):
- XLM:
GDYB2QGJYWT6VPT7O7INWIGRGJF5ZEAQ7Y73S4T47IOP2QQ554NPN3ZM - BTC:
bc1q2kfqwm2kwyw37ay2g4tnguasvp6j4hsmtrgjte
Metadata
Release files for phab-utils 2026.11.23
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| phab_utils-2026.11.23.tar.gz | 52.3 kB | Without provenance | Details for phab_utils-2026.11.23.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| phab_utils-2026.11.23-py3-none-any.whl | Python 3 | none | any | Details for phab_utils-2026.11.23-py3-none-any.whl |
Total release size: 108.7 kB
Release files / phab_utils-2026.11.23.tar.gz
| Download URL | phab_utils-2026.11.23.tar.gz |
|---|---|
| Size | 52.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4051aae4d578ff99a545edc75e676fea377b9bb63d61a5c71ad0e3de15556261
|
|
BLAKE2b-256 checksum How to use checksums |
162fe5ac8b85a9affaf7e4e01e89101c6f6358cff607a1c43acb923a764a00e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Release files / phab_utils-2026.11.23-py3-none-any.whl
| Download URL | phab_utils-2026.11.23-py3-none-any.whl |
|---|---|
| Size | 56.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1a0404c5e36da69b41f035acff628402c0f8c3b316dd1309f85552507092d1ae
|
|
BLAKE2b-256 checksum How to use checksums |
552d60cf8d0e3800b149115addfac74377707e35073502cd823d88c8f7f6f736
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Security for phab-utils 2026.11.23
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.