Hack
Ready to contribute? Here’s how to set up Watson for local development.
Python requirements
- Python 3.10+
- UV package manager
Get started!
-
Fork the Watson repository on GitHub.
-
Clone your fork locally:
$ git clone git@github.com:your_name_here/Watson.git -
Create a virtual environment and install project dependencies:
$ cd Watson $ make bootstrap -
Create a branch for local development:
$ git checkout -b name-of-your-bugfix-or-featureNow you can make your changes locally.
Notes:
- The files you need to edit to change watson’s behavior are located in the
watson/subfolder. - Every time you run
watsoninside the virtual environment, the source code inside thewatson/subfolder will be used. - To avoid messing with your real Watson data, watson will use
data/as the application folder inside the virtual environment. You can runwatson projectsto check that your real projects are not shown.
- The files you need to edit to change watson’s behavior are located in the
-
When you’re done making changes, check that your changes pass the tests (see Run the tests):
(.venv) $ tox -
If you have added a new command or updated/fixed docstrings, please update the documentation. You can check changes live using:
$ make docs-serve -
Commit your changes and push your branch to GitHub:
$ git add . $ git commit -m "Your detailed description of your changes." $ git push -u origin name-of-your-bugfix-or-feature -
After reading this, submit a pull request through the GitHub website.
Run the tests
The tests use pytest. To run them with the default Python interpreter run:
$ make test
If you want to run pytest with custom options, use:
$ uv run pytest -x -k test_cli