Skip to content

Commit

Permalink
Hard-code record IDs based on sandbox/production
Browse files Browse the repository at this point in the history
  • Loading branch information
jdangerx committed Dec 13, 2023
1 parent f4e28d8 commit 8e88c26
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions devtools/zenodo/zenodo_data_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,6 @@ def get_html_url(self):
help="Whether to use the Zenodo sandbox server (for testing) or the production server.",
show_default=True,
)
@click.option(
"--rec-id",
type=int,
required=True,
help="Record ID of the Zenodo archive to create a new version of.",
)
@click.option(
"--source-dir",
type=click.Path(
Expand All @@ -349,11 +343,17 @@ def get_html_url(self):
help="Whether to publish the new record without confirmation, or leave it as a draft to be reviewed.",
show_default=True,
)
def pudl_zenodo_data_release(env: str, rec_id: int, source_dir: Path, publish: bool):
def pudl_zenodo_data_release(env: str, source_dir: Path, publish: bool):
"""Publish a new PUDL data release to Zenodo."""
# TODO (daz): if the source-dir is actually an S3 or GCS uri, then, well. Do that instead.
source_data = LocalSource(path=source_dir)
zenodo_client = ZenodoClient(env)
if env == SANDBOX:
rec_id = 5563
elif env == PRODUCTION:
rec_id = 3653158
else:
raise ValueError(f"{env=}, expected {SANDBOX} or {PRODUCTION}")
completed_draft = (
InitialDataset(zenodo_client=zenodo_client, record_id=rec_id)
.get_empty_draft()
Expand Down

0 comments on commit 8e88c26

Please sign in to comment.