Skip to content
Snippets Groups Projects
Commit 921e5100 authored by Max Drexler's avatar Max Drexler
Browse files

update CONTRIBUTING to reflect new package

parent dbe1af2c
No related branches found
No related tags found
1 merge request!2Switch to package setup
......@@ -2,16 +2,62 @@
How to set up your dev environment to work on the grib processor.
First, create a virtual environment like in the [readme](/README.md#setup).
## Goals
Then, install ruff and mypy.
The main goal of this package is to provide a realtime event processor for the SDS that publishes metadata about incoming grib files. As this package is made for the SDS, final say on creative decision goes to the SDS managers.
Before pushing commits run:
The main goal can be accomplished using the `--realtime` CLI option.
`ruff format grib_processor.py`
Additional (secondary) goals include:
`ruff check grib_processor.py`
* Providing different ways to ingest grib files; stdin, specifying one file, etc.
* Providing a python interface to the event processor's components.
* Providing an interface to extract metadata from grib files.
`mypy grib_processor.py`
## Setup
>Note: mypy will give an error about untyped imports, this can be ignored.
First, clone the repo locally.
```bash
git clone https://gitlab.ssec.wisc.edu/mdrexler/grib_rmq_stream.git
cd grib_rmq_stream
```
Next, install the package from source and create a virtual environment like in the [readme](/README.md#setup).
Then, install the dev dependencies.
```bash
python -m pip install -r requirements_dev.txt
```
Finally, install the package in editable mode.
```bash
python -m pip install -e .
```
### Pre-commit
[pre-commit](https://pre-commit.com/) can be used to automatically format/lint/type check any new commits you make. It is recommended, but not necessary as the CI will also check that for you.
```bash
pre-commit install
pre-commit run --all-files
```
## Testing
When adding a new feature, please add corresponding unit tests under [tests/](/tests/).
Tests can be run using pytest.
```bash
pytest tests/
```
To get the code coverage use the coverage command.
```bash
coverage run -m pytest
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment