bmir-radx / radx-project

This repo serves as a primary location for tracking issues that don't quite fit into our other dedicated repositories
0 stars 0 forks source link

Implement CEDAR Template GitHub Pipeline #102

Open yancao77 opened 5 months ago

yancao77 commented 5 months ago

We need to create a GitHub Actions workflow that automates the process of generating and managing CEDAR templates based on a primary template edited in a Google Sheet. After editing, at some point it should be possible to trigger a GitHub workflow in a repo that:

  1. Obtains a copy of the above google sheet as a CSV (there is a way of specifying a URL that can be resolved and the contents downloaded to do this)
  2. Commits the downloaded CSV to the GitHub repo
  3. Generates a CEDAR template, using CEDAR Cli (Yan)
  4. Commits the template to the GitHub repo
  5. Pushes the template to CEDAR
  6. Generates the documentation for the template using CEDAR CLI
  7. Commits the documentation to the gh_pages branch of the repo
  8. Updates the README.md for the repo that points to
    • The GoogleSheet,
    • The CEDAR Template in the Repo,
    • The CEDAR Template in CEDAR
    • The documentation URL
  9. Greate a GitHub release that tags the above
  10. It would excellent if a copy of the sheet could be made (in the Google Workbook) that was read only and was labeled with the semantic version corresponding to the GitHub release. This could be a fair bit of extra work though.
yancao77 commented 5 months ago

The updated workflow is:

  1. Uses CEDAR CLI to generate a CEDAR template, fields, elements, and documentation, and post them to CEDAR.
  2. Copies the generated template to the local repo, named RADxMetadataSpecification.json.
  3. Commits and pushes the template to the repo.
  4. Copies the generated docs to the local repo, named specification.md.
  5. Commits and pushes specification.md to the gh_pages branch of the repo.
  6. Manually triggers GitHub workflow, passing in:
    • Google Sheets ID (optional)
    • Google Sheets tab ID (required)
    • Template folder ID in CEDAR (required)
    • GitHub release version (optional)

Github Action workflow will:

You can find more details in the GitHub repo.