Skip to content

Commit e8400d8

Browse files
committed
Add examples for Subject, Instrument.startDate, Instrument.endDate,
DataPublication.internalId, and FundingReference.acknowledgement to example data being used in the tests
1 parent cf15a73 commit e8400d8

5 files changed

Lines changed: 55 additions & 5 deletions

File tree

doc/examples/example_data.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ data_publications:
4040
facility: example_facility
4141
fundingReferences:
4242
- fund1
43+
internalId: qwa2-gc-v9lp
4344
pid: DOI:00.0815/pub-00027
4445
publicationDate: 2022-10-31
4546
relatedItems:
@@ -51,6 +52,14 @@ data_publications:
5152
relationType: References
5253
title: The positive integers
5354
subject: integer sequence; OEIS; On-Line Encyclopedia of Integer Sequences
55+
subjects:
56+
- name: Special sequences and polynomials
57+
subjectScheme: "Mathematics Subject Classification \u2013 MSC2020"
58+
schemeURI: https://zbmath.org/classification/
59+
classificationCode: 11B83
60+
- name: integer sequence
61+
- name: OEIS
62+
- name: On-Line Encyclopedia of Integer Sequences
5463
title: Data from OEIS sequence A000027
5564
type: curated
5665
users:
@@ -134,6 +143,10 @@ fundings:
134143
awardNumber: AIS3241330750
135144
funderIdentifier: Crossref Funder ID:10.13039/100005376
136145
funderName: American Mathematical Society
146+
acknowledgement: >-
147+
This work has partly been supported by American Mathematical
148+
Society under grant number AIS3241330750 which is greatfully
149+
acknowledged
137150
instruments:
138151
e2:
139152
description: >
@@ -146,6 +159,8 @@ instruments:
146159
instrumentscientist: acord
147160
name: E2
148161
pid: DOI:00.0815/inst-00001
162+
startDate: 2007-01-01
163+
endDate: 2019-12-31
149164
technique: ndiff
150165
type: null
151166
eddi:

doc/examples/icatdump-6.2.xml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<icatdata>
33
<head>
4-
<date>2025-08-01T13:09:01+00:00</date>
4+
<date>2025-08-01T14:50:40+00:00</date>
55
<service>https://icat.example.com:8181/ICATService/ICAT?wsdl</service>
66
<apiversion>6.2.0a1</apiversion>
7-
<generator>icatdump (python-icat 1.6.1.dev4)</generator>
7+
<generator>icatdump (python-icat 1.6.1.dev7)</generator>
88
</head>
99
<data>
1010
<user id="User_name-db=2Facord">
@@ -1091,9 +1091,11 @@
10911091
<instrument id="Instrument_facility-(name-ESNF)_name-E2">
10921092
<description>A 3-dimensional part of the reciprocal space can be scanned in less then five steps by combining the "off-plane Bragg-scattering" and the flat-cone layer concept while using a new computer-controlled tilting axis of the detector bank.
10931093
</description>
1094+
<endDate>2019-12-30T23:00:00+00:00</endDate>
10941095
<fullName>E2 - Flat-Cone Diffractometer</fullName>
10951096
<name>E2</name>
10961097
<pid>DOI:00.0815/inst-00001</pid>
1098+
<startDate>2006-12-31T23:00:00+00:00</startDate>
10971099
<facility ref="Facility_name-ESNF"/>
10981100
<instrumentScientists>
10991101
<user ref="User_name-db=2Facord"/>
@@ -1489,6 +1491,7 @@
14891491
</data>
14901492
<data>
14911493
<fundingReference id="FundingReference_funderName-American=20Mathematical=20Society_awardNumber-AIS3241330750">
1494+
<acknowledgement>This work has partly been supported by American Mathematical Society under grant number AIS3241330750 which is greatfully acknowledged</acknowledgement>
14921495
<awardNumber>AIS3241330750</awardNumber>
14931496
<funderIdentifier>Crossref Funder ID:10.13039/100005376</funderIdentifier>
14941497
<funderName>American Mathematical Society</funderName>
@@ -2049,6 +2052,7 @@
20492052
<data>
20502053
<dataPublication id="DataPublication_facility-(name-ESNF)_pid-DOI=3A00=2E0815=2Fpub=2D00027">
20512054
<description>We provide the first 65535 integers from sequence A000027 of the On-Line Encyclopedia of Integer Sequences. The data consists of an HDF5 file, having one single entry: a one dimensional integer array.</description>
2055+
<internalId>qwa2-gc-v9lp</internalId>
20522056
<pid>DOI:00.0815/pub-00027</pid>
20532057
<publicationDate>2022-10-30T23:00:00+00:00</publicationDate>
20542058
<subject>integer sequence; OEIS; On-Line Encyclopedia of Integer Sequences</subject>
@@ -2074,6 +2078,21 @@
20742078
<relationType>References</relationType>
20752079
<title>The positive integers</title>
20762080
</relatedItems>
2081+
<subjects>
2082+
<name>OEIS</name>
2083+
</subjects>
2084+
<subjects>
2085+
<name>On-Line Encyclopedia of Integer Sequences</name>
2086+
</subjects>
2087+
<subjects>
2088+
<classificationCode>11B83</classificationCode>
2089+
<name>Special sequences and polynomials</name>
2090+
<schemeURI>https://zbmath.org/classification/</schemeURI>
2091+
<subjectScheme>Mathematics Subject Classification &#8211; MSC2020</subjectScheme>
2092+
</subjects>
2093+
<subjects>
2094+
<name>integer sequence</name>
2095+
</subjects>
20772096
</dataPublication>
20782097
<dataPublicationUser id="DataPublicationUser_publication-(facility-(name-ESNF)_pid-DOI=3A00=2E0815=2Fpub=2D00027)_user-(name-db=2Fnbour)_contributorType-Creator">
20792098
<contributorType>Creator</contributorType>

