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

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.

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.

@@ -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
Copy link
Contributor

@twhetzel twhetzel left a comment

Choose a reason for hiding this comment

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

I have to defer this review and whether this is needed (at all and/or for the January release) to @matentzn.

Does this PR close all tasks in #435?

@twhetzel twhetzel changed the base branch from main to develop December 4, 2024 01:43
@joeflack4
Copy link
Contributor Author

joeflack4 commented Dec 4, 2024

Definitely not needed for the January release. It's just quality of life.

It doesn't address the subtasks in #435, but it obsoletes it and is supposed to replace it with something better: a command instead of an SOP.

@matentzn
Copy link
Member

matentzn commented Dec 6, 2024

There has been a recent development that makes this PR obsolete: The ODK runner: https://github.com/gouttegd/odkrunner

I am using it only now for interacting with ODK, and it will get rid of any issues, especially running the update multiple times etc.. Just install it and from then on:

odk make xyz instead of sh run.sh make xyz, and it will still recognise run.sh.conf!

@twhetzel
Copy link
Contributor

twhetzel commented Dec 6, 2024

Sounds like this PR is not needed now. Documenting the steps (now using the ODK runner) sounds like that is still needed so as this is done in #435 and the process tested we can check then if it's meeting all the needs that this PR aimed to address.

@twhetzel twhetzel closed this Dec 6, 2024
@joeflack4 joeflack4 deleted the update-repo-wrapper branch December 6, 2024 22:03
@joeflack4
Copy link
Contributor Author

Oh, that looks very nice.

@joeflack4 joeflack4 mentioned this pull request Dec 6, 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
3 participants