Support tool and library for EOCube.Ro
Project description
EOCube.RO Tools
This repository holds the eocube python library currently providing a set of minimal
tools aimed to be used on the STAC Catalogs and data hosted by the ROCS Project
Installing
Option 1: From PyPi
pip install "eocube[cli]"
Visit https://pypi.org/project/eocube/ for more oficial packages.
Option 2: From GitLab Package Registry
pip install eocube[cli] --index-url https://gitlab.dev.info.uvt.ro/api/v4/projects/3491/packages/pypi/simple
Visit the GitLab Package Registry for available development packages
Option 3: From Git (development branch)
pip install "eocube[cli] @ git+https://gitlab.dev.info.uvt.ro/rocs/tools/eocube-tools.git@main"
Command Line Tools
You can use the command line tool by calling the eocube library.
Usage: eocube [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
services
🔐 Authentication
Login
In order to authenticate against our service provider you need to call:
eocube auth login
This will open a browser window and perform the standard authentication.
Logout
In order to invalidate the session and delete local token issue you need to call:
eocube auth login
User Info
For obtaining user information you can call:
eocube auth login
🧰 Internal Services
🌍 External Services
Geo-Spatial.Org Services
Some basic services from the Geo-Spatial.Org are provided. All the tools provide the
option to save the result in a GeoJSON file.
Usage: eocube services geospatialorg [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
get-administrative-unit-by-code
Uses the SIRUTA Code to retrieve the...
get-administrative-unit-by-name
Retrieves the administrative unit by name
get-county-by-mnemonic Retrieves the county by mnemonic
get-county-by-name Retrieves the county by name
Library Tools
Raster
eocube.raster.utils.get_raster_patches(): Function generating patches over an rasterioDatasetReaser
We welcome contributions! If you'd like to improve eocube, fix bugs, or propose new features, follow the steps below to set up your development environment.
🛠️ Development Setup (with Poetry)
This project uses Poetry for dependency management and packaging.
1. Install Poetry
Follow the official instructions:
👉 https://python-poetry.org/docs/#installation
Or, if you're on a Unix-like system:
pip install poetry
Or
curl -sSL https://install.python-poetry.org | python3 -
Make sure it’s available:
poetry --version
2. Clone the repository
git clone https://gitlab.dev.info.uvt.ro/rocs/tools/eocube-tools.git
cd eocube-tools
3. Create a feature branch
Never commit directly to main!
Create a new branch for your work:
git checkout -b my-feature-branch # Replace with something meaningful
4. Install development dependencies
poetry install --with dev
This will install both the main library and the development tools (black, pip-audit, twine, etc).
5. Activate the shell (optional)
poetry shell
You can now run commands like eocube, pytest, or black directly.
✅ Submitting Changes
- Push your branch to GitLab:
git push --set-upstream origin my-feature-branch
- Open a Merge Request (MR) via the GitLab UI.
- Your MR will be reviewed and must be approved by a project maintainer before it can be merged.
🧹 Code Style
Make sure your code is properly formated. Non-compliant code will be rejected. We use Black for consistent formatting. Before committing:
poetry run black .
🙏 Acknowledgements
This work was supported by a grant of the Ministry of Research, Innovation and Digitization, CCCDI - UEFISCDI, project number PN-IV-P6-6.3-SOL-2024-2-0248, within PNCDI IV.
📜 Licensing
After updating do not forget to update the NOTICE file with:
pip-licenses --from=mixed --format=plain --with-urls -i eocube > NOTICE
Publish to PyPi
Publication to PyPi is intentionally manual.
In order to publish to PyPi please make sure to be on the correct branch/tag and issue:
rm -fr build/ dist/*
poetry build
poetry run twine upload --verbose -s -i 5C5D049F dist/*
In the above example adapt the GPG key id with your key id.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eocube-0.1.1.tar.gz.
File metadata
- Download URL: eocube-0.1.1.tar.gz
- Upload date:
- Size: 31.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6f7eefb0e4d9bd21b5e6bb9bd1b3b7981fae34d4b8f254ac1f77ac4d8bc5427
|
|
| MD5 |
915f11f78dfdec3c7b6af6aeabcd346d
|
|
| BLAKE2b-256 |
d88aa2c8b0e43bff81d94b18a35aca5654b0478c88647952d667c989cfca4f51
|
File details
Details for the file eocube-0.1.1-py3-none-any.whl.
File metadata
- Download URL: eocube-0.1.1-py3-none-any.whl
- Upload date:
- Size: 39.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6559b3266a7c503e0eaabff21445a4f93550791d6860fea6335c0d8dffb0beba
|
|
| MD5 |
62af0c618cc74b0ae39fdbcf13921659
|
|
| BLAKE2b-256 |
83eadbc3891ce4b1606ec966917a8b80778bfbf571308e5d5ce71a61a66d0522
|