Skip to content

Latest commit

 

History

History
54 lines (42 loc) · 1.7 KB

CONTRIBUTING.md

File metadata and controls

54 lines (42 loc) · 1.7 KB

dstack contributing guide

Development setup

  1. Clone the repo:
    git clone https://github.com/dstackai/dstack && cd dstack
    
  2. (Recommended) Create a virtual environment:
    python3 -m venv venv
    
    source venv/bin/activate
    
  3. Install dstack in editable mode:
    pip install -e '.[all]'
    
  4. Install dev dependencies:
    pip install -r cli/requirements_dev.txt
    
  5. Build the frontend:
    ./scripts/build_frontend.sh
    
  6. (Recommended) Install pre-commits:
    pre-commit install
    

For more information on frontend development, see hub/README.md.

Contributing process

  1. Look for an existing issue or create a new one.
  2. Fork the repo.
  3. Commit your changes.
  4. Open a PR. Link the PR to the issue if you are solving one.

Making changes

We use black to format Python code and isort to sort Python imports. Before committing your changes, run:

  1. isort --settings-file pyconfig.toml cli
  2. black --config pyconfig.toml cli

There are also helper pre-commits installed for black and isort 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.

P.S.

Feel free to open an issue if you have difficulties contributing to dstack.