Skip to content

Commit c24b224

Browse files
committed
Merge remote-tracking branch 'IQSS/develop' into QDR-solr_and_libs_updates
2 parents ff197e5 + b0d136c commit c24b224

File tree

24 files changed

+673
-49
lines changed

24 files changed

+673
-49
lines changed

.github/workflows/copy_labels.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Copy labels from issue to pull request
2+
3+
on:
4+
pull_request:
5+
types: [opened]
6+
7+
jobs:
8+
copy-labels:
9+
runs-on: ubuntu-latest
10+
name: Copy labels from linked issues
11+
steps:
12+
- name: copy-labels
13+
uses: michalvankodev/copy-issue-labels@v1.3.0
14+
with:
15+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/deploy_beta_testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
overwrite: true
6969

7070
- name: Execute payara war deployment remotely
71-
uses: appleboy/ssh-action@v1.2.0
71+
uses: appleboy/ssh-action@v1.2.1
7272
env:
7373
INPUT_WAR_FILE: ${{ env.war_file }}
7474
with:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The [tutorial](https://dataverse-guide--11201.org.readthedocs.build/en/11201/container/running/demo.html#root-collection-customization-alias-name-etc) on running Dataverse in Docker has been updated to explain how to configure the root collection using a JSON file. See also #10541 and #11201.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
### Bug fix: Sorting by "newest first"
2+
3+
Fixed an issue where draft versions of datasets were sorted using the release timestamp of their most recent major version.
4+
This caused newer drafts to appear incorrectly alongside their corresponding major version, instead of at the top, when sorted by "newest first".
5+
Sorting now uses the last update timestamp when sorting draft datasets.
6+
The sorting behavior of published dataset versions (major and minor) is unchanged.
7+
8+
**Upgrade instructions**: draft datasets must be reindexed for this fix to take effect.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
A new /api/datasets/{id}/deleteFiles call has beed added to the API, allowing delete of multiple file from the latest version of a dataset in one operation.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added a new query param, ``returnChildCount``, to getDataverse endpoint(``/api/dataverses/<ID>``) for optionally retrieving the child count, which represents the number of dataverses, datasets, or files within the dataverse.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
When a dataset has a long running lock, including when it is 'in review', Dataverse will now slow the page refresh rate over time.

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

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,15 @@ Usage example:
177177
178178
curl "https://demo.dataverse.org/api/dataverses/root?returnOwners=true"
179179
180+
If you want to include the child count of the Dataverse, which represents the number of dataverses, datasets, or files within the dataverse, you must set ``returnChildCount`` query parameter to ``true``.
181+
182+
Usage example:
183+
184+
.. code-block:: bash
185+
186+
curl "https://demo.dataverse.org/api/dataverses/root?returnChildCount=true"
187+
188+
180189
To view an unpublished Dataverse collection:
181190

182191
.. code-block:: bash
@@ -3544,6 +3553,39 @@ To update the blocks that are linked, send an array with those blocks.
35443553
35453554
To remove all links to blocks, send an empty array.
35463555
3556+
Delete Files from a Dataset
3557+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
3558+
3559+
Delete files from a dataset. This API call allows you to delete multiple files from a dataset in a single operation.
3560+
3561+
.. code-block:: bash
3562+
3563+
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
3564+
export SERVER_URL=https://demo.dataverse.org
3565+
export PERSISTENT_IDENTIFIER=doi:10.5072/FK2ABCDEF
3566+
3567+
curl -H "X-Dataverse-key:$API_TOKEN" -X PUT "$SERVER_URL/api/datasets/:persistentId/deleteFiles?persistentId=$PERSISTENT_IDENTIFIER" \
3568+
-H "Content-Type: application/json" \
3569+
-d '{"fileIds": [1, 2, 3]}'
3570+
3571+
The fully expanded example above (without environment variables) looks like this:
3572+
3573+
.. code-block:: bash
3574+
3575+
curl -H "X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -X PUT "https://demo.dataverse.org/api/datasets/:persistentId/deleteFiles?persistentId=doi:10.5072/FK2ABCDEF" \
3576+
-H "Content-Type: application/json" \
3577+
-d '{"fileIds": [1, 2, 3]}'
3578+
3579+
The ``fileIds`` in the JSON payload should be an array of file IDs that you want to delete from the dataset.
3580+
3581+
You must have the appropriate permissions to delete files from the dataset.
3582+
3583+
Upon success, the API will return a JSON response with a success message and the number of files deleted.
3584+
3585+
The API call will report a 400 (BAD REQUEST) error if any of the files specified do not exist or are not in the latest version of the specified dataset.
3586+
The ``fileIds`` in the JSON payload should be an array of file IDs that you want to delete from the dataset.
3587+
3588+
35473589
Files
35483590
-----
35493591

doc/sphinx-guides/source/container/running/demo.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ To stop the containers hit ``Ctrl-c`` (hold down the ``Ctrl`` key and then hit t
2929

3030
To start the containers, run ``docker compose up``.
3131

32+
.. _starting-over:
33+
3234
Deleting Data and Starting Over
3335
-------------------------------
3436

@@ -46,6 +48,8 @@ Starting Fresh
4648

4749
For this exercise, please start fresh by stopping all containers and removing the ``data`` directory.
4850

51+
.. _demo-persona:
52+
4953
Creating and Running a Demo Persona
5054
+++++++++++++++++++++++++++++++++++
5155

@@ -137,6 +141,29 @@ In the example below of configuring :ref:`:FooterCopyright` we use the default u
137141

138142
One you make this change it should be visible in the copyright in the bottom left of every page.
139143

144+
Root Collection Customization (Alias, Name, etc.)
145+
+++++++++++++++++++++++++++++++++++++++++++++++++
146+
147+
Before running ``docker compose up`` for the first time, you can customize the root collection by placing a JSON file in the right place.
148+
149+
First, in the "demo" directory you created (see :ref:`demo-persona`), create a subdirectory called "config":
150+
151+
``mkdir demo/config``
152+
153+
Next, download :download:`dataverse-complete.json <../../_static/api/dataverse-complete.json>` and put it in the "config" directory you just created. The contents of your "demo" directory should look something like this:
154+
155+
.. code-block:: bash
156+
157+
% find demo
158+
demo
159+
demo/config
160+
demo/config/dataverse-complete.json
161+
demo/init.sh
162+
163+
Edit ``dataverse-complete.json`` to have the values you want. You'll want to refer to :ref:`update-dataverse-api` in the API Guide to understand the format. In that documentation you can find optional parameters as well.
164+
165+
To test your JSON file, run ``docker compose up``. Again, this only works when you are running ``docker compose up`` for the first time. (You can always start over. See :ref:`starting-over`.)
166+
140167
Multiple Languages
141168
++++++++++++++++++
142169

modules/container-configbaker/scripts/bootstrap/demo/init.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ echo ""
1919
echo "Setting DOI provider to \"FAKE\"..."
2020
curl -sS -X PUT -d FAKE "${DATAVERSE_URL}/api/admin/settings/:DoiProvider"
2121

22+
API_TOKEN=$(grep apiToken "/tmp/setup-all.sh.out" | jq ".data.apiToken" | tr -d \")
23+
export API_TOKEN
24+
25+
ROOT_COLLECTION_JSON=/scripts/bootstrap/demo/config/dataverse-complete.json
26+
if [ -f $ROOT_COLLECTION_JSON ]; then
27+
echo ""
28+
echo "Updating root collection based on $ROOT_COLLECTION_JSON..."
29+
curl -sS -X PUT -H "X-Dataverse-key:$API_TOKEN" "$DATAVERSE_URL/api/dataverses/:root" --upload-file $ROOT_COLLECTION_JSON
30+
fi
31+
2232
echo ""
2333
echo "Revoke the key that allows for creation of builtin users..."
2434
curl -sS -X DELETE "${DATAVERSE_URL}/api/admin/settings/BuiltinUsers.KEY"

0 commit comments

Comments
 (0)