Open jdangerx opened 8 months ago
Automatically adding the catalyst-cooperative
community would be great -- or maybe, add it if the previous version of the record was in the community. Right now the fact that a record is in a community doesn't seem to be inherited by subsequent versions which is very annoying, and leads to the most recent records often not showing up.
I notice that we do not list frictionless
as one of the dependencies in this module, but it does get installed, because we depend on catalystcoop.pudl
which depends on catalystcoop.ferc-xbrl-extractor
which depends on frictionless
.
We also don't use frictionless
in this package, even though we redefine (Pydantic) classes which mirror the Resource
and DataPackage
concepts. This seems like a recipe for ending up with outputs that look like data packages, but may or may not actually conform to the specification.
Ooooh yeah. I noticed that dependency funniness but did not connect the dots with "we don't actually use frictionless
for data packages." We definitely should update that - could be a separate PR, though.
According to email communications with Zenodo this API will not be launched for another year and it's behavior is expected to change. So let's pause on this.
See also https://github.com/catalyst-cooperative/pudl/issues/2939 -
Zenodo migrated to their new API, we need to use it if we want to keep creating new archives.
f"/records/{record_number}/files/{name}"
in the datapackage.jsonZenodoDepositor
frictionless>=5.0
?Some details on what the "correct endpoints" are: it seems like the basic "make a draft, edit it, publish it" flow is the same as before, which is good.
We have the existing operations defined on our
ZenodoDepositor
:create_deposition
- now create a draft recordget_deposition
- this gets the latest record associated with a concept DOI, we need to test if get a record works with concept DOIsget_record
- this just gets the single record associated with a DOI - so just get a recordget_new_version
: this makes a new draft, copies the files, and updates the version. Maybe we want to break out the end point hits in here into their own functions.edit a published record
actually makes a snapshot like we expect.publish_deposition
: publish a draft recorddelete_deposition
: delete / discard a draft recordcreate_file
: start draft file upload(s), upload a draft file's content, complete draft file uploaddelete_file
: delete a draft fileupdate_file
: this one is defined in terms ofcreate_file
andupdate_file
so I think we're good.Sandbox changes:
5281
prefix, and all sandbox archive DOI values have changed. These will need to be updated.