From f52bf2c81586a17eb3be80271b3a7c2693b7a0fc Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 8 Oct 2022 19:59:40 -0500 Subject: [PATCH 01/21] use hatch envs and clean up workflows --- .github/workflows/test.yml | 80 +++++++++++--------------------------- docs/environment.yml | 13 ------- pyproject.toml | 28 +++++++++++++ readthedocs.yml | 8 ++-- 4 files changed, 55 insertions(+), 74 deletions(-) delete mode 100644 docs/environment.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0720f3b7..f16ddbdf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,6 +4,10 @@ on: branches: ["main"] pull_request: +defaults: + run: + shell: bash -l {0} + jobs: # Run "pre-commit run --all-files --hook-stage=manual" pre-commit: @@ -28,7 +32,6 @@ jobs: check-links: runs-on: ubuntu-20.04 - steps: - uses: actions/checkout@v2 - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 @@ -42,29 +45,28 @@ jobs: os: [ubuntu-latest, windows-latest, macos-latest] python-version: ["3.8", "3.10"] steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup - uses: ./.github/actions/common - - - name: Install the Test dependencies - run: | - pip install -e .[test] codecov + - uses: actions/checkout@v2 + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - name: Run the tests with coverage on Ubuntu if: ${{ matrix.os == 'ubuntu-latest' }} - run: | - python -m pytest -vv --cov jupyter_releaser --cov-branch --cov-report term-missing:skip-covered + run: hatch run cov:test - name: Run the tests on Windows and macOS if: ${{ matrix.os != 'ubuntu-latest' }} + run: hatch run test:test -s + + - name: Coverage run: | - python -m pytest -vv -s + pip install codecov + codecov - - name: Verify the Generate Changelog Action - if: ${{ matrix.os == 'ubuntu' }} - env: + generate-changelog: + runs-on: ubuntu-20.04 + timeout-minutes: 10 + steps: + - uses: actions/checkout@v2 + - env: GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} RH_REPOSITORY: jupyter-server/jupyter_releaser RH_SINCE: v0.10.2 @@ -85,55 +87,19 @@ jobs: python -m jupyter_releaser.actions.generate-changelog cat CHANGELOG_ENTRY.md - - name: Coverage - run: | - codecov - docs: runs-on: ubuntu-20.04 timeout-minutes: 10 - defaults: - run: - shell: bash -l {0} steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup - uses: ./.github/actions/common - - - name: Setup conda - uses: conda-incubator/setup-miniconda@v2 - with: - auto-update-conda: true - activate-environment: jupyter_releaser_documentation - environment-file: docs/environment.yml - python-version: "3.10" - auto-activate-base: false - - - name: Cache conda - uses: actions/cache@v2 - with: - path: ~/conda_pkgs_dir - key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ - hashFiles('docs/environment.yml') }} - - - name: Build docs - run: | - set -eux - pip install . - pushd docs - make html - popd + - uses: actions/checkout@v2 + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - run: hatch run docs:build check_local_actions: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup - uses: ./.github/actions/common + - uses: actions/checkout@v2 + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - name: prep-release uses: ./.github/actions/prep-release diff --git a/docs/environment.yml b/docs/environment.yml deleted file mode 100644 index ab3e2738..00000000 --- a/docs/environment.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: jupyter_releaser_documentation -channels: - - conda-forge -dependencies: - - python=3.10 - - sphinx - - sphinx-copybutton - - pip - - myst-parser - - pip: - - pydata_sphinx_theme - - numpydoc - - sphinx-click diff --git a/pyproject.toml b/pyproject.toml index caa3b896..442ace5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,15 @@ file = "README.md" content-type = "text/markdown" [project.optional-dependencies] +docs = [ + "sphinx", + "sphinx-copybutton", + "pip", + "myst-parser", + "pydata_sphinx_theme", + "numpydoc", + "sphinx-click", +] test = [ "coverage", "fastapi", @@ -58,6 +67,25 @@ jupyter-releaser = "jupyter_releaser.cli:main" [tool.hatch.version] path = "jupyter_releaser/__init__.py" +[tool.hatch.envs.docs] +features = ["docs"] +[tool.hatch.envs.docs.scripts] +build = "make -C docs html SPHINXOPTS='-W'" + +[tool.hatch.envs.test] +features = ["test"] +[tool.hatch.envs.test.scripts] +test = "python -m pytest -vv {args}" +nowarn = "python -m pytest -vv -W default {args}" + +[tool.hatch.envs.cov] +features = ["test"] +dependencies = ["coverage", "pytest-cov"] +[tool.hatch.envs.cov.env-vars] +ARGS = "-vv --cov jupyter_releaser --cov-branch --cov-report term-missing:skip-covered" +[tool.hatch.envs.cov.scripts] +test = "python -m pytest $ARGS --cov-fail-under 80 {args}" + [tool.jupyter-releaser.hooks] after-populate-release = "bash ./.github/scripts/bump_tag.sh" diff --git a/readthedocs.yml b/readthedocs.yml index 7b6ccd8e..3e4c9667 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -1,11 +1,11 @@ version: 2 sphinx: configuration: docs/source/conf.py -conda: - environment: docs/environment.yml python: - version: "3.8" + version: 3.8 install: - # install jupyter_releaser itself + # install itself with pip install . - method: pip path: . + extra_requirements: + - docs From ed0d53f75dfcb1d42299fc398f67bcec348be5b8 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 8 Oct 2022 20:07:48 -0500 Subject: [PATCH 02/21] remove common action --- .github/actions/common/action.yml | 11 ----------- .github/workflows/check-release.yml | 14 ++++---------- .github/workflows/generate-changelog.yml | 7 ++----- 3 files changed, 6 insertions(+), 26 deletions(-) delete mode 100644 .github/actions/common/action.yml diff --git a/.github/actions/common/action.yml b/.github/actions/common/action.yml deleted file mode 100644 index e5901f61..00000000 --- a/.github/actions/common/action.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: "Setup Releaser" -description: "Common Actions to Set up Releaser" -runs: - using: "composite" - steps: - - name: Base Setup - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - - name: Install Dependencies - shell: bash - run: | - pip install -e . diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml index 4335957d..8cdb030e 100644 --- a/.github/workflows/check-release.yml +++ b/.github/workflows/check-release.yml @@ -1,9 +1,8 @@ name: Check Release on: push: - branches: ["*"] + branches: ["main"] pull_request: - branches: ["*"] release: types: [published] schedule: @@ -13,14 +12,9 @@ jobs: check_release: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup - uses: ./.github/actions/common - - - name: Check Release - uses: ./.github/actions/check-release + - uses: actions/checkout@v2 + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - uses: ./.github/actions/check-release with: version_spec: 10.10.10 token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/generate-changelog.yml b/.github/workflows/generate-changelog.yml index 941bfc2e..5a1ed525 100644 --- a/.github/workflows/generate-changelog.yml +++ b/.github/workflows/generate-changelog.yml @@ -26,11 +26,8 @@ jobs: matrix: python-version: ["3.10"] steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup - uses: ./.github/actions/common + - uses: actions/checkout@v2 + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - name: Install the Extra Python dependencies run: | From 4bbbb7280fd9cb9c42d01722a9e90ed0444ebc06 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 8 Oct 2022 20:09:40 -0500 Subject: [PATCH 03/21] Revert "remove common action" This reverts commit ed0d53f75dfcb1d42299fc398f67bcec348be5b8. --- .github/actions/common/action.yml | 11 +++++++++++ .github/workflows/check-release.yml | 14 ++++++++++---- .github/workflows/generate-changelog.yml | 7 +++++-- 3 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 .github/actions/common/action.yml diff --git a/.github/actions/common/action.yml b/.github/actions/common/action.yml new file mode 100644 index 00000000..e5901f61 --- /dev/null +++ b/.github/actions/common/action.yml @@ -0,0 +1,11 @@ +name: "Setup Releaser" +description: "Common Actions to Set up Releaser" +runs: + using: "composite" + steps: + - name: Base Setup + uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - name: Install Dependencies + shell: bash + run: | + pip install -e . diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml index 8cdb030e..4335957d 100644 --- a/.github/workflows/check-release.yml +++ b/.github/workflows/check-release.yml @@ -1,8 +1,9 @@ name: Check Release on: push: - branches: ["main"] + branches: ["*"] pull_request: + branches: ["*"] release: types: [published] schedule: @@ -12,9 +13,14 @@ jobs: check_release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - - uses: ./.github/actions/check-release + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup + uses: ./.github/actions/common + + - name: Check Release + uses: ./.github/actions/check-release with: version_spec: 10.10.10 token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/generate-changelog.yml b/.github/workflows/generate-changelog.yml index 5a1ed525..941bfc2e 100644 --- a/.github/workflows/generate-changelog.yml +++ b/.github/workflows/generate-changelog.yml @@ -26,8 +26,11 @@ jobs: matrix: python-version: ["3.10"] steps: - - uses: actions/checkout@v2 - - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup + uses: ./.github/actions/common - name: Install the Extra Python dependencies run: | From 6a1f77339849c4d4004f6f3eaf8bfaf46fd0d9ea Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 8 Oct 2022 20:11:54 -0500 Subject: [PATCH 04/21] cleanup --- .github/workflows/prep-release.yml | 7 ++++++- .github/workflows/publish-release.yml | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prep-release.yml b/.github/workflows/prep-release.yml index 47e64937..1046b3a0 100644 --- a/.github/workflows/prep-release.yml +++ b/.github/workflows/prep-release.yml @@ -26,7 +26,12 @@ jobs: prep_release: runs-on: ubuntu-latest steps: - - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup + uses: jupyter-server/jupyter_releaser/.github/actions/common@v2 + - name: Prep Release id: prep-release uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2 diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 7ef1aa67..d5a296b9 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -19,7 +19,12 @@ jobs: publish_release: runs-on: ubuntu-latest steps: - - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup + uses: jupyter-server/jupyter_releaser/.github/actions/common@v2 + - name: Populate Release id: populate-release uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2 From c7e502cbfcd29bb5e09929124cd3b0d102dda4ed Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 8 Oct 2022 20:15:15 -0500 Subject: [PATCH 05/21] remove use of common action --- .github/actions/common/action.yml | 11 ----------- .github/workflows/check-release.yml | 12 ++++++------ .github/workflows/generate-changelog.yml | 11 ++++++----- .github/workflows/prep-release.yml | 12 ++++++------ .github/workflows/publish-release.yml | 12 ++++++------ .github/workflows/test.yml | 2 ++ 6 files changed, 26 insertions(+), 34 deletions(-) delete mode 100644 .github/actions/common/action.yml diff --git a/.github/actions/common/action.yml b/.github/actions/common/action.yml deleted file mode 100644 index e5901f61..00000000 --- a/.github/actions/common/action.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: "Setup Releaser" -description: "Common Actions to Set up Releaser" -runs: - using: "composite" - steps: - - name: Base Setup - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - - name: Install Dependencies - shell: bash - run: | - pip install -e . diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml index 4335957d..878b0da1 100644 --- a/.github/workflows/check-release.yml +++ b/.github/workflows/check-release.yml @@ -13,12 +13,12 @@ jobs: check_release: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup - uses: ./.github/actions/common - + - uses: actions/checkout@v2 + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - name: Install Dependencies + shell: bash + run: | + pip install -e . - name: Check Release uses: ./.github/actions/check-release with: diff --git a/.github/workflows/generate-changelog.yml b/.github/workflows/generate-changelog.yml index 941bfc2e..18a21013 100644 --- a/.github/workflows/generate-changelog.yml +++ b/.github/workflows/generate-changelog.yml @@ -26,11 +26,12 @@ jobs: matrix: python-version: ["3.10"] steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup - uses: ./.github/actions/common + - uses: actions/checkout@v2 + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - name: Install Dependencies + shell: bash + run: | + pip install -e . - name: Install the Extra Python dependencies run: | diff --git a/.github/workflows/prep-release.yml b/.github/workflows/prep-release.yml index 1046b3a0..3fbb2c26 100644 --- a/.github/workflows/prep-release.yml +++ b/.github/workflows/prep-release.yml @@ -26,12 +26,12 @@ jobs: prep_release: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup - uses: jupyter-server/jupyter_releaser/.github/actions/common@v2 - + - uses: actions/checkout@v2 + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - name: Install Dependencies + shell: bash + run: | + pip install -e . - name: Prep Release id: prep-release uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2 diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index d5a296b9..7ac0b832 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -19,12 +19,12 @@ jobs: publish_release: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup - uses: jupyter-server/jupyter_releaser/.github/actions/common@v2 - + - uses: actions/checkout@v2 + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - name: Install Dependencies + shell: bash + run: | + pip install -e . - name: Populate Release id: populate-release uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f16ddbdf..73d4e789 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -66,6 +66,7 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v2 + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - env: GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} RH_REPOSITORY: jupyter-server/jupyter_releaser @@ -73,6 +74,7 @@ jobs: RH_UNTIL: v0.10.3 run: | set -eux + pip install -e . python -m jupyter_releaser.actions.generate-changelog cat CHANGELOG_ENTRY.md # Check for version entry contents From c8889c32157f504bf782c706a70e6344df67b800 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 8 Oct 2022 20:16:02 -0500 Subject: [PATCH 06/21] more cleanup --- .github/workflows/generate-changelog.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/generate-changelog.yml b/.github/workflows/generate-changelog.yml index 18a21013..c0eab04a 100644 --- a/.github/workflows/generate-changelog.yml +++ b/.github/workflows/generate-changelog.yml @@ -30,13 +30,10 @@ jobs: - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - name: Install Dependencies shell: bash - run: | - pip install -e . - - - name: Install the Extra Python dependencies run: | sudo apt-get install pandoc - pip install pypandoc + pip install -e . + pip install pandoc - name: Generate the Changelog env: From fc2f482d82a459e510ade36f0c8d7bdee90461b2 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 8 Oct 2022 20:29:27 -0500 Subject: [PATCH 07/21] try again --- .github/workflows/test.yml | 8 ++++---- docs/source/background/theory.md | 2 +- docs/source/how_to_guides/convert_repo_from_releaser.md | 4 ++-- docs/source/how_to_guides/convert_repo_from_repo.md | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 73d4e789..d7643d91 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,12 +48,12 @@ jobs: - uses: actions/checkout@v2 - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - - name: Run the tests with coverage on Ubuntu - if: ${{ matrix.os == 'ubuntu-latest' }} + - name: Run the tests with coverage on Ubuntu and MacOS + if: ${{ matrix.os == 'windows-latest' }} run: hatch run cov:test - - name: Run the tests on Windows and macOS - if: ${{ matrix.os != 'ubuntu-latest' }} + - name: Run the tests on Windows + if: ${{ matrix.os == 'windows-latest' }} run: hatch run test:test -s - name: Coverage diff --git a/docs/source/background/theory.md b/docs/source/background/theory.md index 6894307b..2d7de378 100644 --- a/docs/source/background/theory.md +++ b/docs/source/background/theory.md @@ -48,7 +48,7 @@ Detailed workflows are available to draft a changelog, draft a release, publish - Adds a commit that includes the hashes of the dist files - Creates an annotated version tag in standard format - If given, bumps the version using the post version spec. he post version - spec can also be given as a setting, [Write Releaser Config Guide](../how_to_guides/write_config.html#automatic-dev-versions). + spec can also be given as a setting, [Write Releaser Config Guide](../how_to_guides/write_config). - Verifies that the SHA of the most recent commit has not changed on the target branch, preventing a mismatch of release commit. - Pushes the commits and tag to the target `branch` diff --git a/docs/source/how_to_guides/convert_repo_from_releaser.md b/docs/source/how_to_guides/convert_repo_from_releaser.md index 62774f7e..90f34ef5 100644 --- a/docs/source/how_to_guides/convert_repo_from_releaser.md +++ b/docs/source/how_to_guides/convert_repo_from_releaser.md @@ -4,7 +4,7 @@ Follow the steps below to convert a repository to use Jupyter Releaser for relea ## Prerequisites -See [checklist](#Checklist-for-Adoption) below for details: +See checklist below for details: - Markdown changelog - Bump version configuration (if using Python), for example [tbump](https://github.com/dmerejkowsky/tbump) @@ -94,7 +94,7 @@ _Note_ The check release action needs `contents: write` [permission](https://doc - [ ] Set up a fork of `jupyter-releaser` if you have not yet done so. - [ ] Run through the release process, targeting this repo and the appropriate branch -- [ ] Optionally add [configuration](#Configuration) to the target repository if non-standard options or hooks are needed. +- [ ] Optionally add configuration to the target repository if non-standard options or hooks are needed. - [ ] If desired, add `check_release` job, changelog, and `tbump` support to other active release branches - [ ] Try out the `Draft Changelog` and `Draft Release` process against a fork of the target repo first so you don't accidentally push tags and GitHub releases to the source repository. - [ ] Try the `Publish Release` process using a prerelease version before publishing a final version. diff --git a/docs/source/how_to_guides/convert_repo_from_repo.md b/docs/source/how_to_guides/convert_repo_from_repo.md index a5e7b3d8..e95b35df 100644 --- a/docs/source/how_to_guides/convert_repo_from_repo.md +++ b/docs/source/how_to_guides/convert_repo_from_repo.md @@ -4,7 +4,7 @@ Follow the steps below to convert a repository to use Jupyter Releaser for relea ## Prerequisites -See [checklist](#Checklist-for-Adoption) below for details: +See [hecklist below for details: - Markdown changelog - Bump version configuration (if using Python), for example [hatch](https://hatch.pypa.io/latest/) @@ -76,7 +76,7 @@ _Note_ The check release action needs `contents: write` [permission](https://doc - [ ] Copy `prep-release.yml` and `publish-release.yml` from the `example-workflows` folder in this repository. -- [ ] Optionally add [configuration](#Configuration) to the repository if non-standard options or hooks are needed. +- [ ] Optionally add configuration to the repository if non-standard options or hooks are needed. - [ ] If desired, add `check_release` job, changelog, and `hatch` support to other active release branches From f762e97a189b7ff52e6e2eff01e0c8e9cf8c8cec Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 8 Oct 2022 20:30:44 -0500 Subject: [PATCH 08/21] try again --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d7643d91..6003d502 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,7 +49,7 @@ jobs: - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - name: Run the tests with coverage on Ubuntu and MacOS - if: ${{ matrix.os == 'windows-latest' }} + if: ${{ matrix.os != 'windows-latest' }} run: hatch run cov:test - name: Run the tests on Windows From 601b809ffc59d7c3daa2c2931cd77056fc5f10f7 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 8 Oct 2022 20:34:45 -0500 Subject: [PATCH 09/21] try older hatch --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6003d502..1c8ff0b7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,7 +50,9 @@ jobs: - name: Run the tests with coverage on Ubuntu and MacOS if: ${{ matrix.os != 'windows-latest' }} - run: hatch run cov:test + run: | + pip install hatch<1.6 + hatch run cov:test - name: Run the tests on Windows if: ${{ matrix.os == 'windows-latest' }} From f640f5d7f293ab20492641a48f01cc59ff4e15aa Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 8 Oct 2022 20:38:21 -0500 Subject: [PATCH 10/21] try again --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1c8ff0b7..6041b685 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,7 +51,7 @@ jobs: - name: Run the tests with coverage on Ubuntu and MacOS if: ${{ matrix.os != 'windows-latest' }} run: | - pip install hatch<1.6 + pip install "hatch<1.16" hatch run cov:test - name: Run the tests on Windows From e5556c6e26ef50727cf3de57ab086796b122da2e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 8 Oct 2022 20:45:23 -0500 Subject: [PATCH 11/21] try again --- .github/workflows/test.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6041b685..b490fb12 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,15 +48,14 @@ jobs: - uses: actions/checkout@v2 - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - - name: Run the tests with coverage on Ubuntu and MacOS - if: ${{ matrix.os != 'windows-latest' }} + - name: Run the tests with coverage on Ubuntu + if: ${{ matrix.os == 'ubuntu-latest' }} run: | - pip install "hatch<1.16" hatch run cov:test - - name: Run the tests on Windows - if: ${{ matrix.os == 'windows-latest' }} - run: hatch run test:test -s + - name: Run the tests on Windows and MacOS + if: ${{ matrix.os != 'ubuntu-latest' }} + run: python -m pytest -vv -s - name: Coverage run: | From 0779cf23498977254a1b390fcc0dd13727c9a805 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 8 Oct 2022 20:54:37 -0500 Subject: [PATCH 12/21] fix link --- docs/source/background/theory.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/background/theory.md b/docs/source/background/theory.md index 2d7de378..c6fe3647 100644 --- a/docs/source/background/theory.md +++ b/docs/source/background/theory.md @@ -48,7 +48,7 @@ Detailed workflows are available to draft a changelog, draft a release, publish - Adds a commit that includes the hashes of the dist files - Creates an annotated version tag in standard format - If given, bumps the version using the post version spec. he post version - spec can also be given as a setting, [Write Releaser Config Guide](../how_to_guides/write_config). + spec can also be given as a setting, [Write Releaser Config Guide](../how_to_guides/write_config.md). - Verifies that the SHA of the most recent commit has not changed on the target branch, preventing a mismatch of release commit. - Pushes the commits and tag to the target `branch` From 4a23efe609709b99af5189b259fc63a6ddc869ef Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 8 Oct 2022 21:24:43 -0500 Subject: [PATCH 13/21] fix tests --- .github/workflows/test.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b490fb12..81561222 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,15 +52,14 @@ jobs: if: ${{ matrix.os == 'ubuntu-latest' }} run: | hatch run cov:test + pip install codecov + codecov - name: Run the tests on Windows and MacOS if: ${{ matrix.os != 'ubuntu-latest' }} - run: python -m pytest -vv -s - - - name: Coverage run: | - pip install codecov - codecov + pip install -e ".[test]" + python -m pytest -vv -s generate-changelog: runs-on: ubuntu-20.04 From 44968501fd043b8a55cf29e57bed639e77091771 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 8 Oct 2022 21:37:17 -0500 Subject: [PATCH 14/21] try again --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 81561222..e3a3f62d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,7 +58,7 @@ jobs: - name: Run the tests on Windows and MacOS if: ${{ matrix.os != 'ubuntu-latest' }} run: | - pip install -e ".[test]" + python -m pip install -e ".[test]" python -m pytest -vv -s generate-changelog: From 073e8cac36c0129268f47c457f20f5833c908de8 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 8 Oct 2022 21:42:10 -0500 Subject: [PATCH 15/21] use hatch run --- .github/workflows/test.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e3a3f62d..6ef8dbff 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,9 +57,7 @@ jobs: - name: Run the tests on Windows and MacOS if: ${{ matrix.os != 'ubuntu-latest' }} - run: | - python -m pip install -e ".[test]" - python -m pytest -vv -s + run: hatch run test:test -s generate-changelog: runs-on: ubuntu-20.04 From aade1e3711d4597869986c107d1fc881d0cf8776 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 13 Oct 2022 09:00:48 -0500 Subject: [PATCH 16/21] try without base setup --- .github/workflows/test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5d6ee37e..5c678a04 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,18 +46,21 @@ jobs: python-version: ["3.8", "3.10"] steps: - uses: actions/checkout@v2 - - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - uses: actions/python-setup@v3 - name: Run the tests with coverage on Ubuntu if: ${{ matrix.os == 'ubuntu-latest' }} run: | + pipx install hatch hatch run cov:test pip install codecov codecov - name: Run the tests on Windows and MacOS if: ${{ matrix.os != 'ubuntu-latest' }} - run: hatch run test:test -s + run: | + pipx install hatch + hatch run test:test -s generate-changelog: runs-on: ubuntu-20.04 From 11a2512a79d281426250c2f33cb762a1a48e3bac Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 13 Oct 2022 09:08:55 -0500 Subject: [PATCH 17/21] fix action name --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5c678a04..b38e7646 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,7 +46,7 @@ jobs: python-version: ["3.8", "3.10"] steps: - uses: actions/checkout@v2 - - uses: actions/python-setup@v3 + - uses: actions/setup-python@v3 - name: Run the tests with coverage on Ubuntu if: ${{ matrix.os == 'ubuntu-latest' }} From a0c1bfaa51f48293aa40b00da7ad7b49c5e9b8df Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 13 Oct 2022 09:09:57 -0500 Subject: [PATCH 18/21] try with pip install hatch --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b38e7646..20a41bef 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,7 +59,7 @@ jobs: - name: Run the tests on Windows and MacOS if: ${{ matrix.os != 'ubuntu-latest' }} run: | - pipx install hatch + pip install hatch hatch run test:test -s generate-changelog: From 03fdb54c2c0195e7d8f07fa08c582bc854cb5147 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 13 Oct 2022 09:11:08 -0500 Subject: [PATCH 19/21] try with python -m pip --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 20a41bef..a5a9e2e9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,7 +59,7 @@ jobs: - name: Run the tests on Windows and MacOS if: ${{ matrix.os != 'ubuntu-latest' }} run: | - pip install hatch + python -m pip install hatch hatch run test:test -s generate-changelog: From 833ac687e8a838dc6a5663f44d96b15f8277c71d Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 13 Oct 2022 09:12:56 -0500 Subject: [PATCH 20/21] fix bash invocation --- .github/workflows/test.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a5a9e2e9..f1bce0ea 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,7 @@ on: defaults: run: - shell: bash -l {0} + shell: bash -eux {0} jobs: # Run "pre-commit run --all-files --hook-stage=manual" @@ -46,21 +46,18 @@ jobs: python-version: ["3.8", "3.10"] steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v3 + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - name: Run the tests with coverage on Ubuntu if: ${{ matrix.os == 'ubuntu-latest' }} run: | - pipx install hatch hatch run cov:test pip install codecov codecov - name: Run the tests on Windows and MacOS if: ${{ matrix.os != 'ubuntu-latest' }} - run: | - python -m pip install hatch - hatch run test:test -s + run: hatch run test:test -s generate-changelog: runs-on: ubuntu-20.04 From 8788a1ae78f8ce82c3e0fb054b907e8be8968d77 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 13 Oct 2022 16:57:06 -0500 Subject: [PATCH 21/21] make sure python path isn't separated --- jupyter_releaser/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jupyter_releaser/util.py b/jupyter_releaser/util.py index fe652274..049df020 100644 --- a/jupyter_releaser/util.py +++ b/jupyter_releaser/util.py @@ -702,7 +702,7 @@ def ensure_mock_github(): import fastapi # noqa import univcorn # type: ignore # noqa except ImportError: - run(f"{python} -m pip install fastapi uvicorn") + run(f"'{python}' -m pip install fastapi uvicorn") proc = subprocess.Popen([python, "-m", "uvicorn", "jupyter_releaser.mock_github:app"])