Skip to content

Commit 3bb72d8

Browse files
authored
Merge pull request #47 from hhenson/chore/depend-on-hgraph
Depend on hgraph rather than hg_cpp
2 parents bb031fd + 6e2cda6 commit 3bb72d8

3 files changed

Lines changed: 95 additions & 72 deletions

File tree

.github/workflows/tests.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,21 @@ on:
1010

1111
jobs:
1212
tests:
13+
name: Tests (hgraph ${{ matrix.hgraph }})
1314
runs-on: ubuntu-latest
1415

16+
strategy:
17+
# Report both lines rather than stopping at the first failure: which one
18+
# broke is the useful signal.
19+
fail-fast: false
20+
matrix:
21+
# This package supports clients on both hgraph lines, so both gate.
22+
# "resolved" is whatever the lock resolves to today, which is the 0.8
23+
# C++-first line; "0.5" is the floor pyproject declares, which is the
24+
# Python-first line. Testing only the former let a 0.5-only failure in
25+
# hg_oap sit undetected until someone installed it by hand.
26+
hgraph: [ resolved, "0.5" ]
27+
1528
steps:
1629
- name: checkout
1730
uses: actions/checkout@v4
@@ -30,5 +43,21 @@ jobs:
3043
- name: Install dependencies
3144
run: uv sync --all-extras --all-groups
3245

46+
# `uv pip` needs an explicit interpreter: without one it installs into
47+
# whichever environment it discovers, which is not necessarily the one
48+
# `uv sync` just populated, and the pin silently does nothing.
49+
#
50+
# The web extra comes along because hg_oap requires it; naming it here
51+
# keeps the pin from dropping it.
52+
- name: Pin hgraph to the 0.5 line
53+
if: matrix.hgraph == '0.5'
54+
run: uv pip install --python .venv/bin/python "hgraph[web]>=0.5.41,<0.6"
55+
56+
- name: Report the hgraph actually under test
57+
run: .venv/bin/python -c "import importlib.metadata as m; print('hgraph', m.version('hgraph'))"
58+
59+
# --no-sync matters: a plain `uv run` re-syncs from the lock first, which
60+
# would reinstate the resolved version and turn the 0.5 leg into a green
61+
# no-op.
3362
- name: Run tests
34-
run: uv run pytest -ra -q --dist=loadscope --cov=hg_systematic --cov-report=xml
63+
run: uv run --no-sync pytest -ra -q --dist=loadscope --cov=hg_systematic --cov-report=xml

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ classifiers = [
2121
]
2222
requires-python = ">=3.12"
2323
dependencies = [
24-
# "hgraph>=0.5.30", # Python runtime alternative to hg_cpp
25-
"hg_cpp>=0.4.7",
26-
"hg_oap>=0.3.0",
24+
"hgraph>=0.5.41",
25+
"hg_oap>=0.3.2",
2726
"frozendict>=2.3.10",
2827
"sortedcontainers>=2.4.0",
2928
"ordered-set>=4.1.0",

0 commit comments

Comments
 (0)