hed-standard / hed-schemas

Repository for HED schemas. The SCORE library for clinical annotations is now available.
https://hed-schemas.readthedocs.io/en/latest/
Creative Commons Attribution 4.0 International
1 stars 11 forks source link

Proposal strategy to merge prerelease schemas with ID's #184

Closed IanCa closed 2 months ago

IanCa commented 3 months ago

Kay and I discussed how to merge in new schema changes and add the ID's. Here's the tentative proposal:

How to merge in new schema changes(Users)

  1. Update/create a schema file in the prerelease folder in your fork.
    • This can be any of the schema forms(tsv, mediawiki, or xml. Mediawiki or tsv is expected)
  2. (Optional) Create a new branch on your fork as a backup if desired
  3. Create a pull request from your fork to hed-standard/hed-schemas@develop
    • Make sure you allow edits from maintainers on the PR
    • This triggers a github workflow that will make changes to the branch you pull from(It will generate the tsv, mediawiki, and xml formated files based off the one you changed)
    • You can continue to push changes to any of the schemas to update the PR, provided you only alter one(which will update the other formats).
    • You could instead allow actions on your fork, and do your own PR from one branch of your fork to another to trigger these actions instead, before creating the PR to our repo.
  4. Once the PR from 3 is finalized and approved, it's pulled into develop.

How to merge from develop to main(Admin) Note: Steps with *'s are candidates to be automated later, where you just click a "start merge develop" workflow to trigger the sequence, and 6/7 triggered by accepting the PR

  1. *Ensure any previous merge to main is complete
  2. *Delete the "provisional" branch if it still exists
  3. *Create a copy of the develop branch, named "provisional"
  4. *Create a pull request from provisional to main
    • This adds the hedID's to all terms/units/etc lacking them
    • This will verify all the schemas that were changed validate and match
    • It's okay if more than one schema changed on develop since the last pull to main(e.g. Standard and score both changed), but probably discouraged
  5. Verify the changes look right and approve the PR
  6. *Backport the changes to develop(via PR, deleting the branch and replacing with main, etc. Not sure the best way yet - probably PR or automated merge)
  7. *Delete the 'provisional' branch.

General notes: The reason for the provisional branch is to avoid adding hedIds directly to the develop branch in case the merge ultimately isn't approved at that point. Adding all the IDs on this final tentative merge ensures it's impossible to accidentally add terms with conflicting IDs in any automated merge situation.

Any schema change(prerelease or not) is validated. If you change multiple files(eg HED8.3.0.mediawiki and HED8.3.0.xml), it will not validate unless all versions of that schema exist and match after your changes. There should never be a reason to modify more than one at a time and this mostly will trigger on the automated updates.

VisLab commented 2 months ago

Now implemented in the upcoming release.