Skip to content

Commit f7e039f

Browse files
committed
Merge branch 'develop' into 10341-croissant #10341
2 parents 7f51e19 + ba0cdaf commit f7e039f

File tree

94 files changed

+2646
-582
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+2646
-582
lines changed

conf/solr/9.3.0/schema.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@
157157
<field name="publicationStatus" type="string" stored="true" indexed="true" multiValued="true"/>
158158
<field name="externalStatus" type="string" stored="true" indexed="true" multiValued="false"/>
159159
<field name="embargoEndDate" type="plong" stored="true" indexed="true" multiValued="false"/>
160-
160+
<field name="retentionEndDate" type="plong" stored="true" indexed="true" multiValued="false"/>
161+
161162
<field name="subtreePaths" type="string" stored="true" indexed="true" multiValued="true"/>
162163

163164
<field name="fileName" type="text_en" stored="true" indexed="true" multiValued="true"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Detection of mime-types based on a filename with extension and detection of the RO-Crate metadata files.
2+
3+
From now on, filenames with extensions can be added into `MimeTypeDetectionByFileName.properties` file. Filenames added there will take precedence over simply recognizing files by extensions. For example, two new filenames are added into that file:
4+
```
5+
ro-crate-metadata.json=application/ld+json; profile="http://www.w3.org/ns/json-ld#flattened http://www.w3.org/ns/json-ld#compacted https://w3id.org/ro/crate"
6+
ro-crate-metadata.jsonld=application/ld+json; profile="http://www.w3.org/ns/json-ld#flattened http://www.w3.org/ns/json-ld#compacted https://w3id.org/ro/crate"
7+
```
8+
9+
Therefore, files named `ro-crate-metadata.json` will be then detected as RO-Crated metadata files from now on, instead as generic `JSON` files.
10+
For more information on the RO-Crate specifications, see https://www.researchobject.org/ro-crate
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bug fixed for the ``incomplete metadata`` label being shown for published dataset with incomplete metadata in certain scenarios. This label will now be shown for draft versions of such datasets and published datasets that the user can edit. This label can also be made invisible for published datasets (regardless of edit rights) with the new option ``dataverse.ui.show-validity-label-when-published`` set to `false`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
A new file has been added to import the MIT License to Dataverse: licenseMIT.json.
2+
3+
Documentation has been added to explain the procedure for adding new licenses to the guides.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Changed ``api/dataverses/{id}/metadatablocks`` so that setting the query parameter ``onlyDisplayedOnCreate=true`` also returns metadata blocks with dataset field type input levels configured as required on the General Information page of the collection, in addition to the metadata blocks and their fields with the property ``displayOnCreate=true`` (which was the original behavior).
2+
3+
A new endpoint ``api/dataverses/{id}/inputLevels`` has been created for updating the dataset field type input levels of a collection via API.

