ARCExpect 7.0.0-preview.4
dotnet add package ARCExpect --version 7.0.0-preview.4
NuGet\Install-Package ARCExpect -Version 7.0.0-preview.4
<PackageReference Include="ARCExpect" Version="7.0.0-preview.4" />
<PackageVersion Include="ARCExpect" Version="7.0.0-preview.4" />
<PackageReference Include="ARCExpect" />
paket add ARCExpect --version 7.0.0-preview.4
#r "nuget: ARCExpect, 7.0.0-preview.4"
#:package ARCExpect@7.0.0-preview.4
#addin nuget:?package=ARCExpect&version=7.0.0-preview.4&prerelease
#tool nuget:?package=ARCExpect&version=7.0.0-preview.4&prerelease
ARCExpect
ARCExpect provides portable ARC validation package authoring, execution, result contracts, and output writers for .NET, JavaScript, and Python from one F# source tree.
The source tree follows the DataHubClient/ARCtrl layout:
ARCExpect.fsprojbuilds the full .NET library.ARCExpect.Javascript.fsprojtranspiles the portable API to JavaScript.ARCExpect.Python.fsprojtranspiles the portable API to Python.
The three project files compile the same ordered sources under Common/.
DotNet/, Python/, and Javascript/ contain target runtime adapters
and native package facades. All targets expose the flat
ARCExpect namespace; the project-file suffixes are build boundaries, not
public namespaces. Distribution names are ARCExpect on NuGet,
@nfdi4plants/arcexpect for JavaScript, and arcexpect for Python.
PackARCExpect creates all three artifacts under artifacts/packages.
TestPortableARCExpect runs the shared contract suite on each runtime and then
installs each freshly packed artifact in an isolated consumer.
Testing against unpublished AVPR packages
There is no hidden source-level link from ARCExpect or the CLI to the sibling AVPR repository. The projects deliberately retain package references so local tests exercise the same NuGet/npm/PyPI boundaries that released consumers use. The mechanism has three separate parts:
- The repository-root
Directory.Build.propspins the exact AVPR client, interop, model, and codecs versions. Bracketed NuGet versions such as[0.1.0-preview.4]mean exactly that version, with no roll-forward. src/ARCExpect/Directory.Build.propsexplicitly imports the root property file. MSBuild imports only the nearestDirectory.Build.props, so this explicit import is required alongside ARCExpect's target-specificobj/folder settings.- The build helpers choose where those exact artifacts come from. They first
use
AVPR_NATIVE_PACKAGE_DIR, otherwise they detect../arc-validate-package-registry/artifacts/packages, and otherwise fall back to the public registries. For NuGet they generate an ignored temporaryNuGet.Config; packed JavaScript and Python consumer tests install the matching.tgzand.whlfiles from the same directory directly.
The local artifact directory therefore needs the exact files named by
Directory.Build.props. For Step 3 that includes the Model and Codecs NuGet,
npm, and wheel artifacts plus the AVPRClient and AVPRClient.Interop NuGet
packages. Produce them in the AVPR checkout before testing this repository.
With the standard sibling layout, the named package and portable-test targets discover the directory automatically:
cd ..\arc-validate-package-registry
.\build.cmd PackPortablePackages
dotnet pack src\AVPRClient\AVPRClient.csproj -c Release -o artifacts\packages
dotnet pack src\AVPRClient.Interop\AVPRClient.Interop.csproj -c Release -o artifacts\packages
cd ..\arc-validate
.\build.cmd PackARCExpect
.\build.cmd TestPortableARCExpect
Run the two dotnet pack commands after PackPortablePackages: that named
AVPR target deliberately cleans artifacts/packages before writing the Model
and Codecs artifacts. The subsequent commands add the generated client and
interop NuGet packages without cleaning the native artifacts that the
JavaScript and Python consumer checks need.
For a non-sibling checkout, point the build at the artifact directory:
$env:AVPR_NATIVE_PACKAGE_DIR = 'D:\work\avpr\artifacts\packages'
.\build.cmd TestPortableARCExpect
A plain IDE or dotnet restore invocation does not run the FAKE build helpers.
Until the selected previews are published, add the same directory explicitly:
dotnet restore arc-validate.slnx `
-p:RestoreAdditionalProjectSources='D:\work\avpr\artifacts\packages'
Once the exact versions are published, no local source or environment variable
is required. The same project files restore them from the public registries.
The UseExplicitPackageVersions target in arc-validate.fsproj is a separate
piece of pack-time plumbing: it makes a packed CLI advertise the exact
ARCExpect version from its in-repository ProjectReference; it does not locate
AVPR packages.
The npm artifact depends on @nfdi4plants/validationpackage-model and
@nfdi4plants/validationpackage-codecs; the Python artifact depends on the
corresponding unscoped PyPI distributions. Neither bundles Fable-generated
copies. The unpublished-package workflow above supplies those native
dependencies to packed-consumer tests.
The common API contains Pyxpecto package authoring and execution, framework-neutral case and run results, validation summaries, Thoth.Json codecs, JUnit XML generation, dependency-free SVG badges, and internal output orchestration. The .NET target additionally contains filesystem adapters, ARC specification validation, and the legacy ARCTokenization/ControlledVocabulary validation helpers. The Python package provides its native filesystem-writing pipeline in the package facade.
ValidationSummary, Execute.Validation, and the output writers accept
optional SourceBranch and SourceCommitHash values. Supplied values are
encoded as top-level JSON fields, JUnit <properties>, and an SVG <metadata>
element that is never rendered. Missing values are omitted, so existing output
remains unchanged. The .NET and Python filesystem pipelines consume the corresponding
--source-branch and --source-commit-hash process arguments forwarded by
arc-validate; portable code never reads process state or CI environment
variables.
arc-validate forwards four standard package arguments: -i, -o,
--source-branch, and --source-commit-hash. Package-defined arguments follow
the CLI's first -- boundary. PackageArguments.fromCommandLine(metadata)
reads the target's native argument array and validates all values against the
metadata's CWL Inputs; PackageArguments.parse(metadata, arguments) provides
the same pure API for explicit arrays and browser JavaScript callers.
let metadata = Setup.Metadata(PACKAGE_METADATA)
let arguments = PackageArguments.fromCommandLine(metadata)
let arcDirectory = arguments.ArcDirectory
let outputDirectory = arguments.OutputDirectory
let testMode = arguments.TryGetBoolean("test")
let echo = arguments.TryGetString("echo")
ARCExpect selects F# frontmatter in the .NET build and Python frontmatter in the Python build. Package authors never import or pass a language selector. JavaScript metadata setup remains unavailable until AVPR defines a JavaScript validation-package frontmatter format.
Typed GetBoolean/TryGetBoolean, GetInt/TryGetInt, GetLong, GetFloat,
GetDouble, and GetString pairs cover the supported CWL scalar types. A
TryGet result is absent only when a nullable input was not supplied; it does
not hide type or metadata errors. Unknown, duplicate, missing required, or
malformed values fail before package validation starts.
The equivalent native entry points are
PackageArguments.fromCommandLine(metadata) in JavaScript and
PackageArguments.from_command_line(metadata) in Python. Instance properties
and typed getter names retain their documented PascalCase API in both emitted
packages.
JavaScript and Python intentionally do not expose compatibility stubs for the
.NET-only CV APIs. Portable validation packages and the shared top-level
Execute facade use Fable.Pyxpecto test cases. Expecto is not part of the
production ARCExpect package surface.
The shared Setup.ValidationPackage accepts Pyxpecto test-case arrays and
Execute.Validation returns an F# Async<ValidationSummary>. The npm entry point
exposes the same operation as a Promise; Python consumers use
await Execute.validation(...). Both native packages re-export Pyxpecto case
constructors such as testCase/ptestCase and test_case/ptest_case.
Package authoring
Validation packages use Fable.Pyxpecto cases and the shared API. Published
packages pinned to historical ARCExpect versions remain unchanged; new package
versions target the Pyxpecto surface:
open ARCExpect
open Fable.Pyxpecto
let validationPackage =
Setup.ValidationPackage(
metadata,
CriticalValidationCases = [|
testCase "required metadata" <| fun () -> ()
|]
)
let arguments = PackageArguments.fromCommandLine(metadata)
validationPackage |> Execute.ValidationPipeline(arguments)
The equivalent JavaScript API returns a Promise:
import { Execute, Setup, testCase } from "@nfdi4plants/arcexpect";
const validationPackage = Setup.ValidationPackage(metadata, [
testCase("required metadata", () => {})
]);
const summary = await Execute.Validation(validationPackage);
The equivalent Python API is awaitable:
from arcexpect import Execute, Setup, test_case
validation_package = Setup.ValidationPackage(
metadata,
[test_case("required metadata", lambda: None)],
)
summary = await Execute.validation_pipeline(validation_package)
The .NET and Python pipelines write the standard summary JSON, JUnit XML, and
badge SVG under .arc-validate-results/<name>@<version>/. Internally the shared
pipeline performs result combination and encoding so package
authors do not have to orchestrate individual writers for the standard flow.
The individual Execute.SummaryCreation, Execute.JUnitReportCreation, and
Execute.BadgeCreation methods remain public on .NET, with snake-case
equivalents in Python. Pure summary, JUnit, and badge encoders remain public on
all targets. JavaScript validation-package execution and filesystem conventions
remain deliberately “Coming soon”.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- ARCTokenization (= 6.0.0)
- Fable.Core (>= 5.2.0)
- Fable.Python (>= 5.4.0)
- Fable.Pyxpecto (= 2.0.0)
- FSharp.Core (>= 10.1.400)
- FSharpAux (= 2.0.0)
- Thoth.Json.Core (= 0.9.0)
- ValidationPackage.Codecs (= 0.1.0-preview.4)
- ValidationPackage.Model (= 0.1.0-preview.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 7.0.0-preview.4 | 35 | 8/20/2026 |
| 7.0.0-alpha | 90 | 2/27/2026 |
| 6.0.0 | 248 | 12/4/2025 |
| 5.0.1 | 2,445 | 9/26/2025 |
| 5.0.0 | 645 | 6/6/2025 |
| 4.0.1 | 3,926 | 8/7/2024 |
| 4.0.0 | 337 | 6/25/2024 |
| 3.0.0 | 531 | 6/11/2024 |
| 2.0.0 | 734 | 4/30/2024 |
| 1.0.1 | 782 | 2/27/2024 |
| 1.0.0 | 271 | 1/12/2024 |
| 0.0.1 | 194 | 12/11/2023 |
| 0.0.0-preview0 | 174 | 12/11/2023 |
## 7.0.0-preview.4 - 2026-08-14
- Consolidate portable result and output contracts behind one public ARCExpect
package identity with separate .NET, JavaScript, and Python projects and
top-level facades.
- Use Fable.Pyxpecto as the cross-target validation-package test model and keep
filesystem, ARC specification, and ControlledVocabulary functionality at the
.NET boundary.
- Restore shared `Setup`, `ARCValidationPackage`, and high-level `Execute` APIs,
including the complete validation pipeline and individual summary, JUnit,
and badge creation functions.
- Select frontmatter handling from the compilation target, including direct
support for Python `PACKAGE_METADATA`, without requiring authors to pass a
language discriminator.
- Add one cross-target `PackageArguments` API for the standard package
arguments and typed CWL inputs, rejecting reserved-name collisions and
unknown, duplicate, missing, or malformed arguments consistently.
- Accept native JSON-compatible payloads on each target while retaining Thoth
JSON as the shared output representation and rejecting non-finite numbers.
- Add optional source branch and commit provenance to summary JSON, JUnit
properties, and non-rendered SVG metadata.
- Preserve validation declaration order and exception stack traces in JUnit,
emit aggregate suite counts, validate decoded summary counts, and correct
default badge thresholds for failed, partial, and successful results.
- Depend on the native ValidationPackage.Model and ValidationPackage.Codecs
preview.4 distributions instead of bundling generated dependency copies.
- Align package-argument parsing with preview.4 CWL bindings: every declaration
has a non-empty prefix, booleans remain flags, and other values consume the
following process argument.
- Reuse the portable Model validator as the single declaration contract, give
declared prefixes precedence over optional long standard aliases, and retain
exact-token argument parsing on .NET, JavaScript, and Python.
- Keep the ARCExpect assembly identity aligned with its package version when it
is built through the CLI project graph.
- Use an absolute virtual-environment interpreter path for the packed Python
consumer so Linux loads the installed wheel.
- Add verified F# and Python validation-package guides with reproducibly
generated and formatted summary JSON, JUnit, and badge artifacts.
- Remove the unused ARCGraph, OboGraph, OBO.NET, Graphoscope, Cytoscape.NET, and
production Expecto compatibility functionality.
- Replace legacy token-based release targets with one verified artifact set
and independent NuGet, npm, and PyPI trusted-publishing jobs, so a registry
failure does not cancel publication to the other registries.
### 6.0.0 - (Released 2025-12-04)
- Support multiple programming languages
- Remove preview package APIs
### 5.0.1 - (Released 2025-09-26)
- Fix error with specification failing for multiple workflow files per workflow
- Update ORCID pattern and check functions
### 5.0.0 - (Released 2025-06-06)
- Add functionality to add arbitrary JSON payload to the resulting `validation_summary.json` file.
### 4.0.1 - (Released 2024-08-07)
- Add `ContainsNonKeyParamWithTerm` validation function
### 4.0.0 - (Released 2024-06-21)
- Support full semantic versions for ValidationPackageMetadata in the `ARCExpect` API.
- Use SemVer prerelease suffix for `arc_specification @2.0.0-draft_`
### 3.0.1 - (Released 2024-04-30)
Update pinned dependencies
### 3.0.0 - (Released 2024-04-30)
Remove separate `CQCHookEndpoint` because it is now directly contained in package metadata.
### 2.0.0 - (Released 2024-04-30)
Major rework and improvements of the **ARCExpect API**. The main changes are:
- Built-in mechanisms for validating ARCs against the ARC specification
- Built-in validation package to validate against ARC spec v2.0.0-draft
- **New Validate functions**:
- `SatisfiesPredicate` for `Param` and `ParamCollection`
- **New `Setup` and `Execute` functions**:
- `Setup` can be used in validation package code to aggregate package metadata, even from frontmatter yaml.
- `Execute` now creates a spec v2 compliant output folder with the junit report, badge, and a new json report.
- **Addition of `Validation Summary` output**:
- In addition to JUnit report and badge creation, a json file combining the test results and validation package metadata is created by `Execute.*` functions.
- This file is intended to be used for further processing of the validation results, e.g. in a CQC pipeline.
### 1.0.1 - (Released 2024-02-27)
Add Pipeline execution function that generates ARC-spec v2 draft compliant output folder.
### 1.0.0 - (Released 2024-01-12)
First release of ARCExpect API as a package. Initially, it was only used in the `arc-validate` CLI tool.
`ARCExpect` offers easy to use and understand APIs to create and execute validation cases. The main intention of this library is offering a framework for validation of [ControlledVocabulary](https://github.com/nfdi4plants/ARCTokenization) tokens in **Research Data management (RDM)** based on testing principles from the world of software development:
- a `validation case` is the equivalent of a unit test
- `Validate.*` functions are the equivalent of `Assert.*`, `Expect.*`, or equivalent functions
- A `BadgeCreation` API based on [AnyBadge.NET](https://github.com/kMutagene/AnyBadge.NET) enables creation of badges that visualize the validation results.
- export of the validation results as a `junit` xml file enables further integration into e.g. CI/CD pipelines
**User-facing APIs:**
- `Validate` :
- validate **ControlledVocabulary** tokens, e.g. for their compliance with a reference ontology or for the type and shape of annotated value
- `BadgeCreation`:
- Create and style small .svg images that visualize the validation results of a validation suite
**Additional APIs:**
- `OBOGraph`
- Create, complete, and query the graph representation of an ontology
- `ARCGraph`
- Create, complete, and query a graph of ControlledVocabulary tokens based on the relations in a reference ontology