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

✨ shorter version for path-to-file in snapshot #3620

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

lucasrodes
Copy link
Member

@lucasrodes lucasrodes commented Nov 26, 2024

When creating default Snapshot steps with manual imports, we add the argument path_to_file to ingest local files.

@click.option("--path-to-file", prompt=True, type=str, help="Path to local data file.")
def main(upload: bool, path_to_file: str) -> None:
  ...

This is needed, and we should continue with this default. However, we could have an alternative and shorter argument name, e.g. -f, e.g.

@click.option("--path-to-file",  "-f", prompt=True, type=str, help="Path to local data file.")
def main(upload: bool, path_to_file: str) -> None:
  ...

@owidbot
Copy link
Contributor

owidbot commented Nov 26, 2024

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs

Login: ssh owid@staging-site-shorter-argument-name-snapshot

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-11-26 08:53:59 UTC
Execution time: 14.68 seconds

@lucasrodes lucasrodes marked this pull request as ready for review November 26, 2024 09:08
@lucasrodes lucasrodes requested a review from Marigold November 26, 2024 09:09
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.

Looks good!

@lucasrodes lucasrodes merged commit b161353 into master Nov 26, 2024
13 checks passed
@lucasrodes lucasrodes deleted the shorter-argument-name-snapshot branch November 26, 2024 09:40
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