We love to see our community members get involved! If you are planning to contribute to Dagster, you will first need to set up a local development environment.
Install uv. On macOS, you can use curl to download the script and execute it with sh:
curl -LsSf https://astral.sh/uv/install.sh |sh
Create and activate a virtual environment using uv with a Python version that Dagster supports:
uv venv --python 3.12source .venv/bin/activate
Dagster supports Python 3.9 through 3.12.
Ensure that you have node installed by running node -v, and that you have yarn installed. If you are on macOS, you can install yarn with Homebrew:
brew installyarn
Clone the Dagster repository to the destination of your choice:
git clone git@github.com:dagster-io/dagster.git
Run make dev_install at the root of the repository. This sets up a full Dagster developer environment with all modules and runs tests that do not require heavy external dependencies such as docker. This will take a few minutes. Note that certain sections of the makefile (sanity_check, which is part of rebuild_ui) require POSIX-compliant shells and will fail on CMD and powershell—if developing on windows, using something like WSL or git-bash is recommended.
make dev_install
Note for Macs with an Apple silicon chip: Some users have reported installation problems due to missing wheels for arm64 Macs when installing the grpcio package. To install the dagster development environment using our pre-built wheel of the grpcio package for M1, M2, and M3 machines, run make dev_install_m1_grpcio_wheel instead of make dev_install.
Run some tests manually to make sure things are working:
Ruff/Pyright: We use ruff for formatting, linting and import sorting, and pyright for static type-checking. We test these in our CI/CD pipeline.
Run make ruff from the repo root to format, sort imports, and autofix some lint errors. It will also print out errors that need to be manually fixed.
Run make pyright from the repo root to analyze the whole repo for type-correctness. Note that the first time you run this, it will take several minutes because a new virtualenv will be constructed.
Line Width: We use a line width of 100.
IDE: We recommend setting up your IDE to format and check with ruff on save, but you can always run make ruff in the root Dagster directory before submitting a pull request. If you're also using VS Code, you can see what we're using for our settings.jsonhere.
Docker: Some tests require Docker Desktop to be able to run them locally.
The docs style checklist includes a set of style guidelines to adhere to when adding or modifying docs.
To run the Dagster documentation website locally, run the following commands:
cd docs
make next-watch-build # Serves the docs website on http://localhost:3001
Troubleshooting tip: You may need to run make next-dev-install first to install dependencies. Also make sure that your Node version is >=12.13.0.
The API documentation is generated from ReStructured Text files (.rst), which extracts Python docstrings from the library files. The .rst files can be found in the docs/sphinx/sections/api/apidocs directory.
If you change any .rst files, be sure to run the following command in the docs directory:
make apidoc-build
The majority of our code snippets are pulled from real Python files. This allows us to test our code snippets and ensure they remain up-to-date.
In .mdx files, you'll see a code snippet with python file=/path/to/file.py startafter=start_marker endbefore=end_marker at the beginning of the block. For example:
You can find the corresponding Python file at dagster/examples/docs_snippets/docs_snippets/concepts/asset/asset_dependency.py. The code included in each snippet is the code in the file between the # start_marker and # end_marker comments.
To change the code snippet, update the .py file, then run the following from the docs directory:
make mdx-format
You can find more information about developing documentation in docs/README.md.
We encourage you to start with an issue labeled with the tag good first issue on the Github issue board, to get familiar with our codebase as a first-time contributor.
When you are ready for more of a challenge, you can tackle issues with the most 👍 reactions. We factor engagement into prioritization of the issues. You can also explore other labels and pick any issue based on your interest.
In the PR template, please describe the change, including the motivation/context, test coverage, and any other relevant information. Please note if the PR is a breaking change or if it is related to an open GitHub issue.
A Core reviewer will review your PR in around one business day and provide feedback on any changes it requires to be approved. Once approved and all the tests (including Buildkite!) pass, the reviewer will click the Squash and merge button in GitHub 🥳.
Your PR is now merged into Dagster! We’ll shout out your contribution in the weekly release notes.