This documents ensures Ruff to lint and format the file on each save action.
- Install CoRA and start CoRA's environment following instructions in README.md.
- Install Ruff with the version (with a comment
# Ruff version.) shown in pre-commit configs. For example:
pip install ruff==v0.7.2 # Change the version accordingly- Import CoRA into PyCharm; please ensure CoRA's environment has been imported as a common conda environment
- Open Settings -> Tools -> File Watchers, and add a new file watcher named with the following configurations with the Arguments filled with
-c "$PyInterpreterDirectory$/ruff check $FilePathRelativeToProjectRoot$ && $PyInterpreterDirectory$/ruff format $FilePathRelativeToProjectRoot$"- Open Settings -> Tools -> Actions On Save to ensure "File Watcher: Ruff Lint & Format" is toggled.
- Save to apply all the above settings.
TODO: Add instructions to configure Ruff in VSCode
