Skip to main content

Python API for the Geodesic Datascience Platform

Project description

geodesic-python-api

Build codecov

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

geodesic_api-0.11.10-py3-none-any.whl (491.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page