From 814b661f7e4a7fe10460cf8c8252f712e84365a5 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Wed, 17 Jul 2024 19:25:37 +0200 Subject: [PATCH 01/17] Create ruff.toml --- ruff.toml | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 ruff.toml diff --git a/ruff.toml b/ruff.toml new file mode 100644 index 00000000..c03548b4 --- /dev/null +++ b/ruff.toml @@ -0,0 +1,61 @@ +# Exclude a variety of commonly ignored directories. +exclude = [ + ".bzr", + ".direnv", + ".eggs", + ".git", + ".git-rewrite", + ".hg", + ".ipynb_checkpoints", + ".mypy_cache", + ".nox", + ".pants.d", + ".pyenv", + ".pytest_cache", + ".pytype", + ".ruff_cache", + ".svn", + ".tox", + ".venv", + ".vscode", + "__pypackages__", + "_build", + "buck-out", + "build", + "dist", + "node_modules", + "site-packages", + "venv", +] + +# Same as Black. +line-length = 120 +indent-width = 4 + +# Assume Python 3.9 +target-version = "py39" + +[lint] +# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. +select = ["E", "F", "I", "PERF", "PL", "RUF", "S", "SIM", "UP", "W"] +ignore = [] + +# Allow fix for all enabled rules (when `--fix`) is provided. +fixable = ["ALL"] +unfixable = [] + +# Allow unused variables when underscore-prefixed. +dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" + +[format] +# Like Black, use double quotes for strings. +quote-style = "double" + +# Like Black, indent with spaces, rather than tabs. +indent-style = "space" + +# Like Black, respect magic trailing commas. +skip-magic-trailing-comma = false + +# Like Black, automatically detect the appropriate line ending. +line-ending = "auto" From 4d10f1b81df95092a5a8caebbec9ab2a96cca43d Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Sun, 28 Jul 2024 00:38:57 +0200 Subject: [PATCH 02/17] Update ruff to version 0.5.5 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 301b9b83..b8dd448c 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ REQUIRED = [] # What packages are optional? -EXTRAS = {"test": ["pytest", "mock", "ruff==0.5.2"]} +EXTRAS = {"test": ["pytest", "mock", "ruff==0.5.5"]} # Import the README and use it as the long-description. # Note: this will only work if 'README.md' is present in your MANIFEST.in file! From 4940cca9ea8b29c1c4c22ce695f8edc7d658eb83 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Sun, 28 Jul 2024 00:41:10 +0200 Subject: [PATCH 03/17] Update tests.yml --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6eb83c10..c4767867 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,7 +23,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip uv - python -m uv pip install ruff==0.5.2 + python -m uv pip install ruff==0.5.5 # Update output format to enable automatic inline annotations. - name: Run Ruff Linter run: ruff check --output-format=github From fe848e877bca50fcfc77c873587918c431c4e40f Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Fri, 9 Aug 2024 15:51:51 +0200 Subject: [PATCH 04/17] Update tests.yml --- .github/workflows/tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c4767867..1641df28 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,7 +23,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip uv - python -m uv pip install ruff==0.5.5 + python -m uv pip install ruff==0.5.7 # Update output format to enable automatic inline annotations. - name: Run Ruff Linter run: ruff check --output-format=github @@ -38,11 +38,11 @@ jobs: - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: 3.11 - name: Install dependencies run: | python -m pip install --upgrade pip uv - python -m uv pip install torch==2.3.1+cpu torchvision==0.18.1+cpu -f https://download.pytorch.org/whl/torch_stable.html + python -m uv pip install torch==2.4.0+cpu torchvision==0.19.0+cpu -f https://download.pytorch.org/whl/torch_stable.html make install_dev - name: Test with pytest run: make test From 3e67ee0d1cf0a44d60cefecf061f3a5d65756fe6 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Fri, 9 Aug 2024 15:52:37 +0200 Subject: [PATCH 05/17] Update ruff.toml --- ruff.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruff.toml b/ruff.toml index c03548b4..ee5d3789 100644 --- a/ruff.toml +++ b/ruff.toml @@ -32,8 +32,8 @@ exclude = [ line-length = 120 indent-width = 4 -# Assume Python 3.9 -target-version = "py39" +# Assume Python 3.10 +target-version = "py310" [lint] # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. From 3868460feb03215e9230ecc76f1c0790e26496fd Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Fri, 9 Aug 2024 15:53:10 +0200 Subject: [PATCH 06/17] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b8dd448c..1abf45ea 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ REQUIRED = [] # What packages are optional? -EXTRAS = {"test": ["pytest", "mock", "ruff==0.5.5"]} +EXTRAS = {"test": ["pytest", "mock", "ruff==0.5.7"]} # Import the README and use it as the long-description. # Note: this will only work if 'README.md' is present in your MANIFEST.in file! From a7559de88a7647cfc067d7ac952ac2aaa14c2031 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Sun, 11 Aug 2024 13:07:59 +0200 Subject: [PATCH 07/17] Update ruff.toml --- ruff.toml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ruff.toml b/ruff.toml index ee5d3789..11fb8f6c 100644 --- a/ruff.toml +++ b/ruff.toml @@ -37,7 +37,18 @@ target-version = "py310" [lint] # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. -select = ["E", "F", "I", "PERF", "PL", "RUF", "S", "SIM", "UP", "W"] +select = [ + # "E", + # "F", + # "I", # Isort + # "PERF", # Perlint + # "PL", # Pylint + # "RUF", + # "S", # Bandit + # "SIM", + # "UP", + # "W", +] ignore = [] # Allow fix for all enabled rules (when `--fix`) is provided. From ea949cbbdd32d3b4257dfd862274061fb33f2a02 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Sun, 11 Aug 2024 13:18:38 +0200 Subject: [PATCH 08/17] Update ruff.toml --- ruff.toml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ruff.toml b/ruff.toml index 11fb8f6c..6b360f6e 100644 --- a/ruff.toml +++ b/ruff.toml @@ -32,22 +32,22 @@ exclude = [ line-length = 120 indent-width = 4 -# Assume Python 3.10 -target-version = "py310" +# Assume Python 3.11 +target-version = "py311" [lint] # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. select = [ - # "E", - # "F", + # "E", # pycodestyle + # "F", # pyglake # "I", # Isort # "PERF", # Perlint # "PL", # Pylint - # "RUF", + # "RUF", # Ruff # "S", # Bandit - # "SIM", - # "UP", - # "W", + # "SIM", # Simplify + # "UP", # Upgrade + # "W", # Warning ] ignore = [] From 138eaecd99841843d4970c7ee5bf50e687e081c6 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Sat, 17 Aug 2024 22:55:25 +0200 Subject: [PATCH 09/17] Update tests.yml --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1641df28..f54228d1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,7 +23,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip uv - python -m uv pip install ruff==0.5.7 + python -m uv pip install ruff==0.6.1 # Update output format to enable automatic inline annotations. - name: Run Ruff Linter run: ruff check --output-format=github From c7efe53d35d65795cc0c552bba7d39eb49335ecf Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Sat, 17 Aug 2024 22:56:04 +0200 Subject: [PATCH 10/17] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 1abf45ea..93d01cf8 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ REQUIRED = [] # What packages are optional? -EXTRAS = {"test": ["pytest", "mock", "ruff==0.5.7"]} +EXTRAS = {"test": ["pytest", "mock", "ruff==0.6.1"]} # Import the README and use it as the long-description. # Note: this will only work if 'README.md' is present in your MANIFEST.in file! From c6a96bad606ce565b922bbb3e6dbf2c1077a6c37 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Thu, 29 Aug 2024 18:47:52 +0200 Subject: [PATCH 11/17] Update tests.yml --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f54228d1..d0399292 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,7 +23,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip uv - python -m uv pip install ruff==0.6.1 + python -m uv pip install ruff==0.6.3 # Update output format to enable automatic inline annotations. - name: Run Ruff Linter run: ruff check --output-format=github From 54f29a8a7a7143e8d244d3aff4f7ebb09e173c29 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Thu, 29 Aug 2024 18:48:27 +0200 Subject: [PATCH 12/17] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 93d01cf8..0ce3eaa1 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ REQUIRED = [] # What packages are optional? -EXTRAS = {"test": ["pytest", "mock", "ruff==0.6.1"]} +EXTRAS = {"test": ["pytest", "mock", "ruff==0.6.3"]} # Import the README and use it as the long-description. # Note: this will only work if 'README.md' is present in your MANIFEST.in file! From afb92df6c2e1571803688d2fe9b1492ad1e3a903 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Mon, 2 Sep 2024 08:59:20 +0200 Subject: [PATCH 13/17] Update tests.yml --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d0399292..9082aab6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,8 +27,8 @@ jobs: # Update output format to enable automatic inline annotations. - name: Run Ruff Linter run: ruff check --output-format=github - - name: Run Ruff Formatter - run: ruff format --check + # - name: Run Ruff Formatter + # run: ruff format --check test: runs-on: ubuntu-latest From 6c415f0ff65c59fa0690b70284661100577d28d4 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Mon, 2 Sep 2024 09:07:08 +0200 Subject: [PATCH 14/17] Update tests.yml --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9082aab6..aea7f824 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -42,7 +42,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip uv - python -m uv pip install torch==2.4.0+cpu torchvision==0.19.0+cpu -f https://download.pytorch.org/whl/torch_stable.html + python -m uv pip install torch==2.3.1+cpu torchvision==0.18.1+cpu -f https://download.pytorch.org/whl/torch_stable.html make install_dev - name: Test with pytest run: make test From 49004091fb140f1f9c5dcb314649182486c1c32b Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Mon, 2 Sep 2024 09:12:41 +0200 Subject: [PATCH 15/17] Update tests.yml --- .github/workflows/tests.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aea7f824..9ca37920 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,7 +22,8 @@ jobs: python-version: "3.11" - name: Install dependencies run: | - python -m pip install --upgrade pip uv + python -m pip install --upgrade pip + python -m pip install uv python -m uv pip install ruff==0.6.3 # Update output format to enable automatic inline annotations. - name: Run Ruff Linter @@ -41,7 +42,8 @@ jobs: python-version: 3.11 - name: Install dependencies run: | - python -m pip install --upgrade pip uv + python -m pip install --upgrade pip + python -m pip install uv python -m uv pip install torch==2.3.1+cpu torchvision==0.18.1+cpu -f https://download.pytorch.org/whl/torch_stable.html make install_dev - name: Test with pytest From 57905ddc04a78e725878cf1f8c3b2b0a6444dff4 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Mon, 2 Sep 2024 09:13:57 +0200 Subject: [PATCH 16/17] Update ruff.toml --- ruff.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruff.toml b/ruff.toml index 6b360f6e..34f005f1 100644 --- a/ruff.toml +++ b/ruff.toml @@ -44,7 +44,7 @@ select = [ # "PERF", # Perlint # "PL", # Pylint # "RUF", # Ruff - # "S", # Bandit + "S", # Bandit # "SIM", # Simplify # "UP", # Upgrade # "W", # Warning From 0d77ab31f5f62474c199570755b3a8aca3db3a36 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Mon, 2 Sep 2024 09:18:23 +0200 Subject: [PATCH 17/17] Update ruff.toml --- ruff.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruff.toml b/ruff.toml index 34f005f1..1d0d38db 100644 --- a/ruff.toml +++ b/ruff.toml @@ -41,10 +41,10 @@ select = [ # "E", # pycodestyle # "F", # pyglake # "I", # Isort - # "PERF", # Perlint + "PERF", # Perlint # "PL", # Pylint # "RUF", # Ruff - "S", # Bandit + # "S", # Bandit # "SIM", # Simplify # "UP", # Upgrade # "W", # Warning