From f8b4d14777453f6f091b3cbf53d22ada0e4e5ed9 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Mon, 25 Mar 2024 11:28:25 -0600 Subject: [PATCH 1/7] Add changelog to dynamic readme --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3ec996a..a547a86 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ testing = [ nbgitpuller-link = "nbgitpuller_link.cli:main" [tool.setuptools.dynamic] -readme = {file = ["README.md", "LICENSE.md"], content-type = "text/markdown"} +readme = {file = ["README.md", "CHANGES.md", "LICENSE.md"], content-type = "text/markdown"} version = {attr = "nbgitpuller_link._version.__version__"} [tool.setuptools.packages.find] From d2ab3992c886254fe968f4b828e53f316bb41df8 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Mon, 25 Mar 2024 11:29:03 -0600 Subject: [PATCH 2/7] Remove duplicate items from manifest --- MANIFEST.in | 2 -- 1 file changed, 2 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index da89b99..91d1469 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,4 @@ -include *.md include *.cff include environment.yml include noxfile.py include examples/* -include tests/* From e3e27d441c685530c14838e9ca18e9e5769db8f3 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Mon, 25 Mar 2024 11:38:25 -0600 Subject: [PATCH 3/7] Fix incorrectly formatted headings in changelog --- CHANGES.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a1f9e5b..2f06bf1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,13 +1,13 @@ Changes: nbgitpuller-link ========================= -## 0.2.5 (unreleased) ---------------------- +0.2.5 (unreleased) +------------------ - Nothing changed yet. -## 0.2.4 (2023-01-11) +0.2.4 (2023-01-11) ------------------ - Use nox for build system management (#13) From 1033d8568499f51fc69269fb897b5d050253ea28 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Mon, 25 Mar 2024 11:41:21 -0600 Subject: [PATCH 4/7] Move coverage and zest.releaser config to pyproject.toml --- pyproject.toml | 7 +++++++ setup.cfg | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a547a86..578d91d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -94,3 +94,10 @@ include_trailing_comma = true force_grid_wrap = 0 combine_as_imports = true line_length = 88 + +[tool.coverage.run] +relative_files = true + +[tool.zest-releaser] +tag-format = "v{version}" +python-file-with-version = "nbgitpuller_link/_version.py" diff --git a/setup.cfg b/setup.cfg index 107622d..f3d7d5c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,3 @@ -[coverage:run] -relative_files = True - [flake8] exclude = docs ignore = @@ -8,7 +5,3 @@ ignore = E501 W503 max-line-length = 88 - -[zest.releaser] -tag-format = v{version} -python-file-with-version = nbgitpuller_link/_version.py From 1952305adeb658ad77d434f806326e29625c78fc Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Mon, 25 Mar 2024 11:47:09 -0600 Subject: [PATCH 5/7] Install zest.releaser from conda --- environment.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index b2a5356..654a03e 100644 --- a/environment.yml +++ b/environment.yml @@ -17,5 +17,4 @@ dependencies: - pytest-cov - pytest-datadir - coveralls - - pip: - - zest.releaser + - zest.releaser From a2fb65f96007c883109f57f5811b5d5c5b83131e Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Mon, 25 Mar 2024 11:50:58 -0600 Subject: [PATCH 6/7] Test with Python 3.12, set minimum to 3.10 --- .github/workflows/build-test-ci.yml | 12 ++++++------ noxfile.py | 2 +- pyproject.toml | 7 +++++-- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-test-ci.yml b/.github/workflows/build-test-ci.yml index 129ed7c..3eeead4 100644 --- a/.github/workflows/build-test-ci.yml +++ b/.github/workflows/build-test-ci.yml @@ -17,10 +17,10 @@ jobs: strategy: matrix: - python-version: ["3.9", "3.10"] + python-version: ["3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 @@ -41,12 +41,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Set up Python 3.9 - uses: actions/setup-python@v2 + - name: Set up Python 3.12 + uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.12 - name: Format run: | diff --git a/noxfile.py b/noxfile.py index 2ffcc0e..2a58de9 100644 --- a/noxfile.py +++ b/noxfile.py @@ -10,7 +10,7 @@ HERE = pathlib.Path(__file__) ROOT = HERE.parent PATHS = ["nbgitpuller_link", "examples", "tests", HERE.name] -PYTHON_VERSIONS = ["3.9", "3.10", "3.11"] +PYTHON_VERSIONS = ["3.10", "3.11", "3.12"] @nox.session(python=PYTHON_VERSIONS) diff --git a/pyproject.toml b/pyproject.toml index 578d91d..c06d8f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,13 +21,16 @@ keywords = [ license = {text = "MIT License"} classifiers = [ "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "Intended Audience :: Education", ] -requires-python = ">=3.7" +requires-python = ">=3.10" dependencies = [ "click", "validators", @@ -77,7 +80,7 @@ norecursedirs = [".*", "*.egg*", "build", "dist"] addopts = """ --ignore setup.py --tb native - --strict + --strict-markers --durations 16 --doctest-modules -vvv From a4e8ccca0697bf424d8393ce2cda1e05a420b9f7 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Mon, 25 Mar 2024 12:26:51 -0600 Subject: [PATCH 7/7] Strip trailing newline in cli test output The click.testing.CliRunner.invoke method now appends a newline to the result string, making an invalid url. --- tests/test_cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index ce0c07c..cbf5e5a 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -93,7 +93,7 @@ def test_valid_result(): ["--jupyterhub-url=https://jupyter.org", "--repository-url=https://github.com"], ) assert result.exit_code == 0 - assert validators.url(result.output) + assert validators.url(result.output.rstrip("\n")) def test_optional_interface(): @@ -154,4 +154,4 @@ def test_space_in_launch_path(): ], ) assert result.exit_code == 0 - assert validators.url(result.output) + assert validators.url(result.output.rstrip("\n"))