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

Add exact-match to etlr options #3204

Merged
merged 1 commit into from
Aug 27, 2024
Merged

Conversation

pabloarosado
Copy link
Contributor

@pabloarosado pabloarosado commented Aug 27, 2024

Following the discussion in #3197 I think we should have an exact-match option in etlr, to run steps that happen to be substrings of other steps (e.g. data://grapher/war/2023-09-21/ucdp, substring of data://garden/war/2023-09-21/ucdp_prio).

Currently etlr data://garden/war/2023-09-21/ucdp --only --dry-run --force:

--- Would run 2 steps:
1. data://garden/war/2023-09-21/ucdp
2. data://garden/war/2023-09-21/ucdp_prio

And if you want to run only the desired step you need to do etlr data://garden/war/2023-09-21/ucdp$ --only --dry-run --force, which is a bit of a hack. To avoid such unexpected executions, users not only need to remember this hack, but also know that there are other steps that will be matched to the given argument.

Instead, this PR lets you do etlr data://garden/war/2023-09-21/ucdp --only --exact-match --dry-run --force:

--- Would run 1 steps:
1. data://garden/war/2023-09-21/ucdp

@pabloarosado pabloarosado self-assigned this Aug 27, 2024
@pabloarosado pabloarosado marked this pull request as ready for review August 27, 2024 08:24
@owidbot
Copy link
Contributor

owidbot commented Aug 27, 2024

Quick links (staging server):

Site Admin Wizard

Login: ssh owid@staging-site-add-exact-match-to-etlr

chart-diff: ✅ No charts for review.
data-diff: ✅ No differences found
Legend: +New  ~Modified  -Removed  =Identical  Details
Hint: Run this locally with etl diff REMOTE data/ --include yourdataset --verbose --snippet

Automatically updated datasets matching weekly_wildfires|excess_mortality|covid|fluid|flunet|country_profile|garden/ihme_gbd/2019/gbd_risk are not included

Edited: 2024-08-27 08:26:28 UTC
Execution time: 12.38 seconds

Copy link
Collaborator

@Marigold Marigold left a comment

Choose a reason for hiding this comment

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

The PR looks good, but I wouldn't say that using $ is a hack :).

@pabloarosado pabloarosado merged commit e796983 into master Aug 27, 2024
16 checks passed
@pabloarosado pabloarosado deleted the add-exact-match-to-etlr branch August 27, 2024 09:43
Marigold pushed a commit that referenced this pull request Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants