# 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/8d/52/37e56989b6de852bd719f3171c63c55926dd85e78c3c74f7d0cb307735e3/phab_utils-0.8.1.tar.gz",
"platform": null,
"description": "# phab-utils\r\n\r\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/).\r\n\r\nOriginal project name was `uio-exoplanet-group`, which later got renamed to `phab-utils` (*on 2025-01-29*).\r\n\r\n<!-- MarkdownTOC -->\r\n\r\n- [Installing](#installing)\r\n - [From PyPI](#from-pypi)\r\n - [From sources](#from-sources)\r\n - [Building a wheel](#building-a-wheel)\r\n- [Data](#data)\r\n- [Documentation](#documentation)\r\n - [API](#api)\r\n - [wiki](#wiki)\r\n- [Tests](#tests)\r\n\r\n<!-- /MarkdownTOC -->\r\n\r\n## Installing\r\n\r\n### From PyPI\r\n\r\n``` sh\r\n$ pip install phab-utils\r\n```\r\n\r\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).\r\n\r\n### From sources\r\n\r\n``` sh\r\n$ cd /path/to/phab-utils/\r\n$ pip install .\r\n```\r\n\r\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:\r\n\r\n``` sh\r\n$ pip install -e .\r\n```\r\n\r\n#### Building a wheel\r\n\r\nYou can also build a wheel and distribute/install that instead:\r\n\r\n``` sh\r\n$ cd /path/to/phab-utils/\r\n$ python -m build\r\n$ pip install ./dist/phab_utils-*.whl\r\n```\r\n\r\n## Data\r\n\r\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.\r\n\r\n## Documentation\r\n\r\nThere are two different pieces of documentation.\r\n\r\n### API\r\n\r\nLocated in `documentation`. This is the package API documentation, which is published [here](https://phab.decovar.dev/).\r\n\r\nIt is generated with [pdoc](https://pdoc.dev):\r\n\r\n``` sh\r\n$ pip install pdoc\r\n\r\n$ cd /path/to/phab-utils\r\n$ rm -r ./documentation/_deploy/*\r\n\r\n$ PHAB_PACKAGE_VERSION=$(git rev-parse --short HEAD) pdoc ./src/phab/utils ./src/phab/tasks \\\r\n --template-directory ./documentation/_templates/ \\\r\n --edit-url=\"utils=https://github.com/retifrav/phab-utils/blob/master/src/phab/utils/\" \\\r\n --edit-url=\"tasks=https://github.com/retifrav/phab-utils/blob/master/src/phab/tasks/\" \\\r\n --output-directory ./documentation/_deploy/\r\n$ cp ./documentation/{favicon.ico,phab.jpg} ./documentation/_deploy/\r\n```\r\n\r\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).\r\n\r\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:\r\n\r\n``` py\r\n$ cd ./documentation/_deploy/\r\n$ python -m http.server 8000\r\n```\r\n\r\nand open <http://localhost:8000/>.\r\n\r\n### wiki\r\n\r\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.\r\n\r\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.\r\n\r\n## Tests\r\n\r\nTo run tests:\r\n\r\n``` sh\r\n$ pip install pytest\r\n\r\n$ python -m pytest ./src/phab/tests/*[^_*].py\r\n$ python -m pytest ./src/phab/tests/databases.py\r\n$ python -m pytest ./src/phab/tests/databases.py -k \"test_get_parameters_that_are_double_in_nasa\"\r\n```\r\n",
"bugtrack_url": null,
"license": null,
"summary": "PHAB utilities for data processing",
"version": "0.8.1",
"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": null,
"digests": {
"blake2b_256": "68ffb0c5545221dba6005ea545b04e75be6a748973d9fba12fd70fa766759ae4",
"md5": "1125b384ac75e17f46b0d6cde33832b8",
"sha256": "2f7c3c47075e80c425795b84556e540a5a0f636707f5515d8e0d33aa957119d6"
},
"downloads": -1,
"filename": "phab_utils-0.8.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1125b384ac75e17f46b0d6cde33832b8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 42623,
"upload_time": "2025-02-01T11:59:57",
"upload_time_iso_8601": "2025-02-01T11:59:57.624845Z",
"url": "https://files.pythonhosted.org/packages/68/ff/b0c5545221dba6005ea545b04e75be6a748973d9fba12fd70fa766759ae4/phab_utils-0.8.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "8d5237e56989b6de852bd719f3171c63c55926dd85e78c3c74f7d0cb307735e3",
"md5": "661bbf00a9ffc2828eae1cd5da57b09c",
"sha256": "7e2f579069282fde28f2b06935942ae3c692e936dbbee33cdb0fed979ae750a7"
},
"downloads": -1,
"filename": "phab_utils-0.8.1.tar.gz",
"has_sig": false,
"md5_digest": "661bbf00a9ffc2828eae1cd5da57b09c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 38821,
"upload_time": "2025-02-01T11:59:58",
"upload_time_iso_8601": "2025-02-01T11:59:58.905924Z",
"url": "https://files.pythonhosted.org/packages/8d/52/37e56989b6de852bd719f3171c63c55926dd85e78c3c74f7d0cb307735e3/phab_utils-0.8.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-01 11:59:58",
"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"
}