commonmeta-py 0.106__py3-none-any.whl → 0.108__py3-none-any.whl

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.
Files changed (48) hide show
  1. commonmeta/__init__.py +12 -3
  2. commonmeta/api_utils.py +3 -2
  3. commonmeta/base_utils.py +186 -3
  4. commonmeta/cli.py +114 -34
  5. commonmeta/constants.py +20 -0
  6. commonmeta/file_utils.py +112 -0
  7. commonmeta/metadata.py +102 -42
  8. commonmeta/readers/codemeta_reader.py +1 -1
  9. commonmeta/readers/crossref_reader.py +23 -10
  10. commonmeta/readers/crossref_xml_reader.py +1 -1
  11. commonmeta/readers/datacite_reader.py +6 -4
  12. commonmeta/readers/{json_feed_reader.py → jsonfeed_reader.py} +12 -12
  13. commonmeta/resources/crossref/common5.4.0.xsd +1264 -0
  14. commonmeta/resources/crossref/{crossref5.3.1.xsd → crossref5.4.0.xsd} +286 -88
  15. commonmeta/resources/crossref/doi_resources5.4.0.xsd +117 -0
  16. commonmeta/resources/crossref/fundingdata5.4.0.xsd +59 -0
  17. commonmeta/resources/crossref/fundref.xsd +29 -19
  18. commonmeta/resources/crossref/languages5.4.0.xsd +8119 -0
  19. commonmeta/resources/crossref/mediatypes5.4.0.xsd +2207 -0
  20. commonmeta/resources/crossref/module-ali.xsd +14 -6
  21. commonmeta/resources/crossref/standard-modules/mathml3/mathml3-common.xsd +101 -0
  22. commonmeta/resources/crossref/standard-modules/mathml3/mathml3-content.xsd +683 -0
  23. commonmeta/resources/crossref/standard-modules/mathml3/mathml3-presentation.xsd +2092 -0
  24. commonmeta/resources/crossref/standard-modules/mathml3/mathml3-strict-content.xsd +186 -0
  25. commonmeta/resources/crossref/standard-modules/mathml3/mathml3.xsd +9 -0
  26. commonmeta/resources/crossref/standard-modules/mathml3/module-ali.xsd +47 -0
  27. commonmeta/resources/crossref/standard-modules/module-ali.xsd +47 -0
  28. commonmeta/resources/crossref/standard-modules/xlink.xsd +100 -0
  29. commonmeta/resources/crossref/standard-modules/xml.xsd +287 -0
  30. commonmeta/resources/crossref/xml.xsd +287 -0
  31. commonmeta/schema_utils.py +25 -0
  32. commonmeta/utils.py +90 -15
  33. commonmeta/writers/bibtex_writer.py +5 -5
  34. commonmeta/writers/citation_writer.py +10 -5
  35. commonmeta/writers/commonmeta_writer.py +5 -17
  36. commonmeta/writers/crossref_xml_writer.py +1032 -4
  37. commonmeta/writers/csl_writer.py +6 -6
  38. commonmeta/writers/datacite_writer.py +11 -6
  39. commonmeta/writers/inveniordm_writer.py +286 -10
  40. commonmeta/writers/ris_writer.py +3 -3
  41. commonmeta/writers/schema_org_writer.py +10 -5
  42. {commonmeta_py-0.106.dist-info → commonmeta_py-0.108.dist-info}/METADATA +5 -2
  43. {commonmeta_py-0.106.dist-info → commonmeta_py-0.108.dist-info}/RECORD +46 -32
  44. commonmeta/crossref_utils.py +0 -583
  45. commonmeta/resources/crossref/common5.3.1.xsd +0 -1538
  46. {commonmeta_py-0.106.dist-info → commonmeta_py-0.108.dist-info}/WHEEL +0 -0
  47. {commonmeta_py-0.106.dist-info → commonmeta_py-0.108.dist-info}/entry_points.txt +0 -0
  48. {commonmeta_py-0.106.dist-info → commonmeta_py-0.108.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,117 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3
+ xmlns="http://www.crossref.org/doi_resources_schema/5.4.0"
4
+ targetNamespace="http://www.crossref.org/doi_resources_schema/5.4.0"
5
+ xmlns:fr5.4.0="http://www.crossref.org/fundingdata5.4.0.xsd"
6
+ xmlns:fr="http://www.crossref.org/fundref.xsd"
7
+ xmlns:ai="http://www.crossref.org/AccessIndicators.xsd"
8
+ xmlns:rel="http://www.crossref.org/relations.xsd"
9
+ xmlns:ct="http://www.crossref.org/clinicaltrials.xsd">
10
+
11
+ <!-- =============================================================
12
+ This is version 5.4.0 of the Crossref resource schema. It supports appending or updating select pieces of metadata to an existing DOI metadata record. Supported metadata includes:
13
+
14
+ - reference lists
15
+ - Crossmark metadata
16
+ - clinical trial data
17
+ - funding data
18
+ - multiple resolution URLs
19
+ - relationships
20
+ - license metadata
21
+
22
+ All changes are noted in the release notes for the schema repository in GitLab: https://gitlab.com/crossref/schema/-/releases
23
+
24
+ ============================================================= -->
25
+ <xsd:include schemaLocation="common5.4.0.xsd"/>
26
+ <xsd:import namespace="http://www.crossref.org/fundingdata5.4.0.xsd" schemaLocation="fundingdata5.4.0.xsd"/>
27
+ <xsd:import namespace="http://www.crossref.org/fundref.xsd" schemaLocation="fundref.xsd"/>
28
+ <xsd:import namespace="http://www.crossref.org/AccessIndicators.xsd" schemaLocation="AccessIndicators.xsd"/>
29
+ <xsd:import namespace="http://www.crossref.org/relations.xsd" schemaLocation="relations.xsd"/>
30
+ <xsd:import namespace="http://www.crossref.org/clinicaltrials.xsd" schemaLocation="clinicaltrials.xsd"/>
31
+ <xsd:element name="doi_batch">
32
+ <xsd:complexType>
33
+ <xsd:sequence>
34
+ <xsd:element ref="head"/>
35
+ <xsd:element ref="body"/>
36
+ </xsd:sequence>
37
+ <xsd:attribute name="version" type="xsd:string" fixed="5.4.0"/>
38
+ </xsd:complexType>
39
+ </xsd:element>
40
+ <xsd:element name="head">
41
+ <xsd:complexType>
42
+ <xsd:sequence>
43
+ <xsd:element ref="doi_batch_id"/>
44
+ <xsd:element ref="depositor"/>
45
+ </xsd:sequence>
46
+ </xsd:complexType>
47
+ </xsd:element>
48
+ <xsd:element name="body">
49
+ <xsd:complexType>
50
+ <xsd:sequence>
51
+ <xsd:element ref="doi_citations" minOccurs="0" maxOccurs="unbounded"/>
52
+ <xsd:element ref="doi_resources" minOccurs="0" maxOccurs="unbounded"/>
53
+ <xsd:element ref="crossmark_data" minOccurs="0" maxOccurs="unbounded"/>
54
+ <xsd:element ref="fundref_data" minOccurs="0" maxOccurs="unbounded"/>
55
+ <xsd:element ref="lic_ref_data" minOccurs="0" maxOccurs="unbounded"/>
56
+ <xsd:element ref="doi_relations" minOccurs="0" maxOccurs="unbounded"/>
57
+ <xsd:element ref="clinicaltrial_data" minOccurs="0" maxOccurs="unbounded"/>
58
+ </xsd:sequence>
59
+ </xsd:complexType>
60
+ </xsd:element>
61
+ <xsd:element name="doi_citations">
62
+ <xsd:complexType>
63
+ <xsd:sequence>
64
+ <xsd:element ref="doi"/>
65
+ <xsd:element ref="citation_list"/>
66
+ </xsd:sequence>
67
+ </xsd:complexType>
68
+ </xsd:element>
69
+ <xsd:element name="doi_resources">
70
+ <xsd:complexType>
71
+ <xsd:sequence>
72
+ <xsd:element ref="doi"/>
73
+ <xsd:element ref="collection"/>
74
+ </xsd:sequence>
75
+ </xsd:complexType>
76
+ </xsd:element>
77
+ <xsd:element name="crossmark_data">
78
+ <xsd:complexType>
79
+ <xsd:sequence>
80
+ <xsd:element ref="doi"/>
81
+ <xsd:element ref="crossmark"/>
82
+ </xsd:sequence>
83
+ </xsd:complexType>
84
+ </xsd:element>
85
+ <xsd:element name="fundref_data">
86
+ <xsd:complexType>
87
+ <xsd:sequence>
88
+ <xsd:element ref="doi"/>
89
+ <xsd:element ref="fr:program"/>
90
+ </xsd:sequence>
91
+ </xsd:complexType>
92
+ </xsd:element>
93
+ <xsd:element name="lic_ref_data">
94
+ <xsd:complexType>
95
+ <xsd:sequence>
96
+ <xsd:element ref="doi"/>
97
+ <xsd:element ref="ai:program"/>
98
+ </xsd:sequence>
99
+ </xsd:complexType>
100
+ </xsd:element>
101
+ <xsd:element name="doi_relations">
102
+ <xsd:complexType>
103
+ <xsd:sequence>
104
+ <xsd:element ref="doi"/>
105
+ <xsd:element ref="rel:program"/>
106
+ </xsd:sequence>
107
+ </xsd:complexType>
108
+ </xsd:element>
109
+ <xsd:element name="clinicaltrial_data">
110
+ <xsd:complexType>
111
+ <xsd:sequence>
112
+ <xsd:element ref="doi"/>
113
+ <xsd:element ref="ct:program"/>
114
+ </xsd:sequence>
115
+ </xsd:complexType>
116
+ </xsd:element>
117
+ </xsd:schema>
@@ -0,0 +1,59 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3
+ targetNamespace="http://www.crossref.org/fundingdata5.4.0.xsd"
4
+ xmlns="http://www.crossref.org/fundingdata5.4.0.xsd">
5
+
6
+ <!--=========Change History===========
7
+ 10/9/24 (PDF) added ror identifier
8
+ 5/2/13 (PDF) changed funding_identifier to award_number
9
+ 04/10/24 (PDF) added ror and grant_doi
10
+ -->
11
+
12
+ <xsd:element name="program">
13
+ <xsd:annotation>
14
+ <xsd:documentation>Information about registering funding data is available in our documentation: https://www.crossref.org/documentation/funder-registry/funding-data-deposits/</xsd:documentation>
15
+ </xsd:annotation>
16
+ <xsd:complexType>
17
+ <xsd:sequence>
18
+ <xsd:element ref="assertion" minOccurs="0" maxOccurs="unbounded"/>
19
+ </xsd:sequence>
20
+ <xsd:attribute name="name" type="xsd:string" fixed="fundref"/>
21
+ </xsd:complexType>
22
+ </xsd:element>
23
+ <xsd:element name="assertion">
24
+ <xsd:annotation>
25
+ <xsd:documentation>Funding data attributes included in assertion are:
26
+ * fundgroup: used to group funding info for items with multiple funding sources. Required for items with multiple award_number assertions, optional for items with a single award_number
27
+ * funder_identifier: funding agency identifier, must be nested within the funder_name assertion
28
+ * ror: ROR ID of a funder
29
+ * funder_name: name of the funding agency (required)
30
+ * award_number: grant number or other fund identifier
31
+ </xsd:documentation>
32
+ </xsd:annotation>
33
+ <xsd:complexType mixed="true">
34
+ <xsd:sequence>
35
+ <xsd:element ref="assertion" minOccurs="0" maxOccurs="unbounded"/>
36
+ </xsd:sequence>
37
+ <xsd:attribute name="provider" default="publisher">
38
+ <xsd:simpleType>
39
+ <xsd:restriction base="xsd:NMTOKEN">
40
+ <xsd:enumeration value="publisher"/>
41
+ <xsd:enumeration value="crossref"/>
42
+ </xsd:restriction>
43
+ </xsd:simpleType>
44
+ </xsd:attribute>
45
+ <xsd:attribute name="name" use="required">
46
+ <xsd:simpleType>
47
+ <xsd:restriction base="xsd:NMTOKEN">
48
+ <xsd:enumeration value="fundgroup"/>
49
+ <xsd:enumeration value="funder_identifier"/>
50
+ <xsd:enumeration value="ror"/>
51
+ <xsd:enumeration value="funder_name"/>
52
+ <xsd:enumeration value="award_number"/>
53
+ <!--<xsd:enumeration value="grant_doi"/> -->
54
+ </xsd:restriction>
55
+ </xsd:simpleType>
56
+ </xsd:attribute>
57
+ </xsd:complexType>
58
+ </xsd:element>
59
+ </xsd:schema>
@@ -1,14 +1,17 @@
1
- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.crossref.org/fundref.xsd" targetNamespace="http://www.crossref.org/fundref.xsd"><!-- =========Change History===========
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3
+ targetNamespace="http://www.crossref.org/fundref.xsd"
4
+ xmlns="http://www.crossref.org/fundref.xsd">
5
+
6
+ <!--=========Change History===========
7
+ 10/9/24 (PDF) added ror identifier
2
8
  5/2/13 (PDF) changed funding_identifier to award_number
3
- -->
9
+ 04/10/24 (PDF) added ror and grant_doi
10
+ -->
11
+
4
12
  <xsd:element name="program">
5
13
  <xsd:annotation>
6
- <xsd:documentation> FundRef documentation and examples: http://help.crossref.org/#fundref As part of CrossMark metadata, a deposit may contain what is called FundRef info. This details the funding behind a published article. The schema is a sequence of nested <assertion> tags. If a DOI is not participating in CrossMark, FundRef data may be deposited as part of the <journal_article> metadata. Note: Some rules will be enforced by the deposit logic (e.g. not the schema). FundRef data includes one or more award numbers (award_number), each of which may have one or more funders (funder_name). Each funder may have one or more optional identifiers (funder_identifier). A FundRef deposit begins with a <fr:program> tag within the <crossmark> structure (where fr is the namespace for the FundRef program). The <program> element is an implicit funder_group and will typically contain: A) one or more funder_name assertions and an award_number assertion. or B) one or more funder_group assertions where each funder_group should contain one or more funder_name assertions and at least one award_number assertion. Multiple &apos;award_number&apos;s may be included in a single program or fundgroup. Deposits without an award_number will be accepted, but award_number should be provided whenever possible. Items with several award numbers associated with a single funding organization should be grouped together by enclosing the &quot;funder_name&quot;, &quot;funder_identifier&quot;, and award_number(s) within a &quot;fundgroup&quot; assertion. </program>
7
- </crossmark>
8
- </fr:program>
9
- </journal_article>
10
- </assertion>
11
- </xsd:documentation>
14
+ <xsd:documentation>Information about registering funding data is available in our documentation: https://www.crossref.org/documentation/funder-registry/funding-data-deposits/</xsd:documentation>
12
15
  </xsd:annotation>
13
16
  <xsd:complexType>
14
17
  <xsd:sequence>
@@ -19,7 +22,13 @@
19
22
  </xsd:element>
20
23
  <xsd:element name="assertion">
21
24
  <xsd:annotation>
22
- <xsd:documentation>FundRef attributes included in assertion are: fundgroup: used to group funding info for items with multiple funding sources. Required for items with multiple award_number assertions, optional for items with a single award_number funder_identifier: funding agency identifier, must be nested within the funder_name assertion funder_name: name of the funding agency (required) award_number: grant number or other fund identifier</xsd:documentation>
25
+ <xsd:documentation>Funding data attributes included in assertion are:
26
+ * fundgroup: used to group funding info for items with multiple funding sources. Required for items with multiple award_number assertions, optional for items with a single award_number
27
+ * funder_identifier: funding agency identifier, must be nested within the funder_name assertion
28
+ * ror: ROR ID of a funder
29
+ * funder_name: name of the funding agency (required)
30
+ * award_number: grant number or other fund identifier
31
+ </xsd:documentation>
23
32
  </xsd:annotation>
24
33
  <xsd:complexType mixed="true">
25
34
  <xsd:sequence>
@@ -27,23 +36,24 @@
27
36
  </xsd:sequence>
28
37
  <xsd:attribute name="provider" default="publisher">
29
38
  <xsd:simpleType>
30
- <xsd:restriction base="xsd:NMTOKEN">
31
- <xsd:enumeration value="publisher"/>
32
- <xsd:enumeration value="crossref"/>
33
- </xsd:restriction>
39
+ <xsd:restriction base="xsd:NMTOKEN">
40
+ <xsd:enumeration value="publisher"/>
41
+ <xsd:enumeration value="crossref"/>
42
+ </xsd:restriction>
34
43
  </xsd:simpleType>
35
44
  </xsd:attribute>
36
45
  <xsd:attribute name="name" use="required">
37
46
  <xsd:simpleType>
38
47
  <xsd:restriction base="xsd:NMTOKEN">
39
- <xsd:enumeration value="fundgroup"/><!-- fundgroup: used to group funding info for items with multiple funding sources.
40
- Required for items with multiple award_number assertions, optional for items with a single award_number -->
41
- <xsd:enumeration value="funder_identifier"/><!-- funder_identifier: funding agency identifier, must be nested within the funder_name assertion -->
42
- <xsd:enumeration value="funder_name"/><!-- funder_name: name of the funding agency -->
43
- <xsd:enumeration value="award_number"/><!-- -award_number: grant number or other fund identifier -->
48
+ <xsd:enumeration value="fundgroup"/>
49
+ <xsd:enumeration value="funder_identifier"/>
50
+ <xsd:enumeration value="ror"/>
51
+ <xsd:enumeration value="funder_name"/>
52
+ <xsd:enumeration value="award_number"/>
53
+ <!--<xsd:enumeration value="grant_doi"/> -->
44
54
  </xsd:restriction>
45
55
  </xsd:simpleType>
46
56
  </xsd:attribute>
47
57
  </xsd:complexType>
48
58
  </xsd:element>
49
- </xsd:schema>
59
+ </xsd:schema>