Coverage Report
| File | Stmts | Miss | Cover | Missing |
|---|---|---|---|---|
| idsse/common | ||||
| __init__.py | 0 | 0 | 100% | |
| aws_utils.py | 27 | 0 | 100% | |
| boto3_utils.py | 81 | 31 | 31 | 62% |
| config.py | 69 | 5 | 5 | 93% |
| http_utils.py | 40 | 4 | 4 | 90% |
| json_message.py | 24 | 1 | 1 | 96% |
| log_util.py | 41 | 3 | 3 | 93% |
| path_builder.py | 211 | 22 | 22 | 90% |
| protocol_utils.py | 93 | 4 | 4 | 96% |
| rabbitmq_rpc.py | 110 | 2 | 2 | 98% |
| rabbitmq_utils.py | 226 | 31 | 31 | 86% |
| utils.py | 189 | 25 | 25 | 87% |
| validate_schema.py | 40 | 0 | 100% | |
| idsse/common/sci | ||||
| __init__.py | 0 | 0 | 100% | |
| bit_pack.py | 85 | 3 | 3 | 96% |
| geo_image.py | 235 | 17 | 17 | 93% |
| grid_proj.py | 142 | 7 | 7 | 95% |
| netcdf_io.py | 69 | 38 | 38 | 45% |
| utils.py | 31 | 7 | 7 | 77% |
| vectaster.py | 189 | 17 | 17 | 91% |
| TOTAL | 1902 | 217 | 89% | |
The idss-engine-commons project is responsible for defining all implicit common dependencies that are used by the apps that make up the IDSS Engine Project distributed system. This
repository should be used to house elements that are common across multiple projects to encourage reuse.
The complete twelve-factors methodologies that the IDSS Engine Project adheres to can be found in the umbrella idss-engine repository. The subset of the twelve factors that follows are specifics to this app only.
To support some standardization and best practices for IDSS Engine, developers should following the logging guide found here
Clone this repository.
Create a Python pip environment and activate it:
python3 -m venv .venv && source .venv/bin/activateInstall all Python dependencies based on what is installed in any of the GitHub Actions in .github/workflows, e.g. linter.yml.
pip install <libs_from_.github/workflows/linter.yml>If you intend to run unit tests, you'll need to clone the idsse-testing GitHub repository, then install it as an "editable" (a.k.a. local) pip package:
pip install -e <path_to_idsse_testing_clone>/pythonPython code is formatted according to the black style guide, and any Pull Requests will be checked against this styling to ensure the new code has been auto-formatted.
To have black reformat all Python code every time you create a git commit, install the pre-commit library:
pip install pre-commitAnd run this to have any Git pre-commit hooks installed for you according to .pre-commit.config.yaml:
pre-commit installIf you prefer, you can install the black library and run it yourself manually (not running on git commit):
pip install blackThis will reformat all your Python files for you:
black . --line-length 99The common images and packages within this project are built automatically by the project's GitHub Actions workflows using GitHub-hosted runners. No local or manual builds are necessary.
All common image build processes are managed through GitHub Actions and the associated configurations within the idss-engine-commons/docker directory.
Any Python-based microservice within IDSS Engine should use the following image as its base.
Image Name: ghcr.io/noaa-gsl/idss/commons/python/python-base:<semver>
Any Python-based microservice within IDSS Engine that requires scientific Python packages (NumPy, NetCDF, etc.) should use this image as its base. This image also includes common Python utilities that other services can utilize. For specifics on these utilities, see the README within the idsse_commons directory.
Image Name: ghcr.io/noaa-gsl/idss/commons/python/python-sci:<semver>
Note: Both images are built and published through GitHub Actions. Developers do not need to run Docker Compose build commands or manually build these images locally.
See the Build, Release, Run section within the umbrella project documentation: [idss-engine](https://github.com/NOAA-GSL/idss-engine/blob/main/README.md#running-idss-engine)