Skip to content

Commit 54e414f

Browse files
authored
Merge pull request #789 from interscript/feat/py-bridge-ci-gate
ci: run the Python bridge leg in the ISC corpus sweep
2 parents 373c522 + 728b132 commit 54e414f

2 files changed

Lines changed: 17 additions & 6 deletions

File tree

‎.github/workflows/rake.yml‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,16 @@ jobs:
1818
env:
1919
BUNDLE_WITHOUT: "secryst"
2020
SKIP_JS: "1"
21-
SKIP_PYTHON: "1"
2221
ISC_SWEEP: "1"
2322
# The ISC corpus sweep: every map's own tests through every
2423
# supported compiler (Interpreter, Compiler::Ruby), against the
2524
# ../maps sibling from the monorepo checkout. The conformance gap
2625
# it measured is closed (16,482 examples, 0 failures —
2726
# interscript-ruby#779..#786); this is now the CI conformance
28-
# gate for the corpus. The experimental Python bridge is excluded
29-
# (SKIP_PYTHON) until its own corpus conformance work lands.
27+
# gate for the corpus. The Python bridge now runs too: the
28+
# interscript-py engine is corpus-conformant (8,227 examples,
29+
# 0 failures — interscript-py#11..#20) and is installed from
30+
# its main branch below.
3031

3132
steps:
3233
- name: Checkout monorepo
@@ -51,20 +52,25 @@ jobs:
5152
# packages rides out PEP 668 on Homebrew-managed macos Pythons.
5253
shell: bash
5354
run: |
54-
bundle config set --local with jsexec
55+
bundle config set --local with jsexec pyexec
5556
bundle install
5657
if bundle exec ruby -e 'require "pycall"' >/dev/null 2>&1; then
5758
# PyCall binds whichever libpython it was built against, which
5859
# is not necessarily the python that bare `pip` targets —
5960
# install the regex helper into that interpreter.
6061
PYBIN=$(bundle exec ruby -e 'require "pycall"; v = PyCall.sys.version[/\d+\.\d+/]; puts "python#{v}"')
62+
# Windows names the interpreter python.exe, not python3.X.
63+
command -v "$PYBIN" >/dev/null 2>&1 || PYBIN=python
6164
if command -v "$PYBIN" >/dev/null 2>&1; then
6265
"$PYBIN" -m pip install --break-system-packages regex || "$PYBIN" -m pip install regex
66+
# The bridge needs the current engine; the PyPI release
67+
# predates the conformance work.
68+
"$PYBIN" -m pip install --break-system-packages "git+https://github.com/interscript/interscript-py@main" || "$PYBIN" -m pip install "git+https://github.com/interscript/interscript-py@main"
6369
else
6470
echo "$PYBIN not on PATH — python helper not installed"
6571
fi
6672
else
67-
echo "pycall not bundled (SKIP_PYTHON) — python helper not installed"
73+
echo "pycall not bundled — the python compiler leg is unavailable this run"
6874
fi
6975
7076
- name: RSpec

‎spec/interscript_spec.rb‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,12 @@
5959
# Allow a bigger timeout for Rababa so that model files
6060
# can be provisioned. This is temporary until we find a
6161
# better location for this code.
62-
timeout = /rababa/.match?(my_system_name) ? 100 : 5
62+
# The Python bridge pays the per-map ISC emission and
63+
# load on its first example — 5s is too tight on the
64+
# slowest runner (windows, ruby 3.3). Real hangs still
65+
# time out well below these ceilings.
66+
base = /rababa/.match?(my_system_name) ? 100 : 5
67+
timeout = (compiler.name.include?("Python") && base == 5) ? 15 : base
6368
Timeout.timeout(timeout) do
6469
result = Interscript.transliterate(my_system_name, from, cache, compiler: compiler)
6570
expect(result).to eq(expected)

0 commit comments

Comments
 (0)