Skip to content

Drop the unread has_test_files key from build.toml - #88

Merged
wdolinar merged 2 commits into
masterfrom
fix/drop-unread-has-test-files-key
Aug 23, 2026
Merged

Drop the unread has_test_files key from build.toml#88
wdolinar merged 2 commits into
masterfrom
fix/drop-unread-has-test-files-key

Conversation

@wdolinar

Copy link
Copy Markdown
Member

Deletes has_test_files = true from build.toml. One line, no behavior change
today, and a prerequisite for the next xmsconan release.

Why it is unread

  • No generator, template, or doc in xmsconan references the key.
  • The has_test_files identifiers in xmsconan's
    build_tools/build_library.py:341-355 are a local variable derived from
    the --test_files CLI flag. That code never reads toml_data.
  • extra_export_sources = ["test_files"] (build.toml:20-22) is what actually
    exports the directory. It is untouched.

Why it has to go now

The next xmsconan release (Aquaveo/xmsconan#112) adds a top-level key whitelist
to xmsconan gen, xmsconan ci and xmsconan profiles. Until now a misspelled
build.toml key had no symptom at all — the generators read the file with
setdefault/get, so the default was kept and the generated artifact quietly
was not what the file asked for. With the whitelist in place, this key stops the
Generate step.

xmsmesher is the only consumer carrying an unknown key. Running the new
validator over all seven:

OK      xmscore      OK  xmsgrid     OK  xmsinterp    OK  xmsextractor
OK      xmsconstraint            OK  xmsvtk
REJECT  xmsmesher -> unknown top-level key(s) has_test_files

This repo installs xmsconan>=2.12.2 --upgrade, so that release arrives on the
next CI run after it publishes. This PR needs to merge before then.

Verification

$ diff -r <rendered from master's build.toml> <rendered from this branch's>
(no output)

build.py, conanfile.py, CMakeLists.txt, .flake8 and pytest.ini
rendered from both versions with the currently released xmsconan are
byte-identical, so nothing changes for builds running today.

$ validate_top_level_keys(build.toml)   -> OK
$ generate_ci(build.toml)               -> XmsMesher-CI.yaml

Both run against the xmsconan#112 branch, confirming the file passes the
incoming whitelist.

flake8 is unaffected: the diff is build.toml only, and no Python file changed.

Doc impact

None. has_test_files appears in no README, doc, or workflow in this repo —
build.toml was its only mention.

Nothing reads it. No generator, template, or doc in xmsconan references the
key, and the `has_test_files` identifiers in `build_tools/build_library.py`
are a local variable derived from the `--test_files` CLI flag, unrelated to
build.toml. `extra_export_sources = ["test_files"]` is what actually exports
the directory, and that stays.

It has to go before the next xmsconan release. That release adds a top-level
key whitelist to `xmsconan gen`, `xmsconan ci` and `xmsconan profiles` --
until now a misspelled key had no symptom at all, because the generators read
this file with `setdefault`/`get`, so the default was kept and the generated
artifact quietly was not what the file asked for. With the whitelist in place
this key stops the Generate step, and xmsmesher is the only consumer carrying
one: the other six build.toml files pass as they stand.

No behavior change today. Rendering build.py, conanfile.py, CMakeLists.txt,
.flake8 and pytest.ini from this file with the currently released xmsconan,
before and after the deletion, gives byte-identical output.
Deleting has_test_files (previous commit) is what lets `xmsconan_gen` run
at all under 2.23.0, but it does not fix the four Debug legs. The
`--wheel-dir wheelhouse` that build.py exits 1 on lives in this committed
workflow, not in anything the Generate step regenerates, so the fix only
arrives by regenerating the workflow itself.

The build step now asks for a wheel only where one is published:

    ${{ matrix.build_type == 'Release' && ' --wheel-dir wheelhouse' || '' }}

matching the gate repair, artifact upload, and devpi deploy already carry.
[matrix].pybind_build_types defaults to Release, so a Debug leg has no
pybind configuration to extract a wheel from and was failing for doing
exactly what it was configured to do.

Carried along by the same regeneration, all from xmsconan 2.18.0 -> 2.23.0
template changes this repo had not picked up:

- flake8-tidy-imports on the flake job. It registers `banned-modules`,
  which the .flake8 generated two steps later sets to osgeo.*; without the
  plugin flake8 accepted the option and enforced nothing while reporting
  green.
- Seven third-party actions pinned to commit SHAs, tag kept in a trailing
  comment. setup-python on the flake job moves v2 -> v5.
- The Linux container image and PYTHON_TARGET_VERSION read from
  matrix.python-version instead of a hardcoded 3.13. Same values for this
  repo's single-version Linux matrix.
- xmsconan floor 2.18.0 -> 2.23.0.

DESIGN: regenerate the committed workflow so the wheel request is gated to
the Release leg, since that flag is not something the Generate step can fix.
EVIDENCE: $ xmsconan gen/ci/profiles against this build.toml -> rc=0, 0, 0;
the rendered YAML parses (jobs: flake, mac, linux, windows); the Release
gate is on all 3 build steps and no ungated --wheel-dir remains.
@wdolinar
wdolinar merged commit 201c720 into master Aug 23, 2026
18 checks passed
@wdolinar
wdolinar deleted the fix/drop-unread-has-test-files-key branch August 23, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant