-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
1,028 additions
and
985 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,36 @@ | ||
# Development - Contributing | ||
|
||
Issues and pull requests are more than welcome: https://github.com/developmentseed/titiler-cmr/issues | ||
Issues and pull requests are more than welcome: <https://github.com/developmentseed/titiler-cmr/issues> | ||
|
||
**dev install** | ||
|
||
```bash | ||
$ git clone https://github.com/developmentseed/titiler-cmr.git | ||
$ cd titiler-cmr | ||
$ pip install pre-commit -e .["dev,test"] | ||
git clone https://github.com/developmentseed/titiler-cmr.git | ||
cd titiler-cmr | ||
pip install pre-commit -e .["dev,test"] | ||
``` | ||
|
||
## Linting | ||
|
||
This repo is set to use `pre-commit` to run *isort*, *flake8*, *pydocstring*, *black* ("uncompromising Python code formatter") and mypy when committing new code. | ||
|
||
```bash | ||
pre-commit install | ||
``` | ||
|
||
## Testing | ||
|
||
You can then run the tests with the following command: | ||
|
||
```sh | ||
python -m pytest --cov titiler.cmr --cov-report term-missing | ||
```bash | ||
python -m pytest | ||
``` | ||
|
||
This repo is set to use `pre-commit` to run *isort*, *flake8*, *pydocstring*, *black* ("uncompromising Python code formatter") and mypy when committing new code. | ||
The tests use `vcrpy <https://vcrpy.readthedocs.io/en/latest/>`_ to mock API calls | ||
with "pre-recorded" API responses. When adding new tests that incur actual network traffic, | ||
use the ``@pytest.mark.vcr`` decorator function to indicate ``vcrpy`` should be used. | ||
Record the new responses and commit them to the repository. | ||
|
||
```bash | ||
$ pre-commit install | ||
python -m pytest -v -s --record-mode new_episodes | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.