fix(ci): exclude the versioning test sets and upgrade maps from the dataset compliance pathspec - #350
Conversation
… pathspec ci-dataset-compliance asserts that every file it selects deserialises into a BH.oM.Data.Library.Dataset. This repository's versioning test sets match the selector but are JSON Lines of oM objects, so all 80 fail by design. Measured against this checkout: :(icase)*datasets*.json 80 files ... :(exclude,icase)*Versioning_Test/Datasets/* 0 files The same one-line change is in BHoM/CI_Toolkit templates/BHoM/ci-beta.yml and templates/BHE/ci-beta.yml. Per BHoM/internal-tickets#39 nothing propagates a template change to onboarded repositories, so this repository needs its own edit. After both land, this file remains byte-identical to its template. Refs BHoM/internal-tickets#36
|
@BHoMBot check required |
|
@sakanni to confirm, the following actions are now queued:
There are 23 requests in the queue ahead of you. |
|
@sakanni to confirm, the following actions are now queued:
There are 24 requests in the queue ahead of you. |
|
The check |
|
@BHoMBot check copyright-compliance |
|
@sakanni to confirm, the following actions are now queued:
There are 24 requests in the queue ahead of you. |
Sandbox venue only. Keeps ci-dataset-compliance from going red on the versioning test sets, so guard-validation PRs here are not confused by unrelated failures. Mirrors the open upstream PR exactly; drop this commit if a later fork sync brings the same change from upstream.
…athspec
ci-dataset-compliance asserts that every file it selects deserialises into a
BH.oM.Data.Library.Dataset. Versioning_<digits>.json are versioning upgrade
maps holding {"Dataset":{"ToNew":..,"ToOld":..}} and can never be Dataset
documents, so add a filename-anchored exclusion alongside the existing
Versioning_Test/Datasets path exclusion.
:(glob) keeps the token a filename match. Without it both wildcards cross '/',
so the exclusion would also drop real datasets under any directory containing
Versioning_. The ** anchor keeps it depth-agnostic and the [0-9] gate keeps a
genuine dataset named Versioning_Rules.json in scope.
This repository holds no file of that shape, so the token is a no-op here and
is carried so the pathspec does not diverge from CI_Toolkit's templates. The
surrounding comment is condensed; the fuller derivation and the assertions
that pin each element of the token live in CI_Toolkit.
Refs BHoM/internal-tickets#36, BHoM/internal-tickets#43.
867150f to
8079c96
Compare
|
@BHoMBot check required |
|
@sakanni to confirm, the following actions are now queued:
|
|
@BHoMBot check copyright-compliance |
|
@sakanni to confirm, the following actions are now queued:
|
peterjamesnugent
left a comment
There was a problem hiding this comment.
Approved, code change makes sense and the check is now passing.
|
@BHoMBot check ready-to-merge |
|
@sakanni to confirm, the following actions are now queued:
|
Review asked for the Versioning_<digits>.json exclusion to be centralised rather than repeated in each repository's pathspec, because it is a rule about a file type that any versioning repository can hold. The rule now lives in the compliance runner's own filter, so this token is redundant here and would have had to be reverted once that lands. What stays is the Versioning_Test/Datasets exclusion, which is specific to this repository: 140 paths here and none in Test_Toolkit, BHoM_Engine, BHoM or BuroHappold_Versioning_Toolkit. Measured on this checkout with git ls-files: the selector alone reaches 80 files, and 0 with the remaining token. This repository holds no Versioning_<digits>.json, so the removed token matched nothing here.
|
@sakanni to confirm, the following actions are now queued:
|
IsakNaslundBh
left a comment
There was a problem hiding this comment.
Happy with this now, matches the pattern exclusion specific for this toolkit 👍
|
@BHoMBot check ready-to-merge |
|
@sakanni to confirm, the following actions are now queued:
There are 19 requests in the queue ahead of you. |
Issues addressed by this PR
ci-dataset-complianceasserts that every file it selects deserialises into aBH.oM.Data.Library.Dataset. Its selector is a substring match over the whole path, so it also picks up this repository's versioning test sets, which are JSON Lines of oM objects. This excludes them.Measured with
git ls-filesagainst this checkout::(icase)*datasets*.json+ :(exclude,icase)*Versioning_Test/Datasets/*All 80 are under
.ci/code/Versioning_Test/Datasets. Nothing else here matches the selector, so nothing legitimate is lost.This exclusion is specific to this repository: 140 such paths here, and none in
Test_Toolkit,BHoM_EngineorBHoM. A sweep of the other versioning repositories found none there either.Test files
None here. The behaviour of the remaining token is pinned by the changed-file pattern assertions in
BHoM/CI_Toolkit.Changelog
ci-dataset-complianceno longer selects this repository's versioning test sets.Additional comments
A second token excluding
Versioning_<digits>.jsonupgrade maps was carried here and has been removed on review. Those maps fail the same way, but they are a file type any versioning repository can hold rather than anything specific to this one, so the rule belongs in the compliance runner's own filter and not in each repository's pathspec. It is implemented there now. Nothing is lost by removing it here: this repository holds no such file, so the token matched nothing.ci-dataset-complianceself-skips on this pull request. It changes one workflow file, which the dataset pathspec does not match, so the job reports success having examined nothing. Its green is not evidence the change works; the table above is.