Python API for the Geodesic Datascience Platform
Project description
geodesic-python-api
The python API for interacting with SeerAI's Geodesic system. Documentation can be found at docs.seerai.space/geodesic
Contributing
To setup a development environment for geodesic we recommend first creating a conda environment.
conda create -n geodesic-dev python=3.8
conda activate geodesic-dev
You will also need to install GDAL for some applications. This is easiest to do though conda.
conda install GDAL
In order to get the widgets to build correctly to be usable locally you will also need to install NPM and Yarn.
conda install nodejs yarn -y
This will allow proper building of the widgets. NOTE: this is only required when you install from a cloned repo.
Once this finishes you can proceed to installing geodesic.
After cloning the repo you can install with pip. There are several install options depending on which packages you would like installed.
For development we recommend installing the dev packages with the dev
extras identifier
pip install .[dev]
When adding or modifying any code you should also add to the documentation if necessary
and make sure that it builds and renders correctly. You can find instructions for modifying
and building the docs sources in the README in the docs/
folder.
Testing
To run unit tests and see coverage, in the root directory run:
coverage run -m pytest
coverage report --omit=test/*
CLI
This library installs with a command line tool geodesic
that allows you to authenticate or configure wich geodesic
cluster you are pointed at.
Examples:
$ geodesic authenticate
To authorize access needed by Geodesic, open the following URL in a web browser and follow the instructions. If the web browser does not start automatically, please manually browse the URL below.
https://seerai.us.auth0.com/authorize?client_id=RlCTevNLPn0oVzmwLu3R0jCF7tfakpq9&scope=email+openid+profile+picture+admin+offline_access+entanglement%3Aread+entanglement%3Awrite+spacetime%3Aread+spacetime%3Awrite+tesseract%3Aread+tesseract%3Awrite+boson%3Aread+boson%3Awrite+krampus%3Aread&redirect_uri=https%3A%2F%2Fseerai.space%2FauthPage&audience=https%3A%2F%2Fgeodesic.seerai.space&response_type=code&code_challenge=ABC&code_challenge_method=S256
The authorization workflow will generate a code, which you should paste in the box below.
Enter verification code: XXXXXXXXX
$ geodesic get clusters
[*] seerai
$ geodesic get active-config
{
"host": "https://geodesic.seerai.space",
"name": "seerai",
"oauth2": {
"audience": "https://geodesic.seerai.space",
"authorization_uri": "https://seerai.us.auth0.com/authorize",
"client_id": "RlCTevNLPn0oVzmwLu3R0jCF7tfakpq9",
"client_secret": "EY5_-6InmoqYSy1ZEKb7vGiUrCTE1JapTtBncaP_w_0_IhuSilZw1YS6pqoJ0n75",
"redirect_uri": "https://seerai.space/authPage",
"token_uri": "https://seerai.us.auth0.com/oauth/token"
}
}
$ geodesic set cluster seerai
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 Distributions
Built Distribution
Hashes for geodesic_api-0.11.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90e51028d6cedbd617d8635ada426680dcf0b9a4456c127308e0ef78a0c32850 |
|
MD5 | c966fb0938d5072645eb6f40400ee22f |
|
BLAKE2b-256 | d17eb44db91329e8214aa8a8a061f648b372032c6ff16e3a992075270fe54352 |