From 3924801ddc910862f40f51851bea8cdd544561fc Mon Sep 17 00:00:00 2001 From: Brandon Bocklund Date: Wed, 3 Jun 2026 14:14:21 -0700 Subject: [PATCH 1/3] CI: Add GitHub Action for smoke tests with a test for installing from Git URLs --- .github/workflows/smoke_tests.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/smoke_tests.yaml diff --git a/.github/workflows/smoke_tests.yaml b/.github/workflows/smoke_tests.yaml new file mode 100644 index 0000000..eb7d27b --- /dev/null +++ b/.github/workflows/smoke_tests.yaml @@ -0,0 +1,19 @@ +name: Smoke Tests + +on: [push, pull_request] + +jobs: + git-url: + # see the following for valid dependency specifiers + # https://packaging.python.org/en/latest/specifications/dependency-specifiers/#dependency-specifiers + # we construct from the GitHub Actions context + name: Install and import from git url + runs-on: ubuntu-latest + steps: + - uses: astral-sh/setup-uv@v7 + with: + ignore-empty-workdir: "true" # resolve warning about "Empty workdir detected. This may cause unexpected behavior. You can enable ignore-empty-workdir to mute this warning." + cache-dependency-glob: "" # resolve warning about "No file matched to ... The cache will never get invalidated. Make sure you have checked out the target repository and configured the cache-dependency-glob input correctly." + - run: uv init --bare --name smoke-test + - run: uv add "scheil @ git+https://github.com/${{ github.repository }}.git@${{ github.sha }}" + - run: uv run python -c "import scheil; print(scheil.__version__)" \ No newline at end of file From 5f446c7183596e8aa42ff734c98c476c7c1cdbb1 Mon Sep 17 00:00:00 2001 From: Brandon Bocklund Date: Wed, 3 Jun 2026 14:29:51 -0700 Subject: [PATCH 2/3] Add fix to __init__.py --- scheil/__init__.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scheil/__init__.py b/scheil/__init__.py index 62ce14b..667cc66 100644 --- a/scheil/__init__.py +++ b/scheil/__init__.py @@ -22,10 +22,6 @@ del get_version except ImportError: # Fall back on the metadata of the installed package - try: - from importlib.metadata import version - except ImportError: - # backport for Python<3.8 - from importlib_metadata import version + from importlib.metadata import version __version__ = version("scheil") del version \ No newline at end of file From 354298370c3c78f22ede5eb85d77e1401f03da76 Mon Sep 17 00:00:00 2001 From: Brandon Bocklund Date: Wed, 3 Jun 2026 14:30:31 -0700 Subject: [PATCH 3/3] fix --- scheil/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scheil/__init__.py b/scheil/__init__.py index 667cc66..4475e1d 100644 --- a/scheil/__init__.py +++ b/scheil/__init__.py @@ -20,8 +20,10 @@ # source control management system at the project root. __version__ = get_version(root='..', relative_to=__file__) del get_version -except ImportError: +except (ImportError, LookupError): # Fall back on the metadata of the installed package + # ImportError occurs if there's no ._dev + # LookupError occurs if get_version fails from importlib.metadata import version __version__ = version("scheil") del version \ No newline at end of file