From f58f235fda9f301c53ccc4d52562bd1bbdb151f1 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 1 Oct 2023 10:35:28 -0600 Subject: [PATCH 01/17] Update setup.cfg Better email, updated classifiers for Python versions --- setup.cfg | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setup.cfg b/setup.cfg index fea4b50..111b070 100644 --- a/setup.cfg +++ b/setup.cfg @@ -10,7 +10,7 @@ license = MIT License license_file = LICENSE.txt platforms = any author = Brian Skinn -author_email = bskinn@alum.mit.edu +author_email = brian.skinn@gmail.com classifiers = License :: OSI Approved License :: OSI Approved :: MIT License @@ -21,12 +21,11 @@ classifiers = Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 Topic :: Software Development :: Quality Assurance Development Status :: 5 - Production/Stable keywords = flake8-plugin, linting, absolute-imports, relative-imports @@ -35,7 +34,7 @@ keywords = flake8-plugin, linting, absolute-imports, relative-imports install_requires = flake8>=3.7 -python_requires = >=3.4 +python_requires = >=3.6 packages = find: package_dir = =src From 1f2354ae97f9aca615b9a47a10af3a85c3d06b82 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 1 Oct 2023 10:51:26 -0600 Subject: [PATCH 02/17] Update tox testing matrix & doc of supported versions setup.cfg and README Also update README copyright --- README.rst | 4 ++-- setup.cfg | 2 +- tox.ini | 12 +++++------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/README.rst b/README.rst index 4baf27e..393e0a4 100644 --- a/README.rst +++ b/README.rst @@ -49,13 +49,13 @@ Relative imports raise the ``ABS101`` error code: Available on `PyPI `__ (``pip install flake8-absolute-import``). ``flake8`` should automatically -detect and load the plugin. ``flake8``>=3.7 is required. +detect and load the plugin. ``flake8``>=5.0 is required. Source on `GitHub `__. Bug reports and feature requests are welcomed at the `Issues `__ page there. -Copyright (c) Brian Skinn 2019-2021 +Copyright (c) Brian Skinn 2019-2023 License: The MIT License. See `LICENSE.txt `__ for full license terms. diff --git a/setup.cfg b/setup.cfg index 111b070..fc65da9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,7 +32,7 @@ keywords = flake8-plugin, linting, absolute-imports, relative-imports [options] install_requires = - flake8>=3.7 + flake8>=5.0 python_requires = >=3.6 packages = find: diff --git a/tox.ini b/tox.ini index 88d37aa..21e7494 100644 --- a/tox.ini +++ b/tox.ini @@ -2,8 +2,8 @@ minversion=2.0 isolated_build=True envlist= - py3{6,7,8,9,10,11}-f8_{3_7_0,latest} - py3{10}-f8_3_{7_x,8_x,9_x} + py3{7,8,9,10,11,12}-f8_{min,latest} + py3{11,12}-f8_{5_x} sdist_install [testenv] @@ -15,20 +15,18 @@ deps= pytest f8_latest: flake8 - f8_3_7_x: flake8~=3.7.0 - f8_3_7_0: flake8==3.7.0 - f8_3_8_x: flake8~=3.8.0 - f8_3_9_x: flake8~=3.9.0 + f8_min: flake8==5.0 + f8_5_x: flake8~=5.0 [testenv:linux] platform=linux basepython= + py312: python3.12 py311: python3.11 py310: python3.10 py39: python3.9 py38: python3.8 py37: python3.7 - py36: python3.6 [testenv:sdist_install] commands= From f767046e1a13e7e5ce2601e6d90f22020e3c4628 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 1 Oct 2023 10:56:08 -0600 Subject: [PATCH 03/17] Update CI config for new Python versions --- .github/workflows/ci_tests.yml | 10 +++++----- azure-pipelines.yml | 13 ++++++------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 805ec67..d2df0fe 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -4,9 +4,9 @@ on: push jobs: all_checks: - name: Run all tests, lints, etc. (Python 3.10) + name: Run all tests, lints, etc. (Python 3.12) runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, '[skip ci]')" + if: '!contains(github.event.head_commit.message, "[skip ci]")' steps: - name: Check out repo @@ -15,7 +15,7 @@ jobs: - name: Install Python uses: actions/setup-python@v2 with: - python-version: '3.10' + python-version: '3.12' - name: Update pip & setuptools run: python -m pip install -U pip setuptools @@ -43,8 +43,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ['3.6', '3.7', '3.8', '3.9'] - if: "!contains(github.event.head_commit.message, '[skip ci]')" + python: ['3.8', '3.9', '3.10', '3.11', '3.12'] + if: '!contains(github.event.head_commit.message, "[skip ci]")' steps: - name: Check out repo diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9aae50a..fed42c1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,14 +12,16 @@ jobs: - template: azure-coretest.yml parameters: pythons: - py37: - spec: '3.7' py38: spec: '3.8' py39: spec: '3.9' py310: spec: '3.10' + py311: + spec: '3.11' + py312: + spec: '3.12' platforms: [linux, windows, macOs] - job: flake8 @@ -28,14 +30,11 @@ jobs: steps: - task: UsePythonVersion@0 inputs: - versionSpec: '3.10' + versionSpec: '3.12' - script: pip install -U tox displayName: Install tox - - script: pip install -r requirements-flake8.txt - displayName: Install flake8 & plugins - - script: tox -e flake8 displayName: Lint the codebase @@ -45,7 +44,7 @@ jobs: steps: - task: UsePythonVersion@0 inputs: - versionSpec: '3.10' + versionSpec: '3.12' - script: pip install -r requirements-ci.txt displayName: Install CI requirements From a946dd3dc785fef793145f08e1c47a43363a451b Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 1 Oct 2023 10:58:08 -0600 Subject: [PATCH 04/17] Revert VS Code recommended string quoting reformat --- .github/workflows/ci_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index d2df0fe..9a878f3 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -6,7 +6,7 @@ jobs: all_checks: name: Run all tests, lints, etc. (Python 3.12) runs-on: ubuntu-latest - if: '!contains(github.event.head_commit.message, "[skip ci]")' + if: "!contains(github.event.head_commit.message, '[skip ci]')" steps: - name: Check out repo @@ -44,7 +44,7 @@ jobs: strategy: matrix: python: ['3.8', '3.9', '3.10', '3.11', '3.12'] - if: '!contains(github.event.head_commit.message, "[skip ci]")' + if: "!contains(github.event.head_commit.message, '[skip ci]')" steps: - name: Check out repo From f599a9a5135897ae156e1fc4fd326ac313c38f5f Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 1 Oct 2023 11:00:29 -0600 Subject: [PATCH 05/17] Switch to 3.12 rc Python --- .github/workflows/ci_tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 9a878f3..9e0848c 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -4,7 +4,7 @@ on: push jobs: all_checks: - name: Run all tests, lints, etc. (Python 3.12) + name: Run all tests, lints, etc. (Python 3.11) runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, '[skip ci]')" @@ -15,7 +15,7 @@ jobs: - name: Install Python uses: actions/setup-python@v2 with: - python-version: '3.12' + python-version: '3.11' - name: Update pip & setuptools run: python -m pip install -U pip setuptools @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python: ['3.8', '3.9', '3.10', '3.11', '3.12.0-rc3'] if: "!contains(github.event.head_commit.message, '[skip ci]')" steps: From 04c84eb97dcfec5792e2448ff55ae3f645d8617b Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 1 Oct 2023 11:01:50 -0600 Subject: [PATCH 06/17] Add curious period to version Why?? --- .github/workflows/ci_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 9e0848c..aea1cdf 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ['3.8', '3.9', '3.10', '3.11', '3.12.0-rc3'] + python: ['3.8', '3.9', '3.10', '3.11', '3.12.0-rc.3'] if: "!contains(github.event.head_commit.message, '[skip ci]')" steps: From 618fb9ee6025ad0a9987a5af4c5218b411f512f9 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 1 Oct 2023 11:07:30 -0600 Subject: [PATCH 07/17] Remove 3.12 from Azure Pipelines --- azure-pipelines.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fed42c1..fe49a6e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,8 +20,6 @@ jobs: spec: '3.10' py311: spec: '3.11' - py312: - spec: '3.12' platforms: [linux, windows, macOs] - job: flake8 @@ -30,7 +28,7 @@ jobs: steps: - task: UsePythonVersion@0 inputs: - versionSpec: '3.12' + versionSpec: '3.11' - script: pip install -U tox displayName: Install tox @@ -44,7 +42,7 @@ jobs: steps: - task: UsePythonVersion@0 inputs: - versionSpec: '3.12' + versionSpec: '3.11' - script: pip install -r requirements-ci.txt displayName: Install CI requirements From 68c70ca3aa3bf8010b3e3d615274a26dd5fb937a Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 1 Oct 2023 11:36:06 -0600 Subject: [PATCH 08/17] Fix pyproject.toml and remove setup.cfg --- pyproject.toml | 90 +++++++++++++++++++++++++++++++++++++++----------- setup.cfg | 47 -------------------------- 2 files changed, 71 insertions(+), 66 deletions(-) delete mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml index e28a124..8c84316 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,22 +1,74 @@ [build-system] -requires = ["wheel", "setuptools"] +requires = [ + "setuptools>=61.2", +] build-backend = "setuptools.build_meta" -[tool.black] -line-length = 88 -include = ''' -( - ^/tests/.*[.]py$ - | ^/src/flake8_absolute_import/.*[.]py$ - | ^/setup[.]py - | ^/conftest[.]py -) -''' -exclude = ''' -( - __pycache__ - | ^/[.] - | ^/doc - | ^/env -) -''' +[project] +name = "flake8-absolute-import" +description = "flake8 plugin to require absolute imports" +authors = [ + { name = "Brian Skinn", email = "brian.skinn@gmail.com" }, +] +classifiers = [ + "License :: OSI Approved", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Framework :: Flake8", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Software Development :: Quality Assurance", + "Development Status :: 5 - Production/Stable", +] +keywords = [ + "flake8-plugin", + "linting", + "absolute-imports", + "relative-imports", +] +requires-python = ">=3.6" +dependencies = [ + "flake8>=5.0", +] +dynamic = [ + "version", + "readme", +] + +[project.urls] +Homepage = "https://github.com/bskinn/flake8-absolute-import" +Changelog = "https://github.com/bskinn/flake8-absolute-import/blob/main/CHANGELOG.md" +Thank = "https://twitter.com/btskinn" +Donate = "https://github.com/sponsors/bskinn" + +[project.license] +text = "MIT License" + +[project.entry-points."flake8.extension"] +ABS1 = "flake8_absolute_import:Plugin" + +[tool.setuptools] +platforms = [ + "any", +] +license-files = [ + "LICENSE.txt", +] +include-package-data = false + +[tool.setuptools.package-dir] +"" = "src" + +[tool.setuptools.packages.find] +where = [ + "src", +] +namespaces = false diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index fc65da9..0000000 --- a/setup.cfg +++ /dev/null @@ -1,47 +0,0 @@ -[metadata] -name = flake8-absolute-import -description = flake8 plugin to require absolute imports -url = https://github.com/bskinn/flake8-absolute-import -project_urls = - Changelog=https://github.com/bskinn/flake8-absolute-import/blob/main/CHANGELOG.md - Thank=https://twitter.com/btskinn - Donate=https://github.com/sponsors/bskinn -license = MIT License -license_file = LICENSE.txt -platforms = any -author = Brian Skinn -author_email = brian.skinn@gmail.com -classifiers = - License :: OSI Approved - License :: OSI Approved :: MIT License - Natural Language :: English - Framework :: Flake8 - Intended Audience :: Developers - Operating System :: OS Independent - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Programming Language :: Python :: 3.12 - Topic :: Software Development :: Quality Assurance - Development Status :: 5 - Production/Stable -keywords = flake8-plugin, linting, absolute-imports, relative-imports - -[options] -install_requires = - flake8>=5.0 - -python_requires = >=3.6 -packages = find: -package_dir = - =src - -[options.packages.find] -where = src - -[options.entry_points] -flake8.extension = - ABS1=flake8_absolute_import:Plugin From 9a89d6ac827d78880cb5924349aecadcc6dc8dc0 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 1 Oct 2023 11:38:11 -0600 Subject: [PATCH 09/17] Modernize setup.py - Explicit set of __version__ - Path(...).read_text() instead of open() - Refactor str.format() to f-strings --- setup.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/setup.py b/setup.py index 2d91920..ed30809 100644 --- a/setup.py +++ b/setup.py @@ -3,18 +3,19 @@ from setuptools import find_packages, setup -with Path("src", "flake8_absolute_import", "version.py").open() as f: - exec(f.read()) +exec_ns = {} +exec( + Path("src", "flake8_absolute_import", "version.py").read_text(encoding="utf-8"), + exec_ns, +) +__version__ = exec_ns["__version__"] NAME = "flake8-absolute-import" - - version_override = None def readme(): - with open("README.rst", "r") as f: - content = f.read() + content = Path("README.rst").read_text() new_ver = version_override if version_override else __version__ @@ -25,19 +26,18 @@ def content_update(content, pattern, sub): # Docs reference updates to current release version, for PyPI # This one gets the badge image content = content_update( - content, r"(?<=/readthedocs/{0}/)\S+?(?=\.svg$)".format(NAME), "v" + new_ver + content, rf"(?<=/readthedocs/{NAME}/)\S+?(?=\.svg$)", "v" + new_ver ) # This one gets the RtD links content = content_update( - content, r"(?<={0}\.readthedocs\.io/en/)\S+?(?=/)".format(NAME), "v" + new_ver + content, rf"(?<={NAME}\.readthedocs\.io/en/)\S+?(?=/)", "v" + new_ver ) return content setup( - name=NAME, version=__version__, long_description=readme(), long_description_content_type="text/x-rst", From 186708882e1426f173b3f7aae9421117eead87f1 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 1 Oct 2023 11:50:16 -0600 Subject: [PATCH 10/17] Restore accidentally obliterated pyproject bits Overwrote instead of dumping to a new, test file. :-( --- pyproject.toml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 8c84316..d19ef3b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,6 @@ [build-system] requires = [ + "wheel", "setuptools>=61.2", ] build-backend = "setuptools.build_meta" @@ -72,3 +73,22 @@ where = [ "src", ] namespaces = false + +[tool.black] +line-length = 88 +include = ''' +( + ^tests/.*[.]py$ + | ^src/flake8_absolute_import/.*[.]py$ + | ^setup[.]py + | ^conftest[.]py +) +''' +exclude = ''' +( + __pycache__ + | ^[.] + | ^doc + | ^env +) +''' From b781b272d054e840d8f4cfafdbd8303839a1831d Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 1 Oct 2023 11:51:50 -0600 Subject: [PATCH 11/17] Refactor test code to improve some names --- tests/test_plugin.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_plugin.py b/tests/test_plugin.py index a206235..5809016 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -29,14 +29,14 @@ from flake8_absolute_import import Plugin -def is_relative(s): - """Indicate if a given 'from s' import location is a relative import.""" - return s.startswith(".") +def is_relative(import_source): + """Indicate if a given 'from {source}' import location is a relative import.""" + return import_source.startswith(".") -def format_id(i): +def format_id(id_): """Provide parametrization id formatting for the given id.""" - return "{0} (expect {1}error)".format(i, "" if is_relative(i) else "no ") + return f"{id_} (expect {'' if is_relative(id_) else 'no '}error)" @pytest.mark.parametrize("code", ["import sys", "import flake8_absolute_import"]) From 0e423a5146ac63401a81c3611a56da24185246db Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 1 Oct 2023 11:52:16 -0600 Subject: [PATCH 12/17] Refactor .format()s to f-strings in test module --- tests/test_plugin.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/test_plugin.py b/tests/test_plugin.py index 5809016..4db5ca4 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -106,11 +106,11 @@ def test_multilevel_relative_import(): def test_func_imports(impfrom): """Confirm plugin works for imports in functions.""" code = dedent( - """ + f""" def func(): - from {} import foo + from {impfrom} import foo """ - ).format(impfrom) + ) tree = ast.parse(code) assert (len(list(Plugin(tree).run())) == 1) == (impfrom.startswith(".")) @@ -120,11 +120,11 @@ def func(): def test_class_imports(impfrom): """Confirm plugin works for imports in class bodies.""" code = dedent( - """ + f""" class Bar: - from {} import foo + from {impfrom} import foo """ - ).format(impfrom) + ) tree = ast.parse(code) assert (len(list(Plugin(tree).run())) == 1) == (impfrom.startswith(".")) @@ -134,12 +134,12 @@ class Bar: def test_method_imports(impfrom): """Confirm plugin works for imports in class methods.""" code = dedent( - """ + f""" class Bar: def baz(self): - from {} import foo + from {impfrom} import foo """ - ).format(impfrom) + ) tree = ast.parse(code) assert (len(list(Plugin(tree).run())) == 1) == (impfrom.startswith(".")) From 7d2bfa51d3132986536c6ca57a849e6a7286827b Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 1 Oct 2023 17:58:23 -0600 Subject: [PATCH 13/17] Add CI for testable sdist & augment MANIFEST.in --- MANIFEST.in | 3 +- azure-pipelines.yml | 2 ++ azure-sdisttest.yml | 73 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 azure-sdisttest.yml diff --git a/MANIFEST.in b/MANIFEST.in index de0a14a..8606d0b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1,2 @@ -include LICENSE.txt README.rst CHANGELOG.md pyproject.toml +include AUTHORS.md LICENSE.txt README.rst CHANGELOG.md pyproject.toml +include requirements-dev.txt requirements-flake8.txt tox.ini diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fe49a6e..9b65f92 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,6 +22,8 @@ jobs: spec: '3.11' platforms: [linux, windows, macOs] +- template: azure-sdisttest.yml + - job: flake8 pool: vmImage: 'Ubuntu-latest' diff --git a/azure-sdisttest.yml b/azure-sdisttest.yml new file mode 100644 index 0000000..422881b --- /dev/null +++ b/azure-sdisttest.yml @@ -0,0 +1,73 @@ +jobs: +- job: testable_sdist + displayName: Ensure sdist is testable + + variables: + pip_cache_dir: $(Pipeline.Workspace)/.pip + + pool: + vmImage: 'Ubuntu-latest' + + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.10' + + - task: Cache@2 + inputs: + key: 'pip | "$(Agent.OS)" | requirements-dev.txt | requirements-flake8.txt' + restoreKeys: | + pip | "$(Agent.OS)" + path: $(pip_cache_dir) + displayName: Cache pip + + - script: python -m pip install build + displayName: Install 'build' package + + - script: | + python -m build -s + ls -lah dist + displayName: Build sdist + + - script: | + mkdir sandbox + displayName: Create sandbox + + - script: | + cp dist/*.gz sandbox/ + cd sandbox + tar xvf *.gz + displayName: Unpack sdist in sandbox + + - script: | + cd sandbox + python -m venv env + displayName: Create venv + + # Only the dir of the unpacked sdist will have a digit in its name + - script: | + cd sandbox + echo $( find . -maxdepth 1 -type d -regex "./.+[0-9].+" ) + displayName: Check unpack dir name + + - script: | + cd sandbox + source env/bin/activate + cd $( find . -maxdepth 1 -type d -regex "./.+[0-9].+" ) + python -m pip install -r requirements-dev.txt + displayName: Install dev req'ts to venv + + - script: | + cd sandbox + source env/bin/activate + cd $( find . -maxdepth 1 -type d -regex "./.+[0-9].+" ) + cd doc + O=-Ean make html + displayName: Build docs in sandbox + + - script: | + cd sandbox + source env/bin/activate + cd $( find . -maxdepth 1 -type d -regex "./.+[0-9].+" ) + pytest --nonloc + displayName: Run test suite in sandbox From 62ee1b367cfbb6ada4b63323464e55c4a0c5c197 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 1 Oct 2023 18:02:15 -0600 Subject: [PATCH 14/17] Skip docs build in sdist test since there are none --- azure-sdisttest.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-sdisttest.yml b/azure-sdisttest.yml index 422881b..af5e8b9 100644 --- a/azure-sdisttest.yml +++ b/azure-sdisttest.yml @@ -63,7 +63,8 @@ jobs: cd $( find . -maxdepth 1 -type d -regex "./.+[0-9].+" ) cd doc O=-Ean make html - displayName: Build docs in sandbox + displayName: Build docs in sandbox (skipped, no docs) + if: false - script: | cd sandbox From bedfc8cfbed365842183b551344e038da462621a Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 1 Oct 2023 18:08:31 -0600 Subject: [PATCH 15/17] Fix Azure syntax --- azure-sdisttest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-sdisttest.yml b/azure-sdisttest.yml index af5e8b9..d25dddf 100644 --- a/azure-sdisttest.yml +++ b/azure-sdisttest.yml @@ -64,7 +64,7 @@ jobs: cd doc O=-Ean make html displayName: Build docs in sandbox (skipped, no docs) - if: false + condition: false - script: | cd sandbox From 8b36d8822e2ed54480fb156313227a69deb89458 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 1 Oct 2023 18:12:24 -0600 Subject: [PATCH 16/17] Remove leftover sphobjinv test flag --- azure-sdisttest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-sdisttest.yml b/azure-sdisttest.yml index d25dddf..933fe90 100644 --- a/azure-sdisttest.yml +++ b/azure-sdisttest.yml @@ -70,5 +70,5 @@ jobs: cd sandbox source env/bin/activate cd $( find . -maxdepth 1 -type d -regex "./.+[0-9].+" ) - pytest --nonloc + pytest displayName: Run test suite in sandbox From 6dcd348e698e7bf8d0e317e7ff235a7e91c3fb56 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 8 Oct 2023 11:44:29 -0400 Subject: [PATCH 17/17] Add trial bumps to unqualified Python 3.12 --- .github/workflows/ci_tests.yml | 3 +-- azure-pipelines.yml | 2 ++ azure-sdisttest.yml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index aea1cdf..d0593d4 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ['3.8', '3.9', '3.10', '3.11', '3.12.0-rc.3'] + python: ['3.8', '3.9', '3.10', '3.11', '3.12'] if: "!contains(github.event.head_commit.message, '[skip ci]')" steps: @@ -68,4 +68,3 @@ jobs: run: | pytest --cov tox -e sdist_install - \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9b65f92..910ca23 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,6 +20,8 @@ jobs: spec: '3.10' py311: spec: '3.11' + py312: + spec: '3.12' platforms: [linux, windows, macOs] - template: azure-sdisttest.yml diff --git a/azure-sdisttest.yml b/azure-sdisttest.yml index 933fe90..9f7e2a3 100644 --- a/azure-sdisttest.yml +++ b/azure-sdisttest.yml @@ -11,7 +11,7 @@ jobs: steps: - task: UsePythonVersion@0 inputs: - versionSpec: '3.10' + versionSpec: '3.11' - task: Cache@2 inputs: