Please search the issue tracker before creating a new issue (problem or an improvement request). Feel free to add issues related to the project.
If you feel that you can fix or implement it yourself, please read a few paragraphs below to learn how to submit your changes.
- Open a new issue in the issue tracker.
- Setup the development environment if you need to run tests or run the DVC with your changes.
- Fork DVC and prepare necessary changes.
- Add tests for your changes to
tests/. You can skip this step if the effort to create tests for your change is unreasonable. Changes without tests are still going to be considered by us.
- Run tests and make sure all of them pass.
- Submit a pull request, referencing any issues it addresses.
We will review your pull request as soon as possible. Thank you for contributing!
Get the latest development version. Fork and clone the repo:
$ git clone email@example.com:<your-username>/dvc.git
Make sure that you have Python 3.8 or higher installed. On macOS, we recommend
brew to install Python. For Windows, we recommend an official
pip version 21.3+ is required.
Install DVC in editable mode with
pip install -e ".[dev]". But before we do
that, we strongly recommend creating a
$ cd dvc $ python3 -m venv venv $ source venv/bin/activate $ pip install --upgrade pip wheel $ pip install -e ".[dev]"
Install coding style pre-commit hooks with:
$ pip install pre-commit $ pre-commit install
That's it. You should be ready to make changes, run tests, and make commits! If you experience any problems, don't hesitate to ping us in our chat.
The DVC command line interface has several debugging tools that are hidden by
default in the
--help, but will be shown if
--verbose is also specified. See
The DVC Debugging Wiki
for more information on these debugging options.
We have unit tests in
tests/unit/ and functional tests in
Consider writing the former to ensure complicated functions and classes behave
For specific functionality, you will need to use functional tests alongside
pytest fixtures to create a temporary
directory, Git and/or DVC repo, and bootstrap some files. See the
docstring for some usage examples.
The simplest way to run tests:
$ cd dvc $ python -m tests
pytest to run the full test suite and report the result. At the very
end you should see something like this:
$ python -m tests ... ============= 434 passed, 6 skipped, 8 warnings in 131.43 seconds ==============
Otherwise, for each failed test you should see the following output, to help you identify the problem:
... [gw2] [ 84%] FAILED tests/unit/test_progress.py::TestProgressAware::test tests/unit/test_prompt.py::TestConfirm::test_eof tests/test_updater.py::TestUpdater::test ... =================================== FAILURES =================================== ____________________________ TestProgressAware.test ____________________________ ... ======== 1 failed, 433 passed, 6 skipped, 8 warnings in 137.49 seconds =========
You can pass any additional arguments to the script that will override the
To run a single test case:
$ python -m tests tests/func/test_metrics.py::TestCachedMetrics
To run a single test function:
$ python -m tests tests/unit/utils/test_fs.py::test_get_inode
To pass additional arguments:
$ python -m tests --pdb
(component): (short description) (long description) Fixes #(GitHub issue id).
- component: If applicable, comma-separated list of affected component(s)
- short description: Short description of the patch
- long description: If needed, longer message describing the patch in more details
- github issue id: ID of the GitHub issue that this patch is addressing
remote: add support for Amazon S3 Fixes #123