From 17197cfa52bed44d314d1c2a71c8abc265f1e81a Mon Sep 17 00:00:00 2001 From: Ou Ku Date: Wed, 10 Jun 2026 13:38:16 +0200 Subject: [PATCH 1/3] exclude notebooks dir from ruff check --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) 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"] From c9af59fb1861966a711874c77e1671f1c54bd0db Mon Sep 17 00:00:00 2001 From: Ou Ku Date: Wed, 10 Jun 2026 13:45:25 +0200 Subject: [PATCH 2/3] add pre-commit hook installation to README --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 From 21bea9fa7648bfb153f5789a9c3320180cc56c0f Mon Sep 17 00:00:00 2001 From: Ou Ku Date: Wed, 10 Jun 2026 13:50:31 +0200 Subject: [PATCH 3/3] add GH action for ruff linting and formatting --- .github/workflows/ruff.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/workflows/ruff.yml 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