-
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.
add /statistics, /feature, and /bbox endpoints (#30)
* add /statistics, /bbox, /feature endpoints * update development workflow to use `uv`
- Loading branch information
Showing
21 changed files
with
5,588 additions
and
1,313 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
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 |
---|---|---|
|
@@ -108,4 +108,3 @@ cdk.context.json | |
|
||
notebooks/ | ||
|
||
uv.lock |
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,47 @@ | ||
# 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** | ||
|
||
This project uses [`uv`](https://docs.astral.sh/uv/) to manage the python environment and dependencies. | ||
To install the package for development you can follow these steps: | ||
|
||
```bash | ||
$ git clone https://github.com/developmentseed/titiler-cmr.git | ||
$ cd titiler-cmr | ||
$ pip install pre-commit -e .["dev,test"] | ||
# install uv | ||
|
||
# unix | ||
curl -LsSf https://astral.sh/uv/install.sh | sh | ||
|
||
# or windows | ||
# powershell -c "irm https://astral.sh/uv/install.ps1 | iex" | ||
|
||
git clone https://github.com/developmentseed/titiler-cmr.git | ||
cd titiler-cmr | ||
uv sync --all-extras | ||
``` | ||
|
||
## 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 | ||
uv 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 | ||
uv run 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 | ||
uv run 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.