From 8881309465c0bc650c96200d74d589020d7a310e Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Wed, 17 Jul 2024 08:31:20 +0200 Subject: [PATCH 01/20] 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 9cd1c1c7..6ddcd4a1 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 - pip install ruff==0.4.6 + pip install ruff==0.5.1 # Update output format to enable automatic inline annotations. - name: Run Ruff Linter run: ruff check --output-format=github @@ -38,7 +38,7 @@ jobs: - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: - python-version: 3.7 + python-version: 3.8 - name: Install dependencies run: | python -m pip install --upgrade pip From bf025835f744cfd81eda0feca9ae5179ce06389e Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Wed, 17 Jul 2024 12:24:57 +0200 Subject: [PATCH 02/20] Update pypi.yml --- .github/workflows/pypi.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index f7bc352d..015f12bb 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -8,15 +8,15 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: '3.7' + python-version: '3.9' - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine mock + python -m pip install --upgrade pip uv + python -m uv install setuptools wheel twine mock - name: Build and publish env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} From 2c0758d4c05134eac2b56ce23d16e2adcd21724b Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Wed, 17 Jul 2024 12:28:49 +0200 Subject: [PATCH 03/20] Update tests.yml --- .github/workflows/tests.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6ddcd4a1..122a0be5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,8 +22,8 @@ jobs: python-version: "3.11" - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install ruff==0.5.1 + python -m pip install --upgrade pip uv + python -m uv pip install ruff==0.5.1 # Update output format to enable automatic inline annotations. - name: Run Ruff Linter run: ruff check --output-format=github @@ -34,15 +34,15 @@ jobs: runs-on: ubuntu-latest needs: [style] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.9 - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install torch==1.9.0+cpu torchvision==0.10.0+cpu -f https://download.pytorch.org/whl/torch_stable.html + python -m pip install --upgrade pip uv + python -m uv pip install torch==1.9.0+cpu torchvision==0.10.0+cpu -f https://download.pytorch.org/whl/torch_stable.html make install_dev - name: Test with pytest run: make test From cff056f9baabe789cb1b3534cff49849fd5e9448 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Wed, 17 Jul 2024 12:29:22 +0200 Subject: [PATCH 04/20] bugfix --- .github/workflows/pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 015f12bb..a240182a 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -16,7 +16,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip uv - python -m uv install setuptools wheel twine mock + python -m uv pip install setuptools wheel twine mock - name: Build and publish env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} From 74126f138ba7037be1ced1ab898858a03bf262a1 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Wed, 17 Jul 2024 12:31:58 +0200 Subject: [PATCH 05/20] Update dependabot.yml --- .github/dependabot.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5f493b7c..73ae80fa 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,9 @@ version: 2 updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" - package-ecosystem: "pip" directory: "/" schedule: @@ -8,4 +12,4 @@ updates: open-pull-requests-limit: 2 allow: - dependency-name: "timm" - dependency-type: "all" \ No newline at end of file + dependency-type: "all" From cd75c032cdbd15c998b57201954bbdecbb2faf53 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Wed, 17 Jul 2024 13:07:14 +0200 Subject: [PATCH 06/20] Update ruff to version 0.5.2 --- .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 122a0be5..9c8e7e8c 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.1 + python -m uv pip install ruff==0.5.2 # Update output format to enable automatic inline annotations. - name: Run Ruff Linter run: ruff check --output-format=github From 52f2ab81a1638880b4fc68b1c5a8149ff2ab20e7 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Wed, 17 Jul 2024 13:10:51 +0200 Subject: [PATCH 07/20] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d674c89e..9d07e1d6 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ URL = "https://github.com/qubvel/segmentation_models.pytorch" EMAIL = "qubvel@gmail.com" AUTHOR = "Pavel Iakubovskii" -REQUIRES_PYTHON = ">=3.7.0" +REQUIRES_PYTHON = ">=3.9.0" VERSION = None # The rest you shouldn't have to touch too much :) From f041114337f2163292b56ca6ff7dc0fdf3abfff3 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Wed, 17 Jul 2024 13:13:41 +0200 Subject: [PATCH 08/20] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5f1a53ac..b20efac6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ torchvision>=0.5.0 pretrainedmodels==0.7.4 efficientnet-pytorch==0.7.1 -timm==0.9.7 +timm>=0.9.7 tqdm pillow From 1d9187aa6b3e83ccb45a26bede92cd8d7c1bdacd Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Wed, 17 Jul 2024 13:15:14 +0200 Subject: [PATCH 09/20] Update ruff to version 0.5.2 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 9d07e1d6..301b9b83 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ REQUIRED = [] # What packages are optional? -EXTRAS = {"test": ["pytest", "mock", "ruff==0.4.6"]} +EXTRAS = {"test": ["pytest", "mock", "ruff==0.5.2"]} # 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 40f936a8f22350a4392e97da7d37e864d4cc47da Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Wed, 17 Jul 2024 13:23:12 +0200 Subject: [PATCH 10/20] 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..e0bac5ad --- /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 = 88 +indent-width = 4 + +# Assume Python 3.8 +target-version = "py38" + +[lint] +# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. +select = ["E4", "E7", "E9", "F"] +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 07cc7077b566cc77f08ba0943358576d84c9d1e8 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Wed, 17 Jul 2024 13:30:07 +0200 Subject: [PATCH 11/20] Update ruff.toml --- ruff.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruff.toml b/ruff.toml index e0bac5ad..c391fda7 100644 --- a/ruff.toml +++ b/ruff.toml @@ -37,7 +37,7 @@ target-version = "py38" [lint] # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. -select = ["E4", "E7", "E9", "F"] +select = ["E", "F", "I", "PERF", "RUFF", "SIM", "UP", "W"] ignore = [] # Allow fix for all enabled rules (when `--fix`) is provided. From 4737a093c21c9a98f61fe72963ec83585da389ca Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Wed, 17 Jul 2024 13:32:34 +0200 Subject: [PATCH 12/20] Update ruff.toml --- ruff.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruff.toml b/ruff.toml index c391fda7..2a180729 100644 --- a/ruff.toml +++ b/ruff.toml @@ -37,7 +37,7 @@ target-version = "py38" [lint] # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. -select = ["E", "F", "I", "PERF", "RUFF", "SIM", "UP", "W"] +select = ["E", "F", "I", "PERF", "PL", "RUF", "SIM", "UP", "W"] ignore = [] # Allow fix for all enabled rules (when `--fix`) is provided. From 62a0b29c4a2cc3373c832bdb542f9b334bb935bd Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Wed, 17 Jul 2024 13:35:20 +0200 Subject: [PATCH 13/20] Update ruff.toml --- ruff.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruff.toml b/ruff.toml index 2a180729..a7c8d395 100644 --- a/ruff.toml +++ b/ruff.toml @@ -37,7 +37,7 @@ target-version = "py38" [lint] # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. -select = ["E", "F", "I", "PERF", "PL", "RUF", "SIM", "UP", "W"] +select = ["E", "F", "I", "PERF", "PL", "RUF", "S", "SIM", "UP", "W"] ignore = [] # Allow fix for all enabled rules (when `--fix`) is provided. From b4e702ef931815d672a822a8b462f6b37b5ca346 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Wed, 17 Jul 2024 13:36:57 +0200 Subject: [PATCH 14/20] revert --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index b20efac6..5f1a53ac 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ torchvision>=0.5.0 pretrainedmodels==0.7.4 efficientnet-pytorch==0.7.1 -timm>=0.9.7 +timm==0.9.7 tqdm pillow From ded77f75b88f62db7e8d555ec68eb5f57cddffa3 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Wed, 17 Jul 2024 13:44:44 +0200 Subject: [PATCH 15/20] Align torchvision version with test version --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5f1a53ac..e8ba4500 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -torchvision>=0.5.0 +torchvision>=0.10.0 pretrainedmodels==0.7.4 efficientnet-pytorch==0.7.1 timm==0.9.7 From d6e4802a60b69a7e3d8dfe905d37d7ea2a3c9615 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Wed, 17 Jul 2024 14:12:05 +0200 Subject: [PATCH 16/20] 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 9c8e7e8c..6eb83c10 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==1.9.0+cpu torchvision==0.10.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 78e3811523a5c6663a871fbaf5a3bb685e99e23a Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Wed, 17 Jul 2024 15:52:21 +0200 Subject: [PATCH 17/20] Update ruff.toml --- ruff.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruff.toml b/ruff.toml index a7c8d395..0d102a91 100644 --- a/ruff.toml +++ b/ruff.toml @@ -29,11 +29,11 @@ exclude = [ ] # Same as Black. -line-length = 88 +line-length = 120 indent-width = 4 # Assume Python 3.8 -target-version = "py38" +target-version = "py39" [lint] # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. From d8a3bb2ab2fb8b95a7ee6c0544657f01dececa91 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Wed, 17 Jul 2024 15:55:29 +0200 Subject: [PATCH 18/20] Update ruff.toml --- ruff.toml | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/ruff.toml b/ruff.toml index 0d102a91..1b07461f 100644 --- a/ruff.toml +++ b/ruff.toml @@ -1,38 +1,11 @@ # 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", -] +exclude = [] # Same as Black. line-length = 120 indent-width = 4 -# Assume Python 3.8 +# Assume Python 3.9 target-version = "py39" [lint] From 01a9486edfc241ef911791823c33b833a3327ec6 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Wed, 17 Jul 2024 15:57:02 +0200 Subject: [PATCH 19/20] revert --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index e8ba4500..5f1a53ac 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -torchvision>=0.10.0 +torchvision>=0.5.0 pretrainedmodels==0.7.4 efficientnet-pytorch==0.7.1 timm==0.9.7 From 256136b39031f3262fad7d4cb2e15ebf00ada5a7 Mon Sep 17 00:00:00 2001 From: Olivier DEBAUCHE Date: Wed, 17 Jul 2024 19:25:58 +0200 Subject: [PATCH 20/20] revert --- ruff.toml | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 ruff.toml diff --git a/ruff.toml b/ruff.toml deleted file mode 100644 index 1b07461f..00000000 --- a/ruff.toml +++ /dev/null @@ -1,34 +0,0 @@ -# Exclude a variety of commonly ignored directories. -exclude = [] - -# 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"