Skip to content

Commit 4b0cdca

Browse files
committed
use publication-blogpost as inveniordm type
1 parent d4a4543 commit 4b0cdca

File tree

5 files changed

+16
-15
lines changed

5 files changed

+16
-15
lines changed

commonmeta/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"""
1111

1212
__title__ = "commonmeta-py"
13-
__version__ = "0.77"
13+
__version__ = "0.78"
1414
__author__ = "Martin Fenner"
1515
__license__ = "MIT"
1616

commonmeta/constants.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ class Commonmeta(TypedDict):
244244
"conferencepaper": "ProceedingsArticle",
245245
"patent": "Patent",
246246
"publication": "JournalArticle",
247+
"publication-blogpost": "BlogPost",
247248
"publication-preprint": "Article",
248249
"report": "Report",
249250
"softwaredocumentation": "Software",
@@ -272,7 +273,7 @@ class Commonmeta(TypedDict):
272273

273274
CM_TO_INVENIORDM_TRANSLATIONS = {
274275
"Article": "publication-preprint",
275-
"BlogPost": "publication-preprint",
276+
"BlogPost": "publication-blogpost",
276277
"Book": "book",
277278
"Dataset": "dataset",
278279
"Image": "image-other",

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "commonmeta-py"
3-
version = "0.77"
3+
version = "0.78"
44
description = "Library for conversions to/from the Commonmeta scholarly metadata format"
55
authors = [{ name = "Martin Fenner", email = "[email protected]" }]
66
requires-python = ">=3.9,<4.0"

tests/test-inveniordm_writer.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def test_rogue_scholar():
158158

159159
inveniordm = json.loads(subject.write(to="inveniordm"))
160160
assert py_.get(inveniordm, "pids.doi.identifier") == "10.53731/dv8z6-a6s33"
161-
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-preprint"
161+
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-blogpost"
162162
assert len(py_.get(inveniordm, "metadata.creators")) == 1
163163
assert py_.get(inveniordm, "metadata.creators.0") == {
164164
"affiliations": [
@@ -231,7 +231,7 @@ def test_from_json_feed():
231231

232232
inveniordm = json.loads(subject.write(to="inveniordm"))
233233
assert py_.get(inveniordm, "pids.doi.identifier") == "10.59350/dn2mm-m9q51"
234-
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-preprint"
234+
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-blogpost"
235235
assert len(py_.get(inveniordm, "metadata.creators")) == 1
236236
assert py_.get(inveniordm, "metadata.creators.0") == {
237237
"person_or_org": {
@@ -298,7 +298,7 @@ def test_from_json_feed_affiliations():
298298

299299
inveniordm = json.loads(subject.write(to="inveniordm"))
300300
assert py_.get(inveniordm, "pids.doi.identifier") == "10.59350/mg09a-5ma64"
301-
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-preprint"
301+
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-blogpost"
302302
assert len(py_.get(inveniordm, "metadata.creators")) == 4
303303
assert py_.get(inveniordm, "metadata.creators.0") == {
304304
"person_or_org": {
@@ -381,7 +381,7 @@ def test_from_json_feed_dates():
381381

382382
inveniordm = json.loads(subject.write(to="inveniordm"))
383383
assert py_.get(inveniordm, "pids.doi.identifier") == "10.59350/k9zxj-pek64"
384-
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-preprint"
384+
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-blogpost"
385385
assert py_.get(inveniordm, "metadata.publication_date") == "2018-08-28"
386386
assert py_.get(inveniordm, "metadata.dates") == [
387387
{
@@ -411,7 +411,7 @@ def test_from_json_feed_funding():
411411

412412
inveniordm = json.loads(subject.write(to="inveniordm"))
413413
assert py_.get(inveniordm, "pids.doi.identifier") == "10.59350/hnegw-6rx17"
414-
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-preprint"
414+
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-blogpost"
415415
assert py_.get(inveniordm, "metadata.title") == "THOR Final Event programme is out!"
416416
assert py_.get(inveniordm, "metadata.funding") == [
417417
{
@@ -438,7 +438,7 @@ def test_from_json_feed_more_funding():
438438

439439
inveniordm = json.loads(subject.write(to="inveniordm"))
440440
assert py_.get(inveniordm, "pids.doi.identifier") == "10.59350/m99dx-x9g53"
441-
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-preprint"
441+
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-blogpost"
442442
assert (
443443
py_.get(inveniordm, "metadata.title") == "Summer Meeting of the Editorial Board"
444444
)
@@ -472,7 +472,7 @@ def test_from_json_feed_references():
472472
assert (
473473
py_.get(inveniordm, "pids.doi.identifier") == "10.53731/r79v4e1-97aq74v-ag578"
474474
)
475-
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-preprint"
475+
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-blogpost"
476476
assert (
477477
py_.get(inveniordm, "metadata.title")
478478
== "Differences between ORCID and DataCite Metadata"
@@ -518,7 +518,7 @@ def test_from_json_feed_unstructured_references():
518518
assert (
519519
py_.get(inveniordm, "pids.doi.identifier") == "10.59350/27ewm-zn378"
520520
)
521-
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-preprint"
521+
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-blogpost"
522522
assert (
523523
py_.get(inveniordm, "metadata.title")
524524
== "To what extent is science a strong-link problem?"
@@ -542,7 +542,7 @@ def test_from_json_feed_relations():
542542

543543
inveniordm = json.loads(subject.write(to="inveniordm"))
544544
assert py_.get(inveniordm, "pids.doi.identifier") == "10.54900/zg929-e9595"
545-
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-preprint"
545+
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-blogpost"
546546
assert py_.get(inveniordm, "metadata.title") == "Large Language Publishing"
547547
related_identifiers = py_.get(inveniordm, "metadata.related_identifiers")
548548
assert len(related_identifiers) == 1
@@ -570,7 +570,7 @@ def test_from_json_feed_broken_reference():
570570

571571
inveniordm = json.loads(subject.write(to="inveniordm"))
572572
assert py_.get(inveniordm, "pids.doi.identifier") == "10.59350/z78kb-qrz59"
573-
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-preprint"
573+
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-blogpost"
574574
assert (
575575
py_.get(inveniordm, "metadata.title")
576576
== "2024 mpox outbreak: common analytics tasks and available R tools"
@@ -594,7 +594,7 @@ def test_external_doi():
594594

595595
inveniordm = json.loads(subject.write(to="inveniordm"))
596596
assert py_.get(inveniordm, "pids.doi.identifier") == "10.57689/dini-blog.20210712"
597-
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-preprint"
597+
assert py_.get(inveniordm, "metadata.resource_type.id") == "publication-blogpost"
598598
assert (
599599
py_.get(inveniordm, "metadata.title")
600600
== "Eine Musterdienstvereinbarung fürs FIS – ein Beispiel der TIB"

uv.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)