We appreciate your interest in contributing to dstack
! This document will help you get up to speed with dstack
codebase and guide you through the contribution process.
Follow contributing/DEVELOPMENT.md.
If you make a non-trivial change to dstack
, we recommend you learn about dstack
internals. A good place to start is contributing/ARCHITECTURE.md.
- Look for an existing issue or create a new one.
- Fork the repo.
- Commit your changes.
- Open a PR. Link the PR to the issue (if you are solving one).
- Bug fixes that address a clearly defined bug. Include steps to reproduce in the linked issue or the PR.
- New features. Before submitting a feature PR, create an issue with a proposal to discuss it with the core team and other interested parties.
- Minor fixes such as typos.
- Examples.
We use ruff
to format Python code and to sort Python imports. Before committing your changes, run:
ruff check --fix
ruff format
There are also helper pre-commits installed for
ruff
that make commits fail if the code is not formatted or the imports are not sorted. They also change the code as required so that you can review the changes and commit again.
It's recommended to run tests locally before running them in CI. To run Python tests, first ensure you've install dev dependencies as described in contributing/DEVELOPMENT.md. Then you can do:
pytest src/tests
(Optionally) By default, tests run against SQLite.
Use the --runpostgres
flag to run the tests against Postgres as well:
pytest src/tests --runpostgres
If you'd like to integrate a new cloud provider to dstack
, follow contributing/BACKENDS.md.
If you have any questions, you can always get help in our Discord community.