git-remote-dropbox uses the Hatch project manager (installation instructions).
Hatch automatically manages dependencies and runs type checking, formatting/linting, and other operations in isolated environments.
git-remote-dropbox has integration tests written in shell scripts. The tests exercise git-remote-dropbox via git operations, so the tests interact with the filesystem. For this reason, it is recommended that tests are run inside a Docker container (or in CI).
To run the tests, first start a Docker container:
docker run -it --rm -v "${PWD}:/git-remote-dropbox" -w /git-remote-dropbox python:3.13-bookworm /bin/bash
Now, inside the Docker container, install the git-remote-dropbox package:
pip install -e .
Next, set the DROPBOX_TOKEN
environment variable (to your long-lived access token). This is required because the tests actually interact with the real Dropbox API.
export DROPBOX_TOKEN='...'
Finally, run the tests:
tests/test.sh
You can run the mypy static type checker with:
hatch run types:check
You can run the Ruff formatter and linter with:
hatch fmt
This will automatically make safe fixes to your code. If you want to only check your files without making modifications, run hatch fmt --check
.
You can use hatch build
to create build artifacts, a source distribution ("sdist") and a built distribution ("wheel").
You can use hatch publish
to publish build artifacts to PyPI.
Testing, type checking, and formatting/linting is checked in CI.