CDSR pack is a package to store common functions from CDSR project.
Project description
cdsr_pack
CDSR pack is a package to store common functions from CDSR project.
Installation
$ pip install cdsr-pack==<version>
Look at here to see the available versions.
Usage
>>> from cdsr_pack import build_collection, build_item, decode_path
>>> image = ('/TIFF/AMAZONIA1/2021_03/AMAZONIA_1_WFI_DRD_2021_03_03.12_57_40_CB11/'
'217_015_0/2_BC_LCC_WGS84/AMAZONIA_1_WFI_20210303_217_015_L2_BAND4.tif')
>>> decoded_image = decode_path(image)
>>> decoded_image
{
'satellite': 'AMAZONIA1', 'sensor': 'WFI', 'path': '217', 'row': '015',
'date': '2021-03-03', 'geo_processing': '2', 'radio_processing': 'DN',
'antenna': 'CB11'
}
>>> build_collection(decoded_image)
'AMAZONIA1_WFI_L2_DN'
>>> build_item(decoded_image)
'AMAZONIA1_WFI_217015_20210303_CB11'
Development
Install a specific Python version and create a virtualenv with it. For example:
$ pyenv install 3.8.5 && \
pyenv virtualenv 3.8.5 inpe_cdsr_cdsr_pack
Activate the virtualenv and install the dependencies inside it:
$ pyenv activate inpe_cdsr_cdsr_pack && \
pip install -r requirements.txt
Testing
Activate the virtualenv:
$ pyenv activate inpe_cdsr_cdsr_pack
Run the test cases:
$ python -m unittest discover tests "test_*.py" -v
Or, run the test cases and get coverage report:
$ coverage run -m unittest discover tests "test_*.py" -v &&
coverage report -m &&
coverage html
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
cdsr_pack-0.0.2.tar.gz
(5.3 kB
view details)
Built Distribution
File details
Details for the file cdsr_pack-0.0.2.tar.gz
.
File metadata
- Download URL: cdsr_pack-0.0.2.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffe4426f91fa98354474f676e4be577d0a8962c614bf926822cc8709af47bb2d |
|
MD5 | de1dae6d96cb42132a043bf8c1d414e9 |
|
BLAKE2b-256 | 953cae47234408468bcbf7119f1cd31e75757a11467a966d79486969590c2970 |
File details
Details for the file cdsr_pack-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: cdsr_pack-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83fb213b462209a69dc57476be760be94adef43e4e29360fb31c47bc47044c1d |
|
MD5 | fbebd8521289f2a8ae8d469782902346 |
|
BLAKE2b-256 | 2905a59e3c9e42230510b360e041306da57e3e8ea2b2400c6e45a7f1f00a7364 |