commonmeta-py 0.114__tar.gz → 0.115__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {commonmeta_py-0.114 → commonmeta_py-0.115}/PKG-INFO +1 -1
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/__init__.py +1 -1
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/writers/inveniordm_writer.py +16 -4
- {commonmeta_py-0.114 → commonmeta_py-0.115}/pyproject.toml +1 -1
- {commonmeta_py-0.114 → commonmeta_py-0.115}/.gitignore +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/LICENSE +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/README.md +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/api_utils.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/author_utils.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/base_utils.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/cli.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/constants.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/date_utils.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/doi_utils.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/file_utils.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/metadata.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/readers/__init__.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/readers/bibtex_reader.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/readers/cff_reader.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/readers/codemeta_reader.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/readers/commonmeta_reader.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/readers/crossref_reader.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/readers/crossref_xml_reader.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/readers/csl_reader.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/readers/datacite_reader.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/readers/datacite_xml_reader.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/readers/inveniordm_reader.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/readers/jsonfeed_reader.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/readers/kbase_reader.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/readers/openalex_reader.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/readers/ris_reader.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/readers/schema_org_reader.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/cff_v1.2.0.json +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/commonmeta_v0.12.json +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/commonmeta_v0.13.json +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/commonmeta_v0.14.json +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/commonmeta_v0.15.json +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/commonmeta_v0.16.json +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/AccessIndicators.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/JATS-journalpublishing1-3d2-mathml3-elements.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/JATS-journalpublishing1-3d2-mathml3.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/JATS-journalpublishing1-elements.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/JATS-journalpublishing1-mathml3-elements.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/JATS-journalpublishing1-mathml3.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/JATS-journalpublishing1.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/clinicaltrials.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/common5.4.0.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/crossref5.4.0.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/crossref_query_output3.0.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/doi_resources5.4.0.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/fundingdata5.4.0.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/fundref.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/languages5.4.0.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/mediatypes5.4.0.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/module-ali.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/relations.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/standard-modules/mathml3/mathml3-common.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/standard-modules/mathml3/mathml3-content.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/standard-modules/mathml3/mathml3-presentation.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/standard-modules/mathml3/mathml3-strict-content.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/standard-modules/mathml3/mathml3.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/standard-modules/mathml3/module-ali.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/standard-modules/module-ali.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/standard-modules/xlink.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/standard-modules/xml.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/xml.xsd +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref-v0.2.json +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/csl-data.json +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/datacite-v4.5.json +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/datacite-v4.5pr.json +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/spdx/licenses.json +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/spdx-schema.json +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/styles/apa.csl +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/styles/chicago-author-date.csl +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/styles/harvard-cite-them-right.csl +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/styles/ieee.csl +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/styles/modern-language-association.csl +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/styles/vancouver.csl +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/schema_utils.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/translators.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/utils.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/writers/__init__.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/writers/bibtex_writer.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/writers/citation_writer.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/writers/commonmeta_writer.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/writers/crossref_xml_writer.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/writers/csl_writer.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/writers/datacite_writer.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/writers/ris_writer.py +0 -0
- {commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/writers/schema_org_writer.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: commonmeta-py
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.115
|
4
4
|
Summary: Library for conversions to/from the Commonmeta scholarly metadata format
|
5
5
|
Project-URL: Homepage, https://python.commonmeta.org
|
6
6
|
Project-URL: Repository, https://github.com/front-matter/commonmeta-py
|
@@ -521,7 +521,13 @@ def create_draft_record(record, host, token, input):
|
|
521
521
|
response = requests.post(
|
522
522
|
f"https://{host}/api/records", headers=headers, json=input
|
523
523
|
)
|
524
|
-
response.
|
524
|
+
if response.status_code == 429:
|
525
|
+
record["status"] = "failed_rate_limited"
|
526
|
+
return record
|
527
|
+
if response.status_code != 201:
|
528
|
+
print(response.json())
|
529
|
+
record["status"] = "failed_create_draft"
|
530
|
+
return record
|
525
531
|
data = response.json()
|
526
532
|
record["id"]: data.get("id", None)
|
527
533
|
record["created"] = data.get("created", None)
|
@@ -544,8 +550,6 @@ def edit_published_record(record, host, token):
|
|
544
550
|
)
|
545
551
|
response.raise_for_status()
|
546
552
|
data = response.json()
|
547
|
-
record["doi"] = py_.get(data, "pids.doi.identifier")
|
548
|
-
record["created"] = data.get("created", None)
|
549
553
|
record["updated"] = data.get("updated", None)
|
550
554
|
record["status"] = "edited"
|
551
555
|
return record
|
@@ -581,12 +585,20 @@ def publish_draft_record(record, host, token):
|
|
581
585
|
"Authorization": f"Bearer {token}",
|
582
586
|
"Content-Type": "application/json",
|
583
587
|
}
|
588
|
+
if not record.get("id", None):
|
589
|
+
raise InvenioRDMError("Error publishing draft record")
|
584
590
|
try:
|
585
591
|
response = requests.post(
|
586
592
|
f"https://{host}/api/records/{record['id']}/draft/actions/publish",
|
587
593
|
headers=headers,
|
588
594
|
)
|
589
|
-
response.
|
595
|
+
if response.status_code == 429:
|
596
|
+
record["status"] = "failed_rate_limited"
|
597
|
+
return record
|
598
|
+
if response.status_code != 202:
|
599
|
+
print(response.json())
|
600
|
+
record["status"] = "failed_publish_draft"
|
601
|
+
return record
|
590
602
|
data = response.json()
|
591
603
|
record["uuid"] = py_.get(data, "metadata.identifiers.0.identifier")
|
592
604
|
record["created"] = data.get("created", None)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "commonmeta-py"
|
3
|
-
version = "0.
|
3
|
+
version = "0.115"
|
4
4
|
description = "Library for conversions to/from the Commonmeta scholarly metadata format"
|
5
5
|
authors = [{ name = "Martin Fenner", email = "martin@front-matter.io" }]
|
6
6
|
requires-python = ">=3.9,<4.0"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/AccessIndicators.xsd
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/clinicaltrials.xsd
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/doi_resources5.4.0.xsd
RENAMED
File without changes
|
{commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/fundingdata5.4.0.xsd
RENAMED
File without changes
|
File without changes
|
{commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/languages5.4.0.xsd
RENAMED
File without changes
|
{commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/mediatypes5.4.0.xsd
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/standard-modules/xlink.xsd
RENAMED
File without changes
|
{commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/crossref/standard-modules/xml.xsd
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/styles/chicago-author-date.csl
RENAMED
File without changes
|
{commonmeta_py-0.114 → commonmeta_py-0.115}/commonmeta/resources/styles/harvard-cite-them-right.csl
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|