# phab-utils
Data processing tools and knowledge base of [Centre for Earth Evolution and Dynamics](https://mn.uio.no/ceed/) and its successor [Centre for Planetary Habitability](https://mn.uio.no/phab/english/).
Original project name was `uio-exoplanet-group`, which later got renamed to `phab-utils` (*on 2025-01-29*).
<!-- MarkdownTOC -->
- [Installing](#installing)
- [From PyPI](#from-pypi)
- [From sources](#from-sources)
- [Building a wheel](#building-a-wheel)
- [Data](#data)
- [Documentation](#documentation)
- [API](#api)
- [wiki](#wiki)
- [Tests](#tests)
<!-- /MarkdownTOC -->
## Installing
### From PyPI
``` sh
$ pip install phab-utils
```
If you need an older version from the original `uio-exoplanet-group` package, those are still available [here](https://pypi.org/project/uio-exoplanet-group/#history).
### From sources
``` sh
$ 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:
``` sh
$ pip install -e .
```
#### Building a wheel
You can also build a wheel and distribute/install that instead:
``` sh
$ 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](https://github.com/retifrav/phab-utils/tree/master/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](https://phab.decovar.dev/).
It is generated with [pdoc](https://pdoc.dev):
``` sh
$ pip install pdoc
$ cd /path/to/phab-utils
$ rm -r ./documentation/_deploy/*
$ PHAB_PACKAGE_VERSION=$(git rev-parse --short HEAD) pdoc ./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/
```
For now it's a blunt deployment of generated HTML, but later it probably will be better to rely on GitHub Actions (*if it won't spend too much of free quota*) by customizing [this workflow](https://github.com/mitmproxy/pdoc/blob/main/.github/workflows/docs.yml).
If you'd like to browse 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:
``` py
$ 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.
## Tests
To run tests:
``` sh
$ 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"
```
Raw data
{
"_id": null,
"home_page": "https://github.com/retifrav/phab-utils",
"name": "phab-utils",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "tap, adql, astronomy, astrophysics, cosmology, science",
"author": "retif",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/27/46/8d468ca81991dbf1965bca94118afb3cc42cfd87bf49201c81af91af0c3e/phab_utils-0.8.2.tar.gz",
"platform": null,
"description": "# phab-utils\n\nData processing tools and knowledge base of [Centre for Earth Evolution and Dynamics](https://mn.uio.no/ceed/) and its successor [Centre for Planetary Habitability](https://mn.uio.no/phab/english/).\n\nOriginal project name was `uio-exoplanet-group`, which later got renamed to `phab-utils` (*on 2025-01-29*).\n\n<!-- MarkdownTOC -->\n\n- [Installing](#installing)\n - [From PyPI](#from-pypi)\n - [From sources](#from-sources)\n - [Building a wheel](#building-a-wheel)\n- [Data](#data)\n- [Documentation](#documentation)\n - [API](#api)\n - [wiki](#wiki)\n- [Tests](#tests)\n\n<!-- /MarkdownTOC -->\n\n## Installing\n\n### From PyPI\n\n``` sh\n$ pip install phab-utils\n```\n\nIf you need an older version from the original `uio-exoplanet-group` package, those are still available [here](https://pypi.org/project/uio-exoplanet-group/#history).\n\n### From sources\n\n``` sh\n$ cd /path/to/phab-utils/\n$ pip install .\n```\n\nAdd 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:\n\n``` sh\n$ pip install -e .\n```\n\n#### Building a wheel\n\nYou can also build a wheel and distribute/install that instead:\n\n``` sh\n$ cd /path/to/phab-utils/\n$ python -m build\n$ pip install ./dist/phab_utils-*.whl\n```\n\n## Data\n\nWherever 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](https://github.com/retifrav/phab-utils/tree/master/data) folder - chances are, that file will be provided there.\n\n## Documentation\n\nThere are two different pieces of documentation.\n\n### API\n\nLocated in `documentation`. This is the package API documentation, which is published [here](https://phab.decovar.dev/).\n\nIt is generated with [pdoc](https://pdoc.dev):\n\n``` sh\n$ pip install pdoc\n\n$ cd /path/to/phab-utils\n$ rm -r ./documentation/_deploy/*\n\n$ PHAB_PACKAGE_VERSION=$(git rev-parse --short HEAD) pdoc ./src/phab/utils ./src/phab/tasks \\\n --template-directory ./documentation/_templates/ \\\n --edit-url=\"utils=https://github.com/retifrav/phab-utils/blob/master/src/phab/utils/\" \\\n --edit-url=\"tasks=https://github.com/retifrav/phab-utils/blob/master/src/phab/tasks/\" \\\n --output-directory ./documentation/_deploy/\n$ cp ./documentation/{favicon.ico,phab.jpg} ./documentation/_deploy/\n```\n\nFor now it's a blunt deployment of generated HTML, but later it probably will be better to rely on GitHub Actions (*if it won't spend too much of free quota*) by customizing [this workflow](https://github.com/mitmproxy/pdoc/blob/main/.github/workflows/docs.yml).\n\nIf you'd like to browse 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:\n\n``` py\n$ cd ./documentation/_deploy/\n$ python -m http.server 8000\n```\n\nand open <http://localhost:8000/>.\n\n### wiki\n\nLocated 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.\n\nIt 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.\n\n## Tests\n\nTo run tests:\n\n``` sh\n$ pip install pytest\n\n$ python -m pytest ./src/phab/tests/*[^_*].py\n$ python -m pytest ./src/phab/tests/databases.py\n$ python -m pytest ./src/phab/tests/databases.py -k \"test_get_parameters_that_are_double_in_nasa\"\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "PHAB utilities for data processing",
"version": "0.8.2",
"project_urls": {
"Bug Tracker": "https://github.com/retifrav/phab-utils/issues",
"Changelog": "https://github.com/retifrav/phab-utils/blob/master/changelog.md",
"Documentation": "https://phab.decovar.dev/",
"Homepage": "https://github.com/retifrav/phab-utils"
},
"split_keywords": [
"tap",
" adql",
" astronomy",
" astrophysics",
" cosmology",
" science"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "93cf63e40e04c1dc5ee857e24f13ba1c61bb52c48ee78233a265c9e8fc40a2ce",
"md5": "079cb0ff944ed542d1b66c6f9b8dad46",
"sha256": "9dd20ef7c8e1312d72c45a5704815a75799d2ae39ae74b56e9ff4d24d94a21a2"
},
"downloads": -1,
"filename": "phab_utils-0.8.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "079cb0ff944ed542d1b66c6f9b8dad46",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 42745,
"upload_time": "2025-03-16T20:42:49",
"upload_time_iso_8601": "2025-03-16T20:42:49.189480Z",
"url": "https://files.pythonhosted.org/packages/93/cf/63e40e04c1dc5ee857e24f13ba1c61bb52c48ee78233a265c9e8fc40a2ce/phab_utils-0.8.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "27468d468ca81991dbf1965bca94118afb3cc42cfd87bf49201c81af91af0c3e",
"md5": "5f47c36cb3810e8cb66a1c69469c4e9c",
"sha256": "d9cde52f1e351c4db5eca3dc062f63e4987852da622307b5bad073f176bed2b4"
},
"downloads": -1,
"filename": "phab_utils-0.8.2.tar.gz",
"has_sig": false,
"md5_digest": "5f47c36cb3810e8cb66a1c69469c4e9c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 38599,
"upload_time": "2025-03-16T20:42:50",
"upload_time_iso_8601": "2025-03-16T20:42:50.544792Z",
"url": "https://files.pythonhosted.org/packages/27/46/8d468ca81991dbf1965bca94118afb3cc42cfd87bf49201c81af91af0c3e/phab_utils-0.8.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-03-16 20:42:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "retifrav",
"github_project": "phab-utils",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "phab-utils"
}