Skip to content

Commit

Permalink
update contributing docs to use uv
Browse files Browse the repository at this point in the history
  • Loading branch information
hrodmn committed Oct 17, 2024
1 parent cf7c954 commit d2a898a
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,37 @@ Issues and pull requests are more than welcome: <https://github.com/developments

**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
# 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
pip install pre-commit -e .["dev,test"]
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
pre-commit install
uv pre-commit install
```

## Testing

You can then run the tests with the following command:

```bash
python -m pytest
uv run pytest
```

The tests use `vcrpy <https://vcrpy.readthedocs.io/en/latest/>`_ to mock API calls
Expand All @@ -32,5 +43,5 @@ use the ``@pytest.mark.vcr`` decorator function to indicate ``vcrpy`` should be
Record the new responses and commit them to the repository.

```bash
python -m pytest -v -s --record-mode new_episodes
uv run pytest -v -s --record-mode new_episodes
```

0 comments on commit d2a898a

Please sign in to comment.