Skip to content

Latest commit

 

History

History
73 lines (51 loc) · 1.72 KB

README-dev.md

File metadata and controls

73 lines (51 loc) · 1.72 KB

UP42 SDK Developer Readme

Installation

The development installation is necessary if you want to contribute to up42-py, e.g. to fix a bug.

  1. Optional (but highly recommended): Create a new virtual environment e.g. using virtualenvwrapper:
mkvirtualenv --python=$(which python3.7) up42-py
  1. Clone the repository and install locally with SystemLink (code changes are reflected).
    This will install all the neccessary dependencies for up42-py, running the tests and editing the docs.
git clone git@github.com:up42/up42-py.git
cd up42-py
make install[dev]
  1. Create a new project on UP42.

  2. Create a config.json file and fill in the project credentials.

{
  "project_id": "...",
  "project_api_key": "..."
}
  1. Test it in Python! This will authenticate with the UP42 Server and get the project information.
import up42

up42.authenticate(cfg_file="config.json")
project = up42.initialize_project()
print(project)

Edit the docs

The up42-py documentation is based on markdown and build with MkDocs & Material for MkDocs.

In order to live-preview your changes for easier editing, run the MkDocs preview in the main folder:

cd up42-py
mkdocs serve

In the browser, open:

http://127.0.0.1:8000

Edit the markdown files in up42-py/docs. Save them to see the changes reflected in the preview.

Run the tests

In the main folder up42-py, run:

make test

or run all tests including the live tests:

make test[live]