Skip to content

Commit ed8fd70

Browse files
committed
Merge branch 'develop' into 12258-publish-submit-contains-files
2 parents 9b1b478 + 5dc8b47 commit ed8fd70

30 files changed

Lines changed: 1047 additions & 102 deletions
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
### Croissant 1.1 (Summary Statistics)
2+
3+
The Croissant metadata export format has been updated from version 1.0 to 1.1.
4+
5+
Summary statistics (mean, min, max, etc.) are now included for tabular files that were successfully ingested.
6+
7+
You can download an example Croissant file from the [Supported Metadata Export Formats](https://dataverse-guide--12214.org.readthedocs.build/en/12214/user/dataset-management.html#supported-metadata-export-formats) section of the guides.
8+
9+
Minor backward-incompatible changes were made, which are noted below.
10+
11+
See #12014 and #12214
12+
13+
## Backward Incompatible Changes
14+
15+
Generally speaking, see the [API Changelog](https://guides.dataverse.org/en/latest/api/changelog.html) for a list of backward-incompatible API changes.
16+
17+
Minor changes in the `croissant` format are noted in the [API changelog](https://dataverse-guide--12214.org.readthedocs.build/en/12214/api/changelog.html).
18+
19+
## Upgrade Instructions
20+
21+
1. Re-export metadata export formats
22+
23+
We re-export because the Croissant format was updated.
24+
25+
`curl http://localhost:8080/api/admin/metadata/reExportAll`
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Incremental improvements have been made to the process of registering dataset metadata with DataCite. If your instance is using DataCite, please make sure you have a valid DataCite REST API url configured, since it is now required.
2+
3+
The JVM option(s) in question are `dataverse.pid.*.datacite.rest-api-url` if the recommended, new-style pid configuration is used, or `doi.dataciterestapiurlstring` if the legacy settings are in place. In the latter case however, this may be a good occasion to switch to the new configuration setup.
4+
5+
For instances using registered DataCite authorities in production the url should be:
6+
7+
```<jvm-options>-Ddataverse.pid.<providername>.datacite.rest-api-url=https://api.datacite.org</jvm-options>```
8+
9+
Or, for test and development instances:
10+
11+
```<jvm-options>-Ddataverse.pid.<providername>.datacite.rest-api-url=https://api.test.datacite.org</jvm-options>```
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
A new API endpoint for getting the default contributor role of a collection (`GET /api/dataverses/$ID/defaultContributorRole`) was added.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed a problem with S3 direct upload to datasets which using lower- or mixed-case PID authority/identifier in the database and to datasets using an alternative identifier for file storage.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ v6.11
1414

1515
- **/api/datasets/{Id}/submitForReview**
1616

17+
- The Croissant :ref:`metadata export format <metadata-export-formats>` has been updated from version 1.0 to 1.1, which is reflected in the ``conformsTo`` property. ``@vocab`` and ``sc`` properties now use "http" as `recommended <https://github.com/mlcommons/croissant/pull/929#pullrequestreview-3079137662>`_. The unused ``wd`` property has been dropped.
18+
1719
v6.10
1820
-----
1921
- The following GET APIs will now return ``400`` if a required Guestbook Response is not supplied. A Guestbook Response can be passed to these APIs in the JSON body using a POST call. See the notes under :ref:`basic-file-access` and :ref:`download-by-dataset-by-version` for details.

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

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ The fully expanded example above (without environment variables) looks like this
525525
Assign Default Role to User Creating a Dataset in a Dataverse Collection
526526
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
527527

528-
Assign a default role to a user creating a dataset in a Dataverse collection ``id`` where ``roleAlias`` is the database alias of the role to be assigned:
528+
Assign a default role to a user creating a dataset in a Dataverse collection ``id`` where ``roleAlias`` is the database alias of the role to be assigned (requires ``ManageDataversePermissions``):
529529

530530
.. code-block:: bash
531531
@@ -544,6 +544,27 @@ The fully expanded example above (without environment variables) looks like this
544544
545545
Note: You may use "none" as the ``ROLE_ALIAS``. This will prevent a user who creates a dataset from having any role on that dataset. It is not recommended for Dataverse collections with human contributors.
546546

547+
.. _get-default-contributor-role-on-a-dataverse-api:
548+
549+
Get Default Role Assigned to User Creating a Dataset in a Dataverse Collection
550+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
551+
552+
Get the default role that is assigned to a user creating a dataset in a Dataverse collection ``id`` (requires ``ManageDataversePermissions``):
553+
554+
.. code-block:: bash
555+
556+
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
557+
export SERVER_URL=https://demo.dataverse.org
558+
export ID=root
559+
560+
curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/dataverses/$ID/defaultContributorRole"
561+
562+
The fully expanded example above (without environment variables) looks like this:
563+
564+
.. code-block:: bash
565+
566+
curl -H "X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" "https://demo.dataverse.org/api/dataverses/root/defaultContributorRole"
567+
547568
.. _assign-role-on-a-dataverse-api:
548569

549570
Assign a New Role on a Dataverse Collection

doc/sphinx-guides/source/user/dataset-management.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Supported Metadata Export Formats
2828

2929
Once a dataset has been published, its metadata can be exported in a variety of other metadata standards and formats, which help make datasets more :doc:`discoverable </admin/discoverability>` and usable in other systems, such as other data repositories. On each dataset page's metadata tab, the following exports are available:
3030

31-
- Croissant
31+
- Croissant (example: :download:`max-croissant.json <../../../../src/test/resources/croissant/max/expected/max-croissant.json>`)
3232
- Dublin Core
3333
- DDI (Data Documentation Initiative Codebook 2.5)
3434
- DDI HTML Codebook (A more human-readable, HTML version of the DDI Codebook 2.5 metadata export)

src/main/java/edu/harvard/iq/dataverse/Dataset.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,10 @@ public String getIdentifierForFileStorage(){
662662
return retVal;
663663
}
664664

665+
public String getGlobalIdForFileStorageAsString() {
666+
return getProtocolForFileStorage() + ":" + getAuthorityForFileStorage() + "/" + getIdentifierForFileStorage();
667+
}
668+
665669
public String getNextMajorVersionString() {
666670
// Never need to get the next major version for harvested studies.
667671
if (isHarvested()) {

src/main/java/edu/harvard/iq/dataverse/EditDatafilesPage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1706,7 +1706,7 @@ public void requestDirectUploadUrls() {
17061706
String storageIdentifier = null;
17071707
try {
17081708
storageIdentifier = FileUtil.getStorageIdentifierFromLocation(s3io.getStorageLocation());
1709-
urls = s3io.generateTemporaryS3UploadUrls(dataset.getGlobalId().asString(), storageIdentifier, fileSize);
1709+
urls = s3io.generateTemporaryS3UploadUrls(dataset.getGlobalIdForFileStorageAsString(), storageIdentifier, fileSize);
17101710

17111711
} catch (IOException io) {
17121712
logger.warning(io.getMessage());

src/main/java/edu/harvard/iq/dataverse/api/Datasets.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2798,7 +2798,7 @@ public Response getMPUploadUrls(@Context ContainerRequestContext crc, @PathParam
27982798
String storageIdentifier = null;
27992799
try {
28002800
storageIdentifier = FileUtil.getStorageIdentifierFromLocation(s3io.getStorageLocation());
2801-
response = s3io.generateTemporaryS3UploadUrls(dataset.getGlobalId().asString(), storageIdentifier, fileSize);
2801+
response = s3io.generateTemporaryS3UploadUrls(dataset.getGlobalIdForFileStorageAsString(), storageIdentifier, fileSize);
28022802

28032803
} catch (IOException io) {
28042804
logger.warning(io.getMessage());

0 commit comments

Comments
 (0)