Skip to content

Commit 39fb5f6

Browse files
authored
Merge pull request #11753 from IQSS/11747-review-dataset-type
Review Datasets
2 parents 2afc7bf + 4da6d9f commit 39fb5f6

32 files changed

Lines changed: 1639 additions & 65 deletions
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Highlights
2+
3+
### Review Datasets
4+
5+
Dataverse now supports review datasets, a type of dataset that can be used to review resources such as other datasets in the Dataverse installation itself or various resources in external data repositories. APIs and a new "review" metadata block (with an "Item Reviewed" field) are in place but the UI for this feature will only available in a future version of the new React-based [Dataverse Frontend](https://github.com/IQSS/dataverse-frontend). See also the [guides](https://dataverse-guide--11753.org.readthedocs.build/en/11753/api/native-api.html#add-dataset-type), #11747, #12015, #11887, #12115, and #11753.
6+
7+
## Other Features Added
8+
9+
- Citation Style Language (CSL) output now includes "type:software" or "type:review" when those dataset types are used. See the [guides](https://dataverse-guide--11753.org.readthedocs.build/en/11753/api/native-api.html#get-citation-in-other-formats) and #11753.
10+
11+
## Updated APIs
12+
13+
- The Change Collection Attributes API now supports `allowedDatasetTypes`. See the [guides](https://dataverse-guide--11753.org.readthedocs.build/en/11753/api/native-api.html#change-collection-attributes), #12115, and #11753.
14+
15+
## Bugs Fixed
16+
17+
- 500 error when deleting dataset type by name. See #11833 and #11753.
18+
- Dataset Type facet works in JSF but not the SPA. See #11758 and #11753.
19+
20+
## Backward Incompatible Changes
21+
22+
### Dataset Types Must Be Allowed, Per-Collection, Before Use
23+
24+
In previous releases of Dataverse, as soon as additional dataset types were added (such as "software", "workflow", etc.), they could be used by all users when creating datasets (via API only). As of this release, on a per-collection basis, superusers must allow these dataset types to be used. See #12115 and #11753.
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
{
2+
"datasetType": "review",
3+
"datasetVersion": {
4+
"license": {
5+
"name": "CC0 1.0",
6+
"uri": "http://creativecommons.org/publicdomain/zero/1.0"
7+
},
8+
"metadataBlocks": {
9+
"citation": {
10+
"fields": [
11+
{
12+
"typeName": "title",
13+
"value": "Review of Percent of Children That Have Asthma",
14+
"typeClass": "primitive",
15+
"multiple": false
16+
},
17+
{
18+
"value": [
19+
{
20+
"authorName": {
21+
"value": "Wazowski, Mike",
22+
"typeClass": "primitive",
23+
"multiple": false,
24+
"typeName": "authorName"
25+
}
26+
}
27+
],
28+
"typeClass": "compound",
29+
"multiple": true,
30+
"typeName": "author"
31+
},
32+
{
33+
"value": [
34+
{
35+
"datasetContactEmail": {
36+
"value": "mwazowski@mailinator.com",
37+
"typeClass": "primitive",
38+
"multiple": false,
39+
"typeName": "datasetContactEmail"
40+
}
41+
}
42+
],
43+
"typeClass": "compound",
44+
"multiple": true,
45+
"typeName": "datasetContact"
46+
},
47+
{
48+
"value": [
49+
{
50+
"dsDescriptionValue": {
51+
"value": "This is a review of a dataset.",
52+
"typeClass": "primitive",
53+
"multiple": false,
54+
"typeName": "dsDescriptionValue"
55+
}
56+
}
57+
],
58+
"typeClass": "compound",
59+
"multiple": true,
60+
"typeName": "dsDescription"
61+
},
62+
{
63+
"value": [
64+
"Medicine, Health and Life Sciences"
65+
],
66+
"typeClass": "controlledVocabulary",
67+
"multiple": true,
68+
"typeName": "subject"
69+
},
70+
{
71+
"value": {
72+
"itemReviewedUrl": {
73+
"value": "https://datacommons.org/tools/statvar#sv=Percent_Person_Children_WithAsthma",
74+
"typeClass": "primitive",
75+
"multiple": false,
76+
"typeName": "itemReviewedUrl"
77+
},
78+
"itemReviewedType": {
79+
"value": "Dataset",
80+
"typeClass": "controlledVocabulary",
81+
"multiple": false,
82+
"typeName": "itemReviewedType"
83+
},
84+
"itemReviewedCitation": {
85+
"value": "\"Statistical Variable Explorer - Data Commons.\" Datacommons.org, 2026, datacommons.org/tools/statvar#sv=Percent_Person_Children_WithAsthma. Accessed 9 Mar. 2026.",
86+
"typeClass": "primitive",
87+
"multiple": false,
88+
"typeName": "itemReviewedCitation"
89+
}
90+
},
91+
"typeClass": "compound",
92+
"multiple": false,
93+
"typeName": "itemReviewed"
94+
}
95+
]
96+
}
97+
}
98+
}
99+
}

doc/sphinx-guides/source/admin/dataverses-datasets.rst

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,64 @@ If the :AllowedCurationLabels setting has a value, one of the available choices
109109

110110
Individual datasets can be configured to use specific curationLabelSets as well. See the "Datasets" section below.
111111

112+
.. _review-datasets-setup:
113+
114+
Configure a Collection for Review Datasets
115+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
116+
117+
:ref:`review-datasets-user` are a specialized type of dataset that can be used to review resources (such as datasets) in the Dataverse installation itself or resources in external data repositories.
118+
119+
Review datasets require some setup, as described below.
120+
121+
Load the Review Metadata Block
122+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
123+
124+
First, download the Review metadata block tsv file from :ref:`experimental-metadata`.
125+
126+
Then, load the block and update Solr. See the following sections of :doc:`metadatacustomization` for details:
127+
128+
- :ref:`load-tsv`
129+
- :ref:`update-solr-schema`
130+
131+
Create and Enable Custom "Rubric" Metadata Blocks
132+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133+
134+
The Review metadata block gives you a few basic fields common to all reviews such as the URL of the item being reviewed.
135+
136+
You probably will want to create your own metadata blocks specific to the resources you are reviewing, your own "rubric". See :doc:`metadatacustomization` for details on creating and enabling custom metadata blocks.
137+
138+
Instead of creating a new custom metadata block from scratch (if you simply want to evaluate the feature, for example), you can use the metadata blocks at https://github.com/IQSS/dataverse.harvard.edu
139+
140+
After loading the block, don't forget to update the Solr schema!
141+
142+
Create a Review Dataset Type
143+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
144+
145+
Review datasets are built on the :ref:`dataset-types` feature. Dataset types can only be created via API so follow the steps under :ref:`api-add-dataset-type`. Copy and paste from below or download :download:`review.json <../../../../scripts/api/data/datasetTypes/review.json>` and pass it to the API.
146+
147+
.. literalinclude:: ../../../../scripts/api/data/datasetTypes/review.json
148+
:language: json
149+
150+
Create a Collection for Reviews and Configure Permissions
151+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
152+
153+
Follow the normal steps:
154+
155+
- :ref:`create-dataverse`.
156+
- :ref:`dataverse-permissions`.
157+
158+
Allow the Review Dataset Type for the Collection
159+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
160+
161+
Non-dataset types, such as the "review" type, are only available when a collection admin has enabled them, via API.
162+
163+
Using the API :ref:`collection-attributes-api`, change the ``allowedDatasetTypes`` attribute so that it includes "review". If you only want to allow reviews, you can pass just ``review``. If you want to allow multiple dataset types, you can pass a comma-separated list, such as ``review,dataset``.
164+
165+
Invite Users to Create Review Datasets
166+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
167+
168+
At this point, users should be able to create review datasets via API, if you gave them permission on the collection. You can point them to :ref:`creating-a-review-dataset` for details.
169+
112170
Datasets
113171
--------
114172

doc/sphinx-guides/source/admin/metadatacustomization.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,8 @@ Please note that metadata fields share a common namespace so they must be unique
444444

445445
We'll use this command again below to update the Solr schema to accomodate metadata fields we've added.
446446

447+
.. _load-tsv:
448+
447449
Loading TSV files into a Dataverse Installation
448450
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
449451

doc/sphinx-guides/source/api/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This API changelog is experimental and we would love feedback on its usefulness.
1010
v6.9
1111
----
1212

13+
- When creating datasets that contain a datasetType, that datasetType must be allowed at the collection level. This can be accomplished by passing ``allowedDatasetTypes`` to the :ref:`collection-attributes-api` API.
1314
- The POST /api/admin/makeDataCount/{id}/updateCitationsForDataset processing is now asynchronous and the response no longer includes the number of citations. The response can be OK if the request is queued or 503 if the queue is full (default queue size is 1000).
1415
- The way to set per-format size limits for tabular ingest has changed. JSON input is now used. See :ref:`:TabularIngestSizeLimit`.
1516
- In the past, the settings API would accept any key and value. This is no longer the case because validation has been added. See :ref:`settings_put_single`, for example.

doc/sphinx-guides/source/api/native-api.rst

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,8 +1015,8 @@ You should expect an HTTP 200 ("OK") response and JSON indicating the database I
10151015

10161016
.. _api-create-dataset-with-type:
10171017

1018-
Create a Dataset with a Dataset Type (Software, etc.)
1019-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1018+
Create a Dataset with a Dataset Type (Software, Workflow, Review, etc.)
1019+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10201020

10211021
By default, datasets are given the type "dataset" but if your installation had added additional types (see :ref:`api-add-dataset-type`), you can specify the type.
10221022

@@ -1070,8 +1070,8 @@ Before calling the API, make sure the data files referenced by the ``POST``\ ed
10701070

10711071
.. _import-dataset-with-type:
10721072

1073-
Import a Dataset with a Dataset Type (Software, etc.)
1074-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1073+
Import a Dataset with a Dataset Type (Software, Workflow, Review, etc.)
1074+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10751075

10761076
By default, datasets are given the type "dataset" but if your installation had added additional types (see :ref:`api-add-dataset-type`), you can specify the type.
10771077

@@ -1185,6 +1185,7 @@ The following attributes are supported:
11851185
* ``affiliation`` Affiliation
11861186
* ``filePIDsEnabled`` ("true" or "false") Restricted to use by superusers and only when the :ref:`:AllowEnablingFilePIDsPerCollection <:AllowEnablingFilePIDsPerCollection>` setting is true. Enables or disables registration of file-level PIDs in datasets within the collection (overriding the instance-wide setting).
11871187
* ``requireFilesToPublishDataset`` ("true" or "false") Restricted to use by superusers. Defines if Dataset needs files in order to be published. If not set the determination will be made through inheritance by checking the owners of this collection. Publishing by a superusers will not be blocked.
1188+
* ``allowedDatasetTypes`` Restricted to use by superusers. By default "dataset" is implied. Pass a comma-separated list of dataset types (e.g. "dataset,software"). You cannot unset this attribute so if you want to delete a dataset type, set ``allowedDatasetTypes`` to a dataset type you won't be deleting. See also :ref:`dataset-types`.
11881189

11891190
See also :ref:`update-dataverse-api`.
11901191

@@ -3966,11 +3967,13 @@ Usage example:
39663967
39673968
curl -H "Accept:application/json" "$SERVER_URL/api/datasets/:persistentId/versions/$VERSION/citation?persistentId=$PERSISTENT_IDENTIFIER&includeDeaccessioned=true"
39683969
3970+
.. _get-citation-in-other-formats:
3971+
39693972
Get Citation In Other Formats
39703973
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39713974

3972-
Dataverse can also generate dataset citations in "EndNote", "RIS", "BibTeX", and "CSLJson" formats.
3973-
Unlike the call above, which wraps the result in JSON, this API call sends the raw format with the appropriate content-type (EndNote is XML, RIS and BibTeX are plain text, and CSLJson is JSON). ("Internal" is also a valid value, returning the same content as the above call as HTML).
3975+
Dataverse can also generate dataset citations in "EndNote", "RIS", "BibTeX", and "CSL" formats.
3976+
Unlike the call above, which wraps the result in JSON, this API call sends the raw format with the appropriate content-type (EndNote is XML, RIS and BibTeX are plain text, and CSL is JSON). ("Internal" is also a valid value, returning the same content as the above call as HTML).
39743977
This API call adds a format parameter in the API call which can be any of the values listed above.
39753978

39763979
Usage example:
@@ -3994,6 +3997,7 @@ Usage example:
39943997
39953998
curl "$SERVER_URL/api/datasets/:persistentId/versions/$VERSION/citation/$FORMAT?persistentId=$PERSISTENT_IDENTIFIER&includeDeaccessioned=true"
39963999
4000+
The type under CSL can vary based on the dataset type, with "dataset", "software", and "review" as supported values. See also :ref:`dataset-types`.
39974001

39984002
Get Citation by Preview URL Token
39994003
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -4246,30 +4250,46 @@ The fully expanded example above (without environment variables) looks like this
42464250
Add Dataset Type
42474251
^^^^^^^^^^^^^^^^
42484252
4249-
Note: Before you add any types of your own, there should be a single type called "dataset". If you add "software" or "workflow", these types will be sent to DataCite (if you use DataCite). Otherwise, the only functionality you gain currently from adding types is an entry in the "Dataset Type" facet but be advised that if you add a type other than "software" or "workflow", you will need to add your new type to your Bundle.properties file for it to appear in Title Case rather than lower case in the "Dataset Type" facet.
4253+
The default dataset type is "dataset" and ships with Dataverse.
4254+
4255+
Only superusers can add additional dataset types. Once added, they can only be used if a collection has been configured to allow them (see ``allowedDatasetTypes`` under :ref:`collection-attributes-api`).
4256+
4257+
Here's an example of all available fields when creating a dataset type:
4258+
4259+
.. literalinclude:: ../../../../scripts/api/data/datasetTypes/datasetTypeAllFields.json
4260+
:language: json
42504261
4251-
With all that said, we'll add a "software" type in the example below. This API endpoint is superuser only. The "name" of a type cannot be only digits. Note that this endpoint also allows you to add metadata blocks and available licenses for your new dataset type by adding "linkedMetadataBlocks" and/or "availableLicenses" arrays to your JSON.
4262+
Here's a description of each field:
4263+
4264+
- ``name`` (required): Machine-readable name. Cannot be only digits.
4265+
- ``displayName`` (required): Human-readable name.
4266+
- ``description``: A description.
4267+
- ``linkedMetadataBlocks``: Linking a dataset type with one or more metadata blocks results in additional fields from those blocks appearing in the output from the :ref:`list-metadata-blocks-for-a-collection` API endpoint. Use the machine-readable names of the blocks. See :ref:`api-link-dataset-type` for details.
4268+
- ``availableLicenses``: Limits the dataset type to certain licenses. For example, a "software" dataset type could be limited to "MIT" and "Apache-2.0". See :ref:`dataset-types-set-available-licenses` for details.
4269+
4270+
Download the :download:`datasetTypeAllFields.json <../../../../scripts/api/data/datasetTypes/datasetTypeAllFields.json>` file show above, edit it to suit your needs, and use it in the following command.
42524271
42534272
.. code-block:: bash
42544273
42554274
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
42564275
export SERVER_URL=https://demo.dataverse.org
4257-
export JSON='{"name":"software","linkedMetadataBlocks":["codeMeta20"],"availableLicenses":["MIT", "Apache-2.0"]}'
42584276
4259-
curl -H "X-Dataverse-key:$API_TOKEN" -H "Content-Type: application/json" "$SERVER_URL/api/datasets/datasetTypes" -X POST -d $JSON
4277+
curl -H "X-Dataverse-key:$API_TOKEN" -H "Content-Type: application/json" "$SERVER_URL/api/datasets/datasetTypes" -X POST --upload-file datasetTypeAllFields.json
42604278
42614279
The fully expanded example above (without environment variables) looks like this:
42624280
42634281
.. code-block:: bash
42644282
4265-
curl -H "X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "Content-Type: application/json" "https://demo.dataverse.org/api/datasets/datasetTypes" -X POST -d '{"name":"software","linkedMetadataBlocks":["codeMeta20"],"availableLicenses":["MIT", "Apache-2.0"]}'
4283+
curl -H "X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "Content-Type: application/json" "https://demo.dataverse.org/api/datasets/datasetTypes" -X POST --upload-file datasetTypeAllFields.json
4284+
4285+
Note that adding certain dataset types will result in a value other than "Dataset" being sent to DataCite (if you use DataCite), see :ref:`dataset-types-datacite` for details.
42664286
42674287
.. _api-delete-dataset-type:
42684288
42694289
Delete Dataset Type
42704290
^^^^^^^^^^^^^^^^^^^
42714291
4272-
Superuser only.
4292+
Superuser only. Note that if a collection has the type listed as an allowed dataset type, you will be unable to delete the dataset type until you first use the :ref:`collection-attributes-api` to change ``allowedDatasetTypes`` to a dataset type (or dataset types) that you are not trying to delete.
42734293
42744294
.. code-block:: bash
42754295
@@ -4315,6 +4335,8 @@ To update the blocks that are linked, send an array with those blocks.
43154335
43164336
To remove all links to blocks, send an empty array.
43174337
4338+
.. _dataset-types-set-available-licenses:
4339+
43184340
Set Available Licenses for a Dataset Type
43194341
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43204342

doc/sphinx-guides/source/user/appendix.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ The Dataverse Project is committed to using standard-compliant metadata to ensur
1717
metadata can be mapped easily to standard metadata schemas and be exported into JSON
1818
format (XML for tabular file metadata) for preservation and interoperability.
1919

20+
.. _supported-metadata:
21+
2022
Supported Metadata
2123
~~~~~~~~~~~~~~~~~~
2224

@@ -34,6 +36,8 @@ Detailed below are what metadata schemas we support for Citation and Domain Spec
3436
- Journal Metadata (`see .tsv <https://github.com/IQSS/dataverse/blob/master/scripts/api/data/metadatablocks/journals.tsv>`__): based on the `Journal Archiving and Interchange Tag Set, version 1.2 <https://jats.nlm.nih.gov/archiving/tag-library/1.2/chapter/how-to-read.html>`__.
3537
- 3D Objects Metadata (`see .tsv <https://github.com/IQSS/dataverse/blob/master/scripts/api/data/metadatablocks/3d_objects.tsv>`__).
3638

39+
.. _experimental-metadata:
40+
3741
Experimental Metadata
3842
~~~~~~~~~~~~~~~~~~~~~
3943

@@ -43,6 +47,7 @@ Unlike supported metadata, experimental metadata is not enabled by default in a
4347
- Computational Workflow Metadata (`see .tsv <https://github.com/IQSS/dataverse/blob/master/scripts/api/data/metadatablocks/computational_workflow.tsv>`__): adapted from `Bioschemas Computational Workflow Profile, version 1.0 <https://bioschemas.org/profiles/ComputationalWorkflow/1.0-RELEASE>`__ and `Codemeta <https://codemeta.github.io/terms/>`__.
4448
- Archival Metadata (`see .tsv <https://github.com/IQSS/dataverse/blob/master/scripts/api/data/metadatablocks/archival.tsv>`__): Enables repositories to register metadata relating to the potential archiving of the dataset at a depositor archive, whether that be your own institutional archive or an external archive, i.e. a historical archive.
4549
- Local Contexts Metadata (`see .tsv <https://github.com/gdcc/dataverse-external-vocab-support/blob/main/packages/local_contexts/cvocLocalContexts.tsv>`__): Supports integration with the `Local Contexts <https://localcontexts.org/>`__ platform, enabling the use of Traditional Knowledge and Biocultural Labels, and Notices. For more information on setup and configuration, see :doc:`../installation/localcontexts`.
50+
- Review Metadata (`see .tsv <https://github.com/IQSS/dataverse/blob/master/scripts/api/data/metadatablocks/review.tsv>`__): For :ref:`review-datasets-user`.
4651

4752
Please note: these custom metadata schemas are not included in the Solr schema for indexing by default, you will need
4853
to add them as necessary for your custom metadata blocks. See "Update the Solr Schema" in :doc:`../admin/metadatacustomization`.

0 commit comments

Comments
 (0)