From cb0c67664900d9ec4abf1de60a3ef72a9ce2fa68 Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Fri, 27 Oct 2023 16:13:56 +0100 Subject: [PATCH 01/14] Update to coverage 6.5 and coveralls 3.3 Move coveralls from pip to conda --- environment-dev.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/environment-dev.yml b/environment-dev.yml index 902a6bd1d33..bcf465a0f0e 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -12,7 +12,6 @@ dependencies: - conda-forge::numexpr # https://github.com/mantidproject/mantidimaging/issues/1774 - pip - pip: - - coveralls==3.3.* - testfixtures==6.18.* - gitpython==3.1.* - pylint==2.11.* @@ -28,7 +27,8 @@ dependencies: - pytest-cov==3.0.* - pytest-randomly==3.12.* - pytest-xdist==2.5.* - - coverage==6.4.* + - coverage==6.5.* + - coveralls==3.3.* - pyfakefs==5.0.* - pyinstaller==5.7.* - sarepy=2020.07 # For building old docs From 867e029916251b211c707374ef5d4a4b81cfb2e1 Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Fri, 27 Oct 2023 16:23:16 +0100 Subject: [PATCH 02/14] Update to testfixtures 7.2 and move to conda --- environment-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment-dev.yml b/environment-dev.yml index bcf465a0f0e..808d771407d 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -12,7 +12,6 @@ dependencies: - conda-forge::numexpr # https://github.com/mantidproject/mantidimaging/issues/1774 - pip - pip: - - testfixtures==6.18.* - gitpython==3.1.* - pylint==2.11.* - sphinx==4.2.* @@ -27,6 +26,7 @@ dependencies: - pytest-cov==3.0.* - pytest-randomly==3.12.* - pytest-xdist==2.5.* + - testfixtures==7.2.* - coverage==6.5.* - coveralls==3.3.* - pyfakefs==5.0.* From 8cb53ab9ebb98ceca1922bcf7f16bf3e13b12d59 Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Fri, 27 Oct 2023 16:31:16 +0100 Subject: [PATCH 03/14] Move gitpython to conda --- environment-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment-dev.yml b/environment-dev.yml index 808d771407d..91ab614b652 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -12,7 +12,6 @@ dependencies: - conda-forge::numexpr # https://github.com/mantidproject/mantidimaging/issues/1774 - pip - pip: - - gitpython==3.1.* - pylint==2.11.* - sphinx==4.2.* - git+https://github.com/samtygier-stfc/sphinx-multiversion.git@prebuild_command @@ -27,6 +26,7 @@ dependencies: - pytest-randomly==3.12.* - pytest-xdist==2.5.* - testfixtures==7.2.* + - gitpython==3.1.* - coverage==6.5.* - coveralls==3.3.* - pyfakefs==5.0.* From b3bdddaf1b8c7207f7d3c20f4f972c3f55529f93 Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Fri, 27 Oct 2023 16:33:46 +0100 Subject: [PATCH 04/14] Remove unused pylint and isort --- environment-dev.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/environment-dev.yml b/environment-dev.yml index 91ab614b652..f50d591cc98 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -12,10 +12,8 @@ dependencies: - conda-forge::numexpr # https://github.com/mantidproject/mantidimaging/issues/1774 - pip - pip: - - pylint==2.11.* - sphinx==4.2.* - git+https://github.com/samtygier-stfc/sphinx-multiversion.git@prebuild_command - - isort==5.9.* - eyes-images==4.25.* - parameterized==0.8.* - pre-commit==2.15.* From 4b33cebfa4bb9d63d2998012e02bb698eba36688 Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Fri, 27 Oct 2023 17:12:02 +0100 Subject: [PATCH 05/14] Update eyes-images to 5.20 Fix deprecation warning and duplication --- environment-dev.yml | 2 +- mantidimaging/eyes_tests/base_eyes.py | 3 --- mantidimaging/eyes_tests/eyes_manager.py | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/environment-dev.yml b/environment-dev.yml index f50d591cc98..401626abe2a 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -14,7 +14,7 @@ dependencies: - pip: - sphinx==4.2.* - git+https://github.com/samtygier-stfc/sphinx-multiversion.git@prebuild_command - - eyes-images==4.25.* + - eyes-images==5.20.* - parameterized==0.8.* - pre-commit==2.15.* - yapf==0.33.* diff --git a/mantidimaging/eyes_tests/base_eyes.py b/mantidimaging/eyes_tests/base_eyes.py index 9bd873985f1..e236b031077 100644 --- a/mantidimaging/eyes_tests/base_eyes.py +++ b/mantidimaging/eyes_tests/base_eyes.py @@ -11,7 +11,6 @@ from PyQt5.QtGui import QFont from PyQt5.QtWidgets import QMainWindow, QMenu, QWidget, QApplication -from applitools.common import MatchLevel from mantidimaging.core.data import ImageStack from mantidimaging.core.data.dataset import StrictDataset, MixedDataset @@ -65,8 +64,6 @@ def setUpClass(cls) -> None: cls.eyes_manager.set_batch(APPLITOOLS_BATCH_ID) def setUp(self): - self.eyes_manager.set_match_level(MatchLevel.CONTENT) - self.imaging = None self.eyes_manager.image_directory = APPLITOOLS_IMAGE_DIR diff --git a/mantidimaging/eyes_tests/eyes_manager.py b/mantidimaging/eyes_tests/eyes_manager.py index 45ef66102a7..a4c31dcd4c5 100644 --- a/mantidimaging/eyes_tests/eyes_manager.py +++ b/mantidimaging/eyes_tests/eyes_manager.py @@ -26,7 +26,7 @@ class EyesManager: def __init__(self, application_name="Mantid Imaging", test_name=None): self.application_name = application_name self.eyes = Eyes() - self.eyes.match_level = MatchLevel.CONTENT + self.eyes.match_level = MatchLevel.IGNORE_COLORS self.eyes.configure.host_os = sys.platform self.image_directory = None self.imaging = None From 85cac715cece363f0a0d2b12b8fc3d0b16546be2 Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Mon, 30 Oct 2023 17:04:52 +0000 Subject: [PATCH 06/14] Update to parameterized 0.9 and move it to conda --- environment-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment-dev.yml b/environment-dev.yml index 401626abe2a..38b23b755e5 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -15,7 +15,6 @@ dependencies: - sphinx==4.2.* - git+https://github.com/samtygier-stfc/sphinx-multiversion.git@prebuild_command - eyes-images==5.20.* - - parameterized==0.8.* - pre-commit==2.15.* - yapf==0.33.* - mypy==1.3 @@ -28,6 +27,7 @@ dependencies: - coverage==6.5.* - coveralls==3.3.* - pyfakefs==5.0.* + - parameterized==0.9.* - pyinstaller==5.7.* - sarepy=2020.07 # For building old docs - ruff=0.0.275 From 2e6461cedfbd92a2f7230a2382bf8e2806184be4 Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Mon, 30 Oct 2023 17:12:30 +0000 Subject: [PATCH 07/14] Update to pre-commit 3.5 and move to conda --- environment-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment-dev.yml b/environment-dev.yml index 38b23b755e5..fd12905c50c 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -15,7 +15,6 @@ dependencies: - sphinx==4.2.* - git+https://github.com/samtygier-stfc/sphinx-multiversion.git@prebuild_command - eyes-images==5.20.* - - pre-commit==2.15.* - yapf==0.33.* - mypy==1.3 - pytest==7.1.* @@ -31,3 +30,4 @@ dependencies: - pyinstaller==5.7.* - sarepy=2020.07 # For building old docs - ruff=0.0.275 + - pre-commit==3.5.* From d4795f081bac5c517e0b2eb78108c94876a47ee4 Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Mon, 30 Oct 2023 17:25:46 +0000 Subject: [PATCH 08/14] Update to yapf 0.40 --- .pre-commit-config.yaml | 2 +- environment-dev.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c1280afbf7a..5fc5e6d77d4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: - id: end-of-file-fixer types: [python] - repo: https://github.com/google/yapf - rev: v0.33.0 + rev: v0.40.2 hooks: - id: yapf - repo: local diff --git a/environment-dev.yml b/environment-dev.yml index fd12905c50c..c94423038b4 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -15,7 +15,7 @@ dependencies: - sphinx==4.2.* - git+https://github.com/samtygier-stfc/sphinx-multiversion.git@prebuild_command - eyes-images==5.20.* - - yapf==0.33.* + - yapf==0.40.* - mypy==1.3 - pytest==7.1.* - pytest-cov==3.0.* From d7f9babc9f418f2e343a13befea4772a8cdb33e8 Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Mon, 30 Oct 2023 17:36:17 +0000 Subject: [PATCH 09/14] Update to pytest 7.4 --- environment-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment-dev.yml b/environment-dev.yml index c94423038b4..d29e3fc0d45 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -17,7 +17,7 @@ dependencies: - eyes-images==5.20.* - yapf==0.40.* - mypy==1.3 - - pytest==7.1.* + - pytest==7.4.* - pytest-cov==3.0.* - pytest-randomly==3.12.* - pytest-xdist==2.5.* From a96759365dbfdbb10078ee66e15636197249f2d5 Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Tue, 31 Oct 2023 11:59:37 +0000 Subject: [PATCH 10/14] Update pytest plugins --- environment-dev.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/environment-dev.yml b/environment-dev.yml index d29e3fc0d45..d504850e997 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -18,9 +18,9 @@ dependencies: - yapf==0.40.* - mypy==1.3 - pytest==7.4.* - - pytest-cov==3.0.* - - pytest-randomly==3.12.* - - pytest-xdist==2.5.* + - pytest-cov==4.1.* + - pytest-randomly==3.15.* + - pytest-xdist==3.3.* - testfixtures==7.2.* - gitpython==3.1.* - coverage==6.5.* From f2f1f67c8835bef4b67b698a46547a5c79b676c9 Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Tue, 31 Oct 2023 12:13:13 +0000 Subject: [PATCH 11/14] Update pyfakefs 5.3 --- environment-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment-dev.yml b/environment-dev.yml index d504850e997..02bbadfd18b 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -25,7 +25,7 @@ dependencies: - gitpython==3.1.* - coverage==6.5.* - coveralls==3.3.* - - pyfakefs==5.0.* + - pyfakefs==5.3.* - parameterized==0.9.* - pyinstaller==5.7.* - sarepy=2020.07 # For building old docs From 83c488a8bb64122910cc79d4d86bd39cef8fadde Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Tue, 31 Oct 2023 13:20:46 +0000 Subject: [PATCH 12/14] Update pyinstaller 6.1 --- environment-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment-dev.yml b/environment-dev.yml index 02bbadfd18b..77f32c412c0 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -27,7 +27,7 @@ dependencies: - coveralls==3.3.* - pyfakefs==5.3.* - parameterized==0.9.* - - pyinstaller==5.7.* + - pyinstaller==6.1.* - sarepy=2020.07 # For building old docs - ruff=0.0.275 - pre-commit==3.5.* From bf4d1111426d821685c8c283e63970fb69f05943 Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Tue, 31 Oct 2023 14:14:57 +0000 Subject: [PATCH 13/14] Update Ruff 0.1.3 And explicitly set python version, as it now chooses an older one by default --- .pre-commit-config.yaml | 2 +- environment-dev.yml | 2 +- pyproject.toml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5fc5e6d77d4..700d1c3b39c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,6 +23,6 @@ repos: files: ^mantidimaging/ args: [--ignore-missing-imports, --no-site-packages] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.275 + rev: v0.1.3 hooks: - id: ruff diff --git a/environment-dev.yml b/environment-dev.yml index 77f32c412c0..e9f459aa2f4 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -29,5 +29,5 @@ dependencies: - parameterized==0.9.* - pyinstaller==6.1.* - sarepy=2020.07 # For building old docs - - ruff=0.0.275 + - ruff=0.1.3 - pre-commit==3.5.* diff --git a/pyproject.toml b/pyproject.toml index 6e35297e0f5..8c497776919 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,3 +3,4 @@ select = ["E", "W", "F", "B", "FA", "C4"] fixable = [] line-length = 120 +target-version = "py310" From c2ec51ae22d846f054722a07c22022c1b7de7acd Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Tue, 31 Oct 2023 14:19:06 +0000 Subject: [PATCH 14/14] Release notes --- docs/release_notes/next/dev-1960-update-tools | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/release_notes/next/dev-1960-update-tools diff --git a/docs/release_notes/next/dev-1960-update-tools b/docs/release_notes/next/dev-1960-update-tools new file mode 100644 index 00000000000..f0dd0a57433 --- /dev/null +++ b/docs/release_notes/next/dev-1960-update-tools @@ -0,0 +1 @@ +#1960 : Update developer tools