Skip to content

Allow to test against custom bids-specification and bids-examples PR(s) #121

Open
@yarikoptic

Description

@yarikoptic

Relates in a spirit of improving integration between PRs to bids examples, validator and specification itself:

with a relatively simple use-case of e.g.

where we need to pair that PR with changes in a PR against validator and ensure that all is good.

And larger one could be the

which would ideally require synchronization of PRs across all 3 repositories.

So I am thinking the best would be to

  1. develop a reusable github action, which would be able to extract parameters from the PR description and expose them to the next steps in the workflow, may be even shortcutting into env vars right away.
  2. adjust workflow here to use that github action and
    • if PR against bids-specification provided -- compile (into json) and use that schema
    • if PR against bids-examples provided -- test against those examples.

Could also allow for direct custom specification of the BIDS_SCHEMA to point to some "alternative" implementation to try.

action specification/invocation for those examples could be smth like when PR description has

### Custom settings

Lines starting with `-` would define env variables to define

- BIDS_PR=https://github.com/bids-standard/bids-specification/pull/1775
- EXAMPLES_PR=https://github.com/bids-standard/bids-examples/pull/777
- BIDS_SCHEMA=https://example.com/somewhere/schema.json
      - uses: bids-standard/get-spec-from-PR-body@v1
        with:
          section: Custom settings
          # optionally -- specify explicitly which to care about and error out if something else is defined
          envvars: [ 'BIDS_SCHEMA' , `EXAMPLES_PR`, `BIDS_PR`]

and those envvars would be added to $GITHUB_ENV thus making them available in the next steps to potentially augment their behavior right away (e.g. as it should be with BIDS_SCHEMA I think) or to be scripted

WDYT?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions