Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update-repo-wrapper #437

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

update-repo-wrapper #437

wants to merge 1 commit into from

Conversation

joeflack4
Copy link
Contributor

resolves #435

Overview

Convenience command to automate some otherwise manual steps when running update_repo. Expected behavior is that it (i) temporarily updates the ODK_TAG used, and (ii) runs update_repo twice, until a fix for INCATools/ontology-development-kit#989 is in ODK.

Pre-merge checklist

  • Docs
    • docs/ have been added/updated OR
    • No updates to the docs necessary after careful consideration.
  • QC
    • sh run.sh make build-mondo-ingest has been run on this branch (after `docker pull obolibrary/odkfull:dev), and no errors occurred OR
    • No functional (code-related) changes to the pipeline are suggested, so no re-run is necessary.
  • Account for any new packages
  • Reviewed
    • Has been sufficiently reviewed by at least one review from a different team member of the Mondo Technical team.

Changes

  • Update: mondo-ingest.Makefile: Added goal 'update-repo-wrapper' to automate some steps required to run 'update_repo'.

- Update: mondo-ingest.Makefile: Added goal 'update-repo-wrapper' to automate some steps required to run 'update_repo'.
@@ -575,6 +575,20 @@ update-jinja-sparql-queries:
python3 $(SCRIPTSDIR)/ordo_mapping_annotations/create_sparql__ordo_replace_annotation_based_mappings.py
python3 $(SCRIPTSDIR)/ordo_mapping_annotations/create_sparql__ordo_mapping_annotations_violation.py

# update-repo-wrapper
UPDATE_REPO_ODK_TAG := latest
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UPDATE_REPO_ODK_TAG

Set to latest unless the user passes ODK_TAG, in which value is set to that.

ODK_TAG override usage:

  • Works: sh run.sh make ODK_TAG=v1.4.3 update-repo-wrapper
  • Fails: ODK_TAG=v1.4.3 sh run.sh make update-repo-wrapper. This doesn't cause the goal to fail, but the environmental variable doesn't get read.

endif

.PHONY: update-repo-wrapper
update-repo-wrapper:
Copy link
Contributor Author

@joeflack4 joeflack4 Feb 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update-repo-wrapper

  1. Temporarily updates run.sh.conf ODK_TAG to value of UPDATE_REPO_ODK_TAG
  2. Runs update_repo twice

I tested this out on a commit from before the merge of #432 today and confirmed that I got the expected behavior.

@@ -575,6 +575,20 @@ update-jinja-sparql-queries:
python3 $(SCRIPTSDIR)/ordo_mapping_annotations/create_sparql__ordo_replace_annotation_based_mappings.py
python3 $(SCRIPTSDIR)/ordo_mapping_annotations/create_sparql__ordo_mapping_annotations_violation.py

# update-repo-wrapper
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs

I like this solution. If you guys like it, too, I'll update docs to reference running update-repo-wrapper instead of update_repo:

  • add-new-source.md:
  • Other instances
    I haven't looked at these files before but there are references to update_repo in these.
    • RepoManagement.md
    • components.md
    • README-editors.md

Considering all the places where there are docs for update_repo, this reinforces my liking of this solution. Otherwise if we went with the SOP solution instead of this, we'd have to add cumbersome references to that in multiple places.

I can also add a goal description for it it in:

  • workflows.md
  • mondo-ingest.Makefile's help

@joeflack4 joeflack4 added bug Something isn't working enhancement New feature or request labels Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document SOP for updating the repo sh run.sh make update_repo
1 participant