doc/release-notes/6.2-release-notes.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -417,12 +417,16 @@ In the following commands we assume that Payara 6 is installed in `/usr/local/pa
417417

418418
As noted above, deployment of the war file might take several minutes due a database migration script required for the new storage quotas feature.
419419

420-
6\. Restart Payara
420+
6\. For installations with internationalization:
421+
422+
- Please remember to update translations via [Dataverse language packs](https://github.com/GlobalDataverseCommunityConsortium/dataverse-language-packs).
423+
424+
7\. Restart Payara
421425

422426
- `service payara stop`
423427
- `service payara start`
424428

425-
7\. Update the following Metadata Blocks to reflect the incremental improvements made to the handling of core metadata fields:
429+
8\. Update the following Metadata Blocks to reflect the incremental improvements made to the handling of core metadata fields:
426430

427431
```
428432
wget https://github.com/IQSS/dataverse/releases/download/v6.2/geospatial.tsv
@@ -442,7 +446,7 @@ wget https://github.com/IQSS/dataverse/releases/download/v6.2/biomedical.tsv
442446
curl http://localhost:8080/api/admin/datasetfield/load -H "Content-type: text/tab-separated-values" -X POST --upload-file scripts/api/data/metadatablocks/biomedical.tsv
443447
```
444448

445-
8\. For installations with custom or experimental metadata blocks:
449+
9\. For installations with custom or experimental metadata blocks:
446450

447451
- Stop Solr instance (usually `service solr stop`, depending on Solr installation/OS, see the [Installation Guide](https://guides.dataverse.org/en/6.2/installation/prerequisites.html#solr-init-script))
448452

@@ -455,7 +459,7 @@ curl http://localhost:8080/api/admin/datasetfield/load -H "Content-type: text/ta
455459
456460
- Restart Solr instance (usually `service solr restart` depending on solr/OS)
457461

458-
9\. Reindex Solr:
462+
10\. Reindex Solr:
459463

460464
For details, see https://guides.dataverse.org/en/6.2/admin/solr-search-index.html but here is the reindex command:
461465

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## Release Highlights
2+
3+
### Life Science Metadata
4+
5+
Re-adding value `cell counting` to Life Science metadatablock's Measurement Type vocabularies accidentally removed in `v5.1`.
6+
7+
## Upgrade Instructions
8+
9+
### Update the Life Science metadata block
10+
11+
- `wget https://github.com/IQSS/dataverse/releases/download/v6.3/biomedical.tsv`
12+
- `curl http://localhost:8080/api/admin/datasetfield/load -X POST --data-binary @biomedical.tsv -H "Content-type: text/tab-separated-values"`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Dataverse can now handle more than 50,000 items when generating sitemap files, splitting the content across multiple files to comply with the Sitemap protocol.
2+
3+
For details see https://dataverse-guide--10321.org.readthedocs.build/en/10321/installation/config.html#creating-a-sitemap-and-submitting-it-to-search-engines #8936 and #10321.
4+
5+
## Upgrade instructions
6+
7+
If your installation has more than 50,000 entries, you should re-submit your sitemap URL to Google or other search engines. The file in the URL will change from ``sitemap.xml`` to ``sitemap_index.xml``.
8+
9+
As explained at https://dataverse-guide--10321.org.readthedocs.build/en/10321/installation/config.html#creating-a-sitemap-and-submitting-it-to-search-engines this is the command for regenerating your sitemap:
10+
11+
`curl -X POST http://localhost:8080/api/admin/sitemap`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
The Dataverse Software now supports file-level retention periods. The ability to set retention periods, with a minimum duration (in months), can be configured by a Dataverse installation administrator. For more information, see the [Retention Periods section](https://guides.dataverse.org/en/6.3/user/dataset-management.html#retention-periods) of the Dataverse Software Guides.
2+
3+
- Users can configure a specific retention period, defined by an end date and a short reason, on a set of selected files or an individual file, by selecting the 'Retention Period' menu item and entering information in a popup dialog. Retention Periods can only be set, changed, or removed before a file has been published. After publication, only Dataverse installation administrators can make changes, using an API.
4+
5+
- After the retention period expires, files can not be previewed or downloaded (as if restricted, with no option to allow access requests). The file (landing) page and all the metadata remains available.
6+
7+
8+
Release notes should mention that a Solr schema update is needed.
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Release Highlights
2+
3+
### URL validation is more permissive
4+
5+
Url validation now allows two slashes in the path component of the URL. (#9750)
6+
Among other things, this allows metadata fields of `url` type to be filled with more complex url such as https://archive.softwareheritage.org/browse/directory/561bfe6698ca9e58b552b4eb4e56132cac41c6f9/?origin_url=https://github.com/gem-pasteur/macsyfinder&revision=868637fce184865d8e0436338af66a2648e8f6e1&snapshot=1bde3cb370766b10132c4e004c7cb377979928d1
7+

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

+76-3
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,46 @@ The following attributes are supported:
898898
* ``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).
899899

900900
.. _collection-storage-quotas:
901-
901+
902+
Update Collection Input Levels
903+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
904+
905+
Updates the dataset field type input levels in a collection.
906+
907+
Please note that this endpoint overwrites all the input levels of the collection page, so if you want to keep the existing ones, you will need to add them to the JSON request body.
908+
909+
If one of the input levels corresponds to a dataset field type belonging to a metadata block that does not exist in the collection, the metadata block will be added to the collection.
910+
911+
This endpoint expects a JSON with the following format::
912+
913+
[
914+
{
915+
"datasetFieldTypeName": "datasetFieldTypeName1",
916+
"required": true,
917+
"include": true
918+
},
919+
{
920+
"datasetFieldTypeName": "datasetFieldTypeName2",
921+
"required": true,
922+
"include": true
923+
}
924+
]
925+
926+
.. code-block:: bash
927+
928+
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
929+
export SERVER_URL=https://demo.dataverse.org
930+
export ID=root
931+
export JSON='[{"datasetFieldTypeName":"geographicCoverage", "required":true, "include":true}, {"datasetFieldTypeName":"country", "required":true, "include":true}]'
932+
933+
curl -X PUT -H "X-Dataverse-key: $API_TOKEN" -H "Content-Type:application/json" "$SERVER_URL/api/dataverses/$ID/inputLevels" -d "$JSON"
934+
935+
The fully expanded example above (without environment variables) looks like this:
936+
937+
.. code-block:: bash
938+
939+
curl -X PUT -H "X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "Content-Type:application/json" "https://demo.dataverse.org/api/dataverses/root/inputLevels" -d '[{"datasetFieldTypeName":"geographicCoverage", "required":true, "include":false}, {"datasetFieldTypeName":"country", "required":true, "include":false}]'
940+
902941
Collection Storage Quotas
903942
~~~~~~~~~~~~~~~~~~~~~~~~~
904943

@@ -1231,6 +1270,7 @@ File access filtering is also optionally supported. In particular, by the follow
12311270
* ``Restricted``
12321271
* ``EmbargoedThenRestricted``
12331272
* ``EmbargoedThenPublic``
1273+
* ``RetentionPeriodExpired``
12341274

12351275
If no filter is specified, the files will match all of the above categories.
12361276

@@ -1280,7 +1320,7 @@ The returned file counts are based on different criteria:
12801320
- Per content type
12811321
- Per category name
12821322
- Per tabular tag name
1283-
- Per access status (Possible values: Public, Restricted, EmbargoedThenRestricted, EmbargoedThenPublic)
1323+
- Per access status (Possible values: Public, Restricted, EmbargoedThenRestricted, EmbargoedThenPublic, RetentionPeriodExpired)
12841324

12851325
.. code-block:: bash
12861326
@@ -1334,6 +1374,7 @@ File access filtering is also optionally supported. In particular, by the follow
13341374
* ``Restricted``
13351375
* ``EmbargoedThenRestricted``
13361376
* ``EmbargoedThenPublic``
1377+
* ``RetentionPeriodExpired``
13371378

13381379
If no filter is specified, the files will match all of the above categories.
13391380

@@ -2149,6 +2190,7 @@ File access filtering is also optionally supported. In particular, by the follow
21492190
* ``Restricted``
21502191
* ``EmbargoedThenRestricted``
21512192
* ``EmbargoedThenPublic``
2193+
* ``RetentionPeriodExpired``
21522194

21532195
If no filter is specified, the files will match all of the above categories.
21542196

@@ -2586,7 +2628,38 @@ The API call requires a Json body that includes the list of the fileIds that the
25862628
export JSON='{"fileIds":[300,301]}'
25872629
25882630
curl -H "X-Dataverse-key: $API_TOKEN" -H "Content-Type:application/json" "$SERVER_URL/api/datasets/:persistentId/files/actions/:unset-embargo?persistentId=$PERSISTENT_IDENTIFIER" -d "$JSON"
2589-
2631+
2632+
Set a Retention Period on Files in a Dataset
2633+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2634+
2635+
``/api/datasets/$dataset-id/files/actions/:set-retention`` can be used to set a retention period on one or more files in a dataset. Retention periods can be set on files that are only in a draft dataset version (and are not in any previously published version) by anyone who can edit the dataset. The same API call can be used by a superuser to add a retention period to files that have already been released as part of a previously published dataset version.
2636+
2637+
The API call requires a Json body that includes the retention period's end date (dateUnavailable), a short reason (optional), and a list of the fileIds that the retention period should be set on. The dateUnavailable must be after the current date and the duration (dateUnavailable - today's date) must be larger than the value specified by the :ref:`:MinRetentionDurationInMonths` setting. All files listed must be in the specified dataset. For example:
2638+
2639+
.. code-block:: bash
2640+
2641+
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
2642+
export SERVER_URL=https://demo.dataverse.org
2643+
export PERSISTENT_IDENTIFIER=doi:10.5072/FK2/7U7YBV
2644+
export JSON='{"dateUnavailable":"2051-12-31", "reason":"Standard project retention period", "fileIds":[300,301,302]}'
2645+
2646+
curl -H "X-Dataverse-key: $API_TOKEN" -H "Content-Type:application/json" "$SERVER_URL/api/datasets/:persistentId/files/actions/:set-retention?persistentId=$PERSISTENT_IDENTIFIER" -d "$JSON"
2647+
2648+
Remove a Retention Period on Files in a Dataset
2649+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2650+
2651+
``/api/datasets/$dataset-id/files/actions/:unset-retention`` can be used to remove a retention period on one or more files in a dataset. Retention periods can be removed from files that are only in a draft dataset version (and are not in any previously published version) by anyone who can edit the dataset. The same API call can be used by a superuser to remove retention periods from files that have already been released as part of a previously published dataset version.
2652+
2653+
The API call requires a Json body that includes the list of the fileIds that the retention period should be removed from. All files listed must be in the specified dataset. For example:
2654+
2655+
.. code-block:: bash
2656+
2657+
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
2658+
export SERVER_URL=https://demo.dataverse.org
2659+
export PERSISTENT_IDENTIFIER=doi:10.5072/FK2/7U7YBV
2660+
export JSON='{"fileIds":[300,301]}'
2661+
2662+
curl -H "X-Dataverse-key: $API_TOKEN" -H "Content-Type:application/json" "$SERVER_URL/api/datasets/:persistentId/files/actions/:unset-retention?persistentId=$PERSISTENT_IDENTIFIER" -d "$JSON"
25902663
25912664
.. _Archival Status API:
25922665

doc/sphinx-guides/source/developers/coding-style.rst

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ Tabs vs. Spaces
1818

1919
Don't use tabs. Use 4 spaces.
2020

21+
Imports
22+
^^^^^^^
23+
24+
Wildcard imports are neither encouraged nor discouraged.
25+
2126
Braces Placement
2227
^^^^^^^^^^^^^^^^
2328

0 commit comments

Comments
 (0)