doc/examples/icatdump-6.2.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
%YAML 1.1
2-
# Date: Fri, 01 Aug 2025 13:08:51 +0000
2+
# Date: Fri, 01 Aug 2025 14:50:35 +0000
33
# Service: https://icat.example.com:8181/ICATService/ICAT?wsdl
44
# ICAT-API: 6.2.0a1
5-
# Generator: icatdump (python-icat 1.6.1.dev4)
5+
# Generator: icatdump (python-icat 1.6.1.dev7)
66
---
77
grouping:
88
Grouping_name-ingest:
@@ -1114,12 +1114,14 @@ instrument:
11141114
bank.
11151115
11161116
'
1117+
endDate: '2019-12-30T23:00:00+00:00'
11171118
facility: Facility_name-ESNF
11181119
fullName: E2 - Flat-Cone Diffractometer
11191120
instrumentScientists:
11201121
- user: User_name-db=2Facord
11211122
name: E2
11221123
pid: DOI:00.0815/inst-00001
1124+
startDate: '2006-12-31T23:00:00+00:00'
11231125
Instrument_facility-(name-ESNF)_name-EDDI:
11241126
description: 'The experimental station EDDI (Energy Dispersive Diffraction) is
11251127
a fixed station at the 7T-MPW-EDDI beamline. The beamline provides the direct
@@ -1322,6 +1324,8 @@ technique:
13221324
---
13231325
fundingReference:
13241326
FundingReference_funderName-American=20Mathematical=20Society_awardNumber-AIS3241330750:
1327+
acknowledgement: This work has partly been supported by American Mathematical
1328+
Society under grant number AIS3241330750 which is greatfully acknowledged
13251329
awardNumber: AIS3241330750
13261330
funderIdentifier: Crossref Funder ID:10.13039/100005376
13271331
funderName: American Mathematical Society
@@ -1771,6 +1775,7 @@ dataPublication:
17711775
facility: Facility_name-ESNF
17721776
fundingReferences:
17731777
- funding: FundingReference_funderName-American=20Mathematical=20Society_awardNumber-AIS3241330750
1778+
internalId: qwa2-gc-v9lp
17741779
pid: DOI:00.0815/pub-00027
17751780
publicationDate: '2022-10-30T23:00:00+00:00'
17761781
relatedItems:
@@ -1781,6 +1786,14 @@ dataPublication:
17811786
relationType: References
17821787
title: The positive integers
17831788
subject: integer sequence; OEIS; On-Line Encyclopedia of Integer Sequences
1789+
subjects:
1790+
- name: OEIS
1791+
- name: On-Line Encyclopedia of Integer Sequences
1792+
- classificationCode: 11B83
1793+
name: Special sequences and polynomials
1794+
schemeURI: https://zbmath.org/classification/
1795+
subjectScheme: "Mathematics Subject Classification \u2013 MSC2020"
1796+
- name: integer sequence
17841797
title: Data from OEIS sequence A000027
17851798
type: DataPublicationType_facility-(name-ESNF)_name-curated
17861799
dataPublicationUser:

tests/data/summary-6.2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ SampleType : 3
5151
Shift : 4
5252
Study : 1
5353
StudyInvestigation : 2
54-
Subject : 0
54+
Subject : 4
5555
Technique : 4
5656
User : 11
5757
UserGroup : 19

tests/test_05_setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,9 @@ def test_add_data_publication(data, pubname):
318318
"name": "= '%s'" % t['name']
319319
})
320320
data_publication.type = client.assertedSearch(query)[0]
321+
if "subject" in client.typemap:
322+
for d in pubdata['subjects']:
323+
data_publication.subjects.append(client.new("Subject", **d))
321324
for d in pubdata['dates']:
322325
data_publication.dates.append(client.new("DataPublicationDate", **d))
323326
for ri in pubdata['relatedItems']:

0 commit comments

Comments
 (0)