diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml new file mode 100644 index 0000000..f95bda5 --- /dev/null +++ b/.github/workflows/ruff.yml @@ -0,0 +1,8 @@ +name: Ruff action +on: [push, pull_request] +jobs: + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: astral-sh/ruff-action@v4.0.0 \ No newline at end of file diff --git a/README.md b/README.md index bf6da0c..549dfe8 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,16 @@ This will create a virtual environment in the `.venv` folder with all the requir source .venv/bin/activate ``` +### For development + +For developers who want to make changes to the code, please install the `pre-commit` hooks for code formatting and linting. You can do this by running: + +```sh +pre-commit install +``` + +After this, every time you make a commit, the code will be automatically formatted and linted according to the rules defined in the `.pre-commit-config.yaml` file. + ## Spatio Temporal Model Architecture diff --git a/pyproject.toml b/pyproject.toml index 9261094..e83d4b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,3 +36,6 @@ docs = [ [tool.setuptools] packages = ["climanet"] + +[tool.ruff] +exclude = ["notebooks"]