In the CLI (Git Bash / Terminal):
git clone <URL>
cd HDR-RO-Crate-Toolkits
Install the project in a virtual environment.
python3 -m venv <virtual_environment_name>
source <virtual_environment_name>/bin/activate
python -m pip install -e .
python3 -m venv <virtual_environment_name>
<virtual_environment_name>\Scripts\activate
python -m pip install -e .
This installs:
- the package itself
- the
rocrate-to-tesCLI - the development dependency
pytest
NOTE: For development work you may want to run
python -m pip install -e ".[dev]"
instead, which also installs the development dependency pytest.
Make a copy of env.template, rename it to .env and populate the variables.
Required variables:
CRATEY_VALIDATOR_API_URL: The URL for the ro-crate validation service. This ishttp://localhost:5001for the demonstration 5S-TES stack.TES_SUBMISSION_API_URL: The URL for the 5S-TES submission API. This ishttp://localhost:5034for the demonstration 5S-TES stack.TES_SUBMISSION_API_TOKEN: The API token for accessing the 5S-TES submission API. This can be obtained from the submission layer webpage.
pytest -q
The rocrate-to-tes command accepts:
- a path to
ro-crate-metadata.json - a path to a directory containing
ro-crate-metadata.json - a path to a ZIP-packaged RO-Crate containing
ro-crate-metadata.json
rocrate-to-tes ro-crate-metadata.json
Examples:
rocrate-to-tes /path/to/ro-crate-metadata.json
rocrate-to-tes /path/to/ro-crate-directory
rocrate-to-tes /path/to/ro-crate.zip
If the tool runs successfully it should print the following information to the terminal:
- 'Validation passed' status, either True or False
- The TES message, as formatted JSON
- The 5S-TES response message, as formatted JSON, which contains the project and task ID's.