A client library for accessing Juice Core Uplink API
Project description
juice-core-uplink-api-client
Documentation: https://JANUS-JUICE.github.io/juice-core-uplink-api-client
Source Code: https://github.com/JANUS-JUICE/juice-core-uplink-api-client
PyPI: https://pypi.org/project/juice-core-uplink-api-client/
A client library for accessing Juice Core Uplink API
Installation
pip install juice-core-uplink-api-client
Usage example
First, create a client:
from juice_core import SHTRestInterface
i = SHTRestInterface()
and access the list of available plans on the server:
i.plans()
will output a pandas dataframe with the list of plans (just some here):
trajectory | name | mnemonic | is_public | created | id | author | description | refine_log | ptr_file | |
---|---|---|---|---|---|---|---|---|---|---|
0 | CREMA_3_0 | CASE4 | CASE4 | True | 2021-03-04 13:29:58.835199 | 17 | rlorente | Demonstration Case 4 | ||
1 | CREMA_5_0 | CREMA_5_0_OPPORTUNITIES_v0 | CREMA_5_0_OPPORTUNITIES_v0 | True | 2021-08-26 09:12:06.767139 | 31 | cvallat | 1st run opf opportunities generation (UC22), based on existing definitions of oppportunities (inherited from crema 3_0) | https://juicesoc.esac.esa.int/rest_api/file/trajectory%23CREMA_5_0.ptx/ | |
2 | CREMA_5_0 | CREMA_5_0_OPPORTUNITIES_v1 | CREMA_5_0_OPPORTUNITIES_v1 | True | 2021-10-04 13:49:49.262682 | 36 | cvallat | Added two opportunities for JMAG_CALROL for the last 2 perijoves before JOI (PJ69 not considered since too clsoe to GoI for observations to take place --> MPAD rule) | https://juicesoc.esac.esa.int/rest_api/file/trajectory%23CREMA_5_0.ptx/ | |
3 | CREMA_5_0 | CREMA_5_0_OPPORTUNITIES_v2 | CREMA_5_0_OPPORTUNITIES_v2 | True | 2021-10-05 07:24:07.742653 | 37 | cvallat | Modified GANYMEDE_GM opportunity around 3G3 for WG3 prime allocation (1 hour centered at CA) | https://juicesoc.esac.esa.int/rest_api/file/trajectory%23CREMA_5_0.ptx/ |
You can also directly interact with the underalying juice-core-uplink-api-client
module:
Development
- Clone this repository
- Requirements:
- Poetry
- Python 3.10+
- Create a virtual environment and install the dependencies
poetry install
- Activate the virtual environment
poetry shell
Testing
pytest
Documentation
The documentation is automatically generated from the content of the docs directory and from the docstrings of the public signatures of the source code. The documentation is updated and published as a Github Pages page automatically as part each release.
Releasing
Manual release
Releases are done with the command, e.g. incrementing patch:
poetry run just bump patch
# also push, of course:
git push origin main --tags
this will update the changelog, commit it, and make a corresponding tag.
as the CI is not yet configured for publish on pypi it can be done by hand:
poetry publish --build
Automatic release - to be fixed
Trigger the Draft release workflow (press Run workflow). This will update the changelog & version and create a GitHub release which is in Draft state.
Find the draft release from the GitHub releases and publish it. When a release is published, it'll trigger release workflow which creates PyPI release and deploys updated documentation.
Updating with copier
To update the skeleton of the project using copier:
pipx run copier update --defaults
Pre-commit
Pre-commit hooks run all the auto-formatting (ruff format
), linters (e.g. ruff
and mypy
), and other quality
checks to make sure the changeset is in good shape before a commit/push happens.
You can install the hooks with (runs for each commit):
pre-commit install
Or if you want them to run only for each push:
pre-commit install -t pre-push
Or if you want e.g. want to run all checks manually for all files:
pre-commit run --all-files
This project was generated using a fork of the wolt-python-package-cookiecutter template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for juice_core_uplink_api_client-0.2.12.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3146deb10239b7a848354a94d2c3ea6a92e4e905192da50ae2e4dc6a2478761 |
|
MD5 | b620bf35f61e1c8a9d095e27b64d020a |
|
BLAKE2b-256 | b0701d64cb9e504af61f44e3315691eda7aff60344a2426d27b2cdb83ba46dbd |
Hashes for juice_core_uplink_api_client-0.2.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a50075cc9ef5ee834d3e9ec82550f7906ca67a65d6c74ba2b0a0b5ae87ba40d |
|
MD5 | 91a118605944ca12b272f66a5885f49d |
|
BLAKE2b-256 | 09dddad9525115f79e80f32c83dddb90dffa9aa5b2f59cdaad327ac264c42661 |