Skip to content

Commit

Permalink
Hack around problems with manual archive
Browse files Browse the repository at this point in the history
  • Loading branch information
zschira committed Feb 28, 2024
1 parent b6e8cca commit 5900d8e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/run-archiver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,7 @@ jobs:
strategy:
matrix:
dataset:
- eia176
- eia191
- eia757a
- eia860
- eia861
- eia860m
- eia923
- eia_bulk_elec
- epacamd_eia
- mshamines
- phmsagas
- ferceqr

fail-fast: false
runs-on: ubuntu-latest
Expand Down
7 changes: 6 additions & 1 deletion src/pudl_archiver/depositors/zenodo.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ async def get_deposition_by_id(self, rec_id: int) -> Deposition:
log_label=f"Get deposition for {rec_id}",
headers=self.auth_write,
)
if not response["metadata"].get("license"):
response["metadata"]["license"] = "other-pd"
deposition = Deposition(**response)
logger.debug(deposition)
return deposition
Expand Down Expand Up @@ -259,7 +261,10 @@ async def get_new_version(
for key, val in (base_metadata | draft_metadata).items()
if key not in {"doi", "prereserve_doi", "publication_date"}
}
base_version = semantic_version.Version(base_metadata["version"])
if base_metadata["version"] is None:
base_version = semantic_version.Version("1.0.0")
else:
base_version = semantic_version.Version(base_metadata["version"])
new_version = base_version.next_major()
metadata["version"] = str(new_version)
logging.info(f"{base_metadata=}\n{draft_metadata=}\n{metadata=}")
Expand Down

0 comments on commit 5900d8e

Please sign in to comment.