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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/ontology/mondo-ingest.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

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.

ifdef ODK_TAG
UPDATE_REPO_ODK_TAG := $(ODK_TAG)
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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@matentzn But perhaps I should drop the 2nd run of update_repo. Have you found recently that you still need to do this? I haven't seen any difference after running it a 2nd time in the last year or more.

@sed -i.bak '/^ODK_TAG=/s/.*/ODK_TAG=${UPDATE_REPO_ODK_TAG}/' run.sh.conf
-$(MAKE) update_repo
-$(MAKE) update_repo
@mv run.sh.conf.bak run.sh.conf


#############################
########### Help ############
#############################
Expand Down