facile_rs.run_experiments_pipeline¶
Create subpages for published experiments to a Grav CMS repository.
Description¶
This script creates subpages for an experiments page from experiments from a collection on Zenodo or published elsewhere with a DOI. It works together with https://git.opencarp.org/infrastructure/opencarp-grav-experiments-plugin to create an “experiments marketplace”.
The page need to be already existing in Grav and contain a pipeline field in their frontmatter. The script will
find all pages which match the provided PIPELINE and will add subpages to this page. The experiments themselves are
configured via the experiments object in the frontmatter of the page, e.g.:
locations: - ‘https://zenodo.org/api/communities/opencarp/records’ gitlab_groups: - ‘https://git.opencarp.org/api/v4/groups/153’ dois: - 10.35097/763 - 10.35097/606 - 10.35097/580 - 10.35097/1830 - 10.35097/qec954fvka86gcjw
Please refer to https://opencarp.org/community/community-experiments for an example setup.
Usage¶
usage: run_docstring_pipeline.py [-h] --grav-path GRAV_PATH --pipeline
PIPELINE --pipeline-source PIPELINE_SOURCE
[--pipeline-images PIPELINE_IMAGES]
[--pipeline-header PIPELINE_HEADER]
[--pipeline-footer PIPELINE_FOOTER]
[--pipeline-refs PIPELINE_REFS]
[--output-html]
[--mathjax-location MATHJAX_LOCATION]
[--log-level LOG_LEVEL] [--log-file LOG_FILE]
Named Arguments¶
- --grav-path
Path to the grav repository directory.
- --pipeline
Name of the pipeline as specified in the GRAV metadata.
- --pipeline-source
Path to the source directory for the pipeline.
- --pipeline-images
Path to the images directory for the pipeline.
- --pipeline-header
Path to the header template.
- --pipeline-footer
Path to the footer template.
- --pipeline-refs
Path to the refs yaml file.
- --output-html
Output HTML files instead of markdown
Default:
False- --mathjax-location
Location of the MathJax script for math rendering in HTML output. This option is only used if –output-html is set. Set to empty string to disable MathJax.
Default:
'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js'- --log-level
Log level (ERROR, WARN, INFO, or DEBUG)
Default:
'WARN'- --log-file
Path to the log file
Module Contents¶
Functions¶
Data¶
API¶
- logger = 'getLogger(...)'¶
- DATACITE_URL = 'https://api.datacite.org/dois/'¶
- DATACITE_HEADERS = None¶
- create_parser(add_help=True)¶
- main(args)¶
- get_datacite_title(metadata)¶
- get_datacite_description(metadata)¶
- get_datacite_publication_date(metadata)¶
- get_datacite_orcid(creator)¶
- get_datacite_license(metadata)¶