https://github.com/up42/up42-py
:earth_americas: Python SDK for UP42, the geospatial marketplace and developer platform.
https://github.com/up42/up42-py
api earth-observation geospatial gis marketplace p1 python remote-sensing satellite sdk
Last synced: 9 days ago
JSON representation
:earth_americas: Python SDK for UP42, the geospatial marketplace and developer platform.
- Host: GitHub
- URL: https://github.com/up42/up42-py
- Owner: up42
- License: mit
- Created: 2020-03-24T11:16:04.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-29T11:16:02.000Z (7 months ago)
- Last Synced: 2024-10-29T13:15:01.053Z (7 months ago)
- Topics: api, earth-observation, geospatial, gis, marketplace, p1, python, remote-sensing, satellite, sdk
- Language: Python
- Homepage: https://sdk.up42.com/
- Size: 48 MB
- Stars: 135
- Watchers: 8
- Forks: 48
- Open Issues: 2
-
Metadata Files:
- Readme: README-dev.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-earthobservation-code - up42-py - Python SDK for UP42, the geospatial marketplace and developer platform. `Python` (`Python` processing of optical imagery (non deep learning) / Company specific examples)
README
# UP42 SDK Developer Readme
## Installation
1. **Clone the repository:**
```bash
git clone [email protected]:up42/up42-py.git
cd up42-py
```2. **Install development environment**
1. Install [asdf](https://asdf-vm.com/)
2. Install python support via `asdf plugin-add python`
3. Install poetry support via `asdf plugin-add poetry`
4. Install environment via `asdf install`3. **Install dependencies using Poetry:**
[Poetry](https://python-poetry.org/) is a dependency management and packaging tool for Python.
You can install the project dependencies:
```bash
poetry install
```This will create a virtual environment and install the dependencies specified in `pyproject.toml`.
4. **IDE Setup**
It's recommended to use Pycharm IDE, it fully supports Poetry managed environments.
## Development Setup
1. **Install pre-commit hooks:**
This project uses [pre-commit](https://pre-commit.com/) hooks to enforce code quality checks before commits. To install and set up pre-commit hooks, run the following:
```bash
poetry run pre-commit install
```This will install the hooks defined in `.pre-commit-config.yaml` and ensure that they run automatically before each commit.
2. **Optional: Run pre-commit hooks manually:**
You can run the pre-commit hooks manually at any time with the following command:
```bash
poetry run pre-commit run --all-files
```## Pre-commit Hooks
This repository uses the following main pre-commit hooks to ensure code quality:
- **black**: Automatically formats Python code to comply with PEP 8.
- **isort**: Sorts import statements alphabetically and automatically separates them into sections.
- **flake8**: Checks for style violations and errors in the code.
- **mypy**: Performs static type checking of the code.
- **pylint**: Analyzes Python code for potential errors, coding standards violations, and refactor suggestions.## Testing
This project uses `pytest` for testing. Follow the instructions below to set up and run tests.
### 1. Install Testing Dependencies
`pytest` is included as a development dependency in this project. If you haven't done so yet, you can install the testing dependencies by running:
```bash
poetry install
```### 2. Running Tests
You can run the tests with `pytest` using the following command:
```bash
poetry run pytest
```This will discover and run all the tests in the `tests/` folder.
### 3. Running Tests in Pycharm
To run tests directly from the PyCharm interface:
1. Right-click the test file or folder (e.g., tests/).
2. Select Run 'pytest in tests'.PyCharm will use the Poetry environment for running the tests and display the results in the run console.