You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(commands): address code-review findings in gbx:test:* --host mode
Follow-up to the --host commit; fixes six review findings, all in this
session's new host-mode code.
- PYSPARK_PYTHON not reaching Spark workers (gbx-test-python.sh): the
`VAR=x eval "..."` command-prefix form does NOT export to the python
grandchild, so workers fell back to system python3 (No module named
pandas). New shared helper activate_host_python_env exports
PYSPARK_PYTHON/PYSPARK_DRIVER_PYTHON and unsets PROJ_DATA/PROJ_LIB;
all five host branches call it (kills the copy-pasted block too).
- bench tests ran nowhere (coverage gap): the hand-maintained LIGHT_DIRS
list omitted `bench`, so the heavy leg's conftest collect_ignore skipped
it and the light leg didn't list it. Now the light-dir set is sourced
from python/geobrix/test/conftest.py _LIGHT_TEST_DIRS (single source of
truth) via host_light_test_dirs; the heavy leg runs plain `pytest test/`
and lets that conftest's dependency-aware collect_ignore exclude the
light dirs (no hand-rolled --ignore list to drift).
- PROJ_DATA= empty-string vs unset: now unset (via the helper).
- Unquoted --ignore/paths through eval: pytest is now invoked with a real
args array (marker_args + path args), not an eval-interpolated string,
so a repo path with spaces can't word-split.
- Docs drift: five command .md Host-mode sections still described the
abandoned single .venv-host / requirements-dev-container.txt model;
updated to the two-venv (.venv-host-ci / .venv-host-pyrx) model.
- Notebooks on host: the runner's nested `python -m venv` isolation fails
on arca (no ensurepip). Host branch now sets GBX_NOTEBOOK_ISOLATED_ENV=0
and installs nbformat/nbconvert into .venv-host-pyrx, running notebooks
directly in it.
Re-verified in a clean shell (no pre-exported PYSPARK_PYTHON): unit heavy
146 passed, light leg green with bench now executing, function-info clean.
Remaining failures are all pre-existing and unrelated to --host: bench
fnspec references RST_FromFile.scala (absent on this branch), doc-test #51
/#52, /Volumes-hardcoded reads, and the gdal_examples import collision.
Co-authored-by: Isaac
With `--host` the orchestrator runs on the host instead of `docker exec geobrix-dev`, forwarding `--host` to each child suite (python-docs, sql-docs, scala-docs). Prerequisites: `source ~/.local/geobrix-gdal-env.sh` (native GDAL + Java 17 + PYTHONPATH) and `uv` on PATH, with `PIP_INDEX_URL` pointing at the internal pip proxy. The venv-based child suites build `.venv-host` from `python/geobrix/requirements-dev-container.txt`on first run (the exact CI pins, minus native-source-only `pdal`which arca can't build); `--rebuild-venv` is forwarded to them. The scala-docs child runs `mvn` directly and needs only the sourced GDAL env. See the `geobrix-arca` plugin for the full setup.
37
+
With `--host` the orchestrator runs on the host instead of `docker exec geobrix-dev`, forwarding `--host` to each child suite (python-docs, sql-docs, scala-docs). Prerequisites: `source ~/.local/geobrix-gdal-env.sh` (native GDAL + Java 17 + PYTHONPATH) and `uv` on PATH, with `PIP_INDEX_URL` pointing at the internal pip proxy. The venv-based child suites build a host test venv from the exact CI-pinned locks via `uv` on first run — `.venv-host-pyrx` from `python/geobrix/requirements-pyrx-ci.txt`(light-tier deps); neither CI lock contains `pdal`(source-only, unbuildable on arca); `--rebuild-venv` is forwarded to them. The scala-docs child runs `mvn` directly and needs only the sourced GDAL env. See the `geobrix-arca` plugin for the full setup.
38
38
39
39
**Sample data (default):** The command sets `GBX_SAMPLE_DATA_ROOT=/Volumes/main/default/test-data` inside the container so doc tests use the minimal bundle (host path `sample-data/Volumes/main/default/test-data`). This is required for running docs unit tests on remote/CI. Use `--no-sample-data-root` to leave it unset (e.g. to use a full bundle or your own env).
-`--skip-generate` - Skip the generator; run only pytest in `docs/tests-function-info/`
14
-
-`--host` - Run on the host (arca), not the Docker container. Requires `source ~/.local/geobrix-gdal-env.sh` first (provisioned by the `geobrix-arca` plugin); builds/reuses a `.venv-host` from the pinned lock and runs against a host-built JAR. See "Host mode" below.
14
+
-`--host` - Run on the host (arca), not the Docker container. Requires `source ~/.local/geobrix-gdal-env.sh` first (provisioned by the `geobrix-arca` plugin); builds/reuses `.venv-host-pyrx` from the pinned CI lock and runs against a host-built JAR. See "Host mode" below.
15
15
-`--rebuild-venv` - (with `--host`) force-rebuild the host test venv.
16
16
-`--log <path>` - Write output to log file
17
17
-`--help` - Display help
18
18
19
19
## Host mode (arca, no Docker)
20
20
21
-
With `--host` the command runs directly on the host instead of `docker exec geobrix-dev`. Prerequisites: `source ~/.local/geobrix-gdal-env.sh` (native GDAL + Java 17 + PYTHONPATH) and `uv` on PATH, with `PIP_INDEX_URL` pointing at the internal pip proxy. The pytest registers functions via the built JAR; no sample data is needed. The first run builds `.venv-host` from `python/geobrix/requirements-dev-container.txt` (the exact CI pins, minus native-source-only`pdal` which arca can't build). See the `geobrix-arca` plugin for the full setup.
21
+
With `--host` the command runs directly on the host instead of `docker exec geobrix-dev`. Prerequisites: `source ~/.local/geobrix-gdal-env.sh` (native GDAL + Java 17 + PYTHONPATH) and `uv` on PATH, with `PIP_INDEX_URL` pointing at the internal pip proxy. The pytest registers functions via the built JAR; no sample data is needed. The first run builds a host test venv from the exact CI-pinned lock via `uv` — `.venv-host-pyrx` from `python/geobrix/requirements-pyrx-ci.txt` (the light-tier deps: rasterio/pandas/h3/vizx). Neither CI lock contains `pdal` (source-only, unbuildable on arca and not needed here). See the `geobrix-arca` plugin for the full setup.
-`--host` – Run on the host (arca), not the Docker container. Requires `source ~/.local/geobrix-gdal-env.sh` first (provisioned by the `geobrix-arca` plugin); builds/reuses a `.venv-host` from the pinned lock and runs against a host-built JAR. See "Host mode" below.
17
+
-`--host` – Run on the host (arca), not the Docker container. Requires `source ~/.local/geobrix-gdal-env.sh` first (provisioned by the `geobrix-arca` plugin); builds/reuses `.venv-host-pyrx` from the pinned CI lock and runs against a host-built JAR. See "Host mode" below.
18
18
-`--rebuild-venv` – (with `--host`) force-rebuild the host test venv.
19
19
-`--log <path>` – Write output to log (filename → `test-logs/<name>`).
20
20
-`--path <path>` – Limit scope: subdir (e.g. `sample-data`, `fixtures`), a single `.ipynb`, or a test file (e.g. `test_notebook_via_script.py`). With a `.py` path, runs **pytest** for that file instead of the cell-by-cell runner.
With `--host` the command runs directly on the host instead of `docker exec geobrix-dev`. Prerequisites: `source ~/.local/geobrix-gdal-env.sh` (native GDAL + Java 17 + PYTHONPATH) and `uv` on PATH, with `PIP_INDEX_URL` pointing at the internal pip proxy. The notebook runner executes from the host venv against the built JAR. The first run builds `.venv-host` from `python/geobrix/requirements-dev-container.txt` (the exact CI pins, minus native-source-only `pdal` which arca can't build). See the `geobrix-arca` plugin for the full setup.
26
+
With `--host` the command runs directly on the host instead of `docker exec geobrix-dev`. Prerequisites: `source ~/.local/geobrix-gdal-env.sh` (native GDAL + Java 17 + PYTHONPATH) and `uv` on PATH, with `PIP_INDEX_URL` pointing at the internal pip proxy. The notebook runner executes from the host venv against the built JAR. The first run builds a host test venv from the exact CI-pinned lock via `uv` — `.venv-host-pyrx` from `python/geobrix/requirements-pyrx-ci.txt` (the light-tier deps: rasterio/pandas/h3/vizx), plus `nbformat`/`nbconvert` (needed by the runner, installed on demand). Neither CI lock contains `pdal` (source-only, unbuildable on arca and not needed here). Unlike the container, the host path runs the notebooks directly in `.venv-host-pyrx` (`GBX_NOTEBOOK_ISOLATED_ENV=0`) rather than a nested `python -m venv` (which fails on arca — no `ensurepip`/`python3-venv`).
27
+
28
+
**Note (bare host):** notebooks that write sample bundles to the literal `/Volumes` path (the data-download notebook) fail on a bare host with `Permission denied: '/Volumes'` — those need a real UC Volumes mount (`sudo ln -sfn "$PWD/sample-data/Volumes" /Volumes`) and, for Sentinel-2 fixtures, `pystac-client`/`planetary-computer`. The runner itself works on host; these are data/mount limitations. See the `geobrix-arca` plugin for the full setup.
27
29
28
30
**Read/write path behavior (absolute vs relative)**
-`--host` – Run on the host (arca), not the Docker container. Requires `source ~/.local/geobrix-gdal-env.sh` first (provisioned by the `geobrix-arca` plugin); builds/reuses a `.venv-host` from the pinned lock and a host-built JAR. See "Host mode" below.
61
+
-`--host` – Run on the host (arca), not the Docker container. Requires `source ~/.local/geobrix-gdal-env.sh` first (provisioned by the `geobrix-arca` plugin); builds/reuses `.venv-host-pyrx` from the pinned CI lock and a host-built JAR. See "Host mode" below.
62
62
-`--rebuild-venv` – (with `--host`) force-rebuild the host test venv.
With `--host` the command runs directly on the host instead of `docker exec geobrix-dev`. Prerequisites: `source ~/.local/geobrix-gdal-env.sh` (native GDAL + Java 17 + PYTHONPATH) and `uv` on PATH, with `PIP_INDEX_URL` pointing at the internal pip proxy. The first run builds `.venv-host` from `python/geobrix/requirements-dev-container.txt` (the exact CI pins, minus native-source-only `pdal`which arca can't build). Sample data reads from the on-disk `sample-data/…/test-data` mirror via `GBX_SAMPLE_DATA_ROOT`. See the `geobrix-arca` plugin for the full setup.
72
+
With `--host` the command runs directly on the host instead of `docker exec geobrix-dev`. Prerequisites: `source ~/.local/geobrix-gdal-env.sh` (native GDAL + Java 17 + PYTHONPATH) and `uv` on PATH, with `PIP_INDEX_URL` pointing at the internal pip proxy. The first run builds `.venv-host-pyrx` from `python/geobrix/requirements-pyrx-ci.txt` (the exact light-tier CI pins: rasterio/pandas/h3/vizx) via `uv`; neither CI lock contains `pdal`(source-only, unbuildable on arca and not needed here). Sample data reads from the on-disk `sample-data/…/test-data` mirror via `GBX_SAMPLE_DATA_ROOT`. See the `geobrix-arca` plugin for the full setup.
0 commit comments