Automatic building of a Docker container for exporting ARCs to various other ARC representations
use VS or VSCode tooling or run dotnet build or dotnet test from the command line.
This repo uses external arcs as fixtures to create and test the output. These are referenced as git submodules in /tests/fixtures.
To clone the repo with the submodules, use the following command:
git clone --recurse-submodulesIf you have already cloned the repo, you can initialize the submodules with the following commands:
git submodule init
git submodule updateNote that the submodules are set on a specific commit, so do not update them.
To execute the tests run:
dotnet testThis assumes you have the git submodules cloned as described in the test section.
dotnet run --project ./src/arc-export/arc-export.fsproj -- -p ./tests/fixtures/ArcPrototype/ -f rocrate-metadata -f isa-json -f summary-markdowndocker build . -t arc-export
docker run -v C:\Repos\ArcRepo:/arc arc-export:latest /arc-export -p arcdocker pull ghcr.io/nfdi4plants/arc-export:main
docker run -v C:\Repos\ArcRepo:/arc ghcr.io/nfdi4plants/arc-export:main /arc-export -p arcThe following command executed from within the ARC (./) creates all three output files in a folder (arc-export) inside the ARC.
docker run --rm -v ./:/arc ghcr.io/nfdi4plants/arc-export:main /arc-export -p arc -f rocrate-metadata -f isa-json -f summary-markdown -o arc/arc-exportOutput format can be specified with the -f flag, followed by one of the following:
isa-jsonwill produce anarc-isa.jsonfile following the ISA-JSON specificationrocrate-metadatawill produce anarc-ro-crate-metadata.jsonfile following the ARC RO-Crate profilesummary-markdownwill produce anarc-summary.mdfile- (experimental)
rocrate-metadata-lfswill produce anarc-ro-crate-metadata.jsonfile following the ARC RO-Crate profile, where all objects of typeFilewhich are tracked by git-lfs additionally contain the according SHA256 hash
E.g.
docker run -v C:\Repos\ArcRepo:/arc arc-export:latest /arc-export -p arc -f rocrate-metadata -f isa-json -f summary-markdownwill produce all three basic output files.
USAGE: arc-export [--help] --arc-directory <path> [--out-directory <path>]
[--output-format <isa-json|rocrate-metadata|rocrate-metadata-lfs|summary-markdown>]
OPTIONS:
--arc-directory, -p <path>
Specify a directory that contains the arc to convert.
--out-directory, -o <path>
Optional. Specify a output directory for the invenio metadata record.
--output-format, -f <isa-json|rocrate-metadata|summary-markdown>
Optional. Specify the output format. Default is ISA-JSON.
--help display this list of options.