Skip to content

Commit

Permalink
Merge branch 'develop' into multi-license
Browse files Browse the repository at this point in the history
  • Loading branch information
janvanmansum committed Jun 3, 2021
2 parents 336359d + b61b572 commit 7dbd78d
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 23 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/reviewdog_checkstyle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Maven CheckStyle Task
on:
pull_request:
paths:
- "**.java"

jobs:
checkstyle_job:
runs-on: ubuntu-latest
name: Checkstyle job
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run check style
uses: nikitasavinov/checkstyle-action@master
with:
fail_on_error: true
reporter: github-pr-review
checkstyle_config: checkstyle.xml
github_token: ${{ secrets.GITHUB_TOKEN }}

4 changes: 3 additions & 1 deletion conf/docker-aio/run-test-suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ if [ -z "$dvurl" ]; then
dvurl="http://localhost:8084"
fi

integrationtests=$(<../../tests/integration-tests.txt)

# Please note the "dataverse.test.baseurl" is set to run for "all-in-one" Docker environment.
# TODO: Rather than hard-coding the list of "IT" classes here, add a profile to pom.xml.
source maven/maven.sh && mvn test -Dtest=DataversesIT,DatasetsIT,SwordIT,AdminIT,BuiltinUsersIT,UsersIT,UtilIT,ConfirmEmailIT,FileMetadataIT,FilesIT,SearchIT,InReviewWorkflowIT,HarvestingServerIT,MoveIT,MakeDataCountApiIT,FileTypeDetectionIT,EditDDIIT,ExternalToolsIT,AccessIT,DuplicateFilesIT,DownloadFilesIT,LinkIT,DeleteUsersIT,DeactivateUsersIT,AuxiliaryFilesIT -Ddataverse.test.baseurl=$dvurl
mvn test -Dtest=$integrationtests -Ddataverse.test.baseurl=$dvurl
2 changes: 1 addition & 1 deletion doc/release-notes/5.0-release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ The instructions below describe the upgrade procedure based on moving an existin

1. Update Astrophysics Metadata Block (if used)

`wget https://github.com/IQSS/dataverse/releases/download/5.0/astrophysics.tsv`
`wget https://github.com/IQSS/dataverse/releases/download/v5.0/astrophysics.tsv`
`curl http://localhost:8080/api/admin/datasetfield/load -X POST --data-binary @astrophysics.tsv -H "Content-type: text/tab-separated-values"`

2. (Recommended) Run ReExportall to update JSON Exports
Expand Down
2 changes: 1 addition & 1 deletion doc/release-notes/5.5-release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Users trying to download a zip file larger than the Dataverse installation's :Zi

### Guidelines on Depositing Code

The Software Metadata Working Group has created guidelines on depositing research code in a Dataverse installation. Learn more in the [Dataset Management section](https://guides.dataverse.org/en/latest/dataset-management) of the Dataverse Guides.
The Software Metadata Working Group has created guidelines on depositing research code in a Dataverse installation. Learn more in the [Dataset Management section](https://guides.dataverse.org/en/latest/user/dataset-management.html#research-code) of the Dataverse Guides.

### New Metrics API

Expand Down
8 changes: 8 additions & 0 deletions doc/sphinx-guides/source/api/native-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -825,14 +825,20 @@ through the Dataverse application.
For example, if you have a dataset version with 2 files, one with the folder named "subfolder":
|image1|
.. |image1| image:: ./img/dataset_page_files_view.png
or, as viewed as a tree on the dataset page:
|image2|
.. |image2| image:: ./img/dataset_page_tree_view.png
The output of the API for the top-level folder (``/api/datasets/{dataset}/dirindex/``) will be as follows:
|image3|
.. |image3| image:: ./img/index_view_top.png
with the underlying html source:
Expand All @@ -851,6 +857,8 @@ with the underlying html source:
The ``/dirindex/?folder=subfolder`` link above will produce the following view:
|image4|
.. |image4| image:: ./img/index_view_subfolder.png
with the html source as follows:
Expand Down
2 changes: 0 additions & 2 deletions doc/sphinx-guides/source/developers/dev-environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ To install Solr, execute the following commands:

``curl -O https://raw.githubusercontent.com/IQSS/dataverse/develop/conf/solr/8.8.1/schema_dv_mdb_fields.xml``

``curl -O https://raw.githubusercontent.com/IQSS/dataverse/develop/conf/solr/8.8.1/schema_dv_mdb_copies.xml``

``mv schema*.xml collection1/conf``

``curl -O https://raw.githubusercontent.com/IQSS/dataverse/develop/conf/solr/8.8.1/solrconfig.xml``
Expand Down
9 changes: 1 addition & 8 deletions doc/sphinx-guides/source/developers/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ Once installed, you may run commands with ``mvn [options] [<goal(s)>] [<phase(s)

``mvn test -Dtest=FileMetadataIT -Ddataverse.test.baseurl='http://localhost:8080'``

To see the full list of tests used by the Docker option mentioned above, see :download:`run-test-suite.sh <../../../../conf/docker-aio/run-test-suite.sh>`.
If you are adding a new test class, be sure to add it to :download:`tests/integration-tests.txt <../../../../tests/integration-tests.txt>` so that our automated testing knows about it.


Writing and Using a Testcontainers Test
Expand Down Expand Up @@ -438,13 +438,6 @@ How to Run the Phoenix Tests
- Log into Jenkins and click "Build Now" at https://build.hmdc.harvard.edu:8443/job/phoenix.dataverse.org-build-develop/
- Wait for all three chained Jenkins jobs to complete and note if they passed or failed. If you see a failure, open a GitHub issue or at least get the attention of some developers.

List of Tests Run Against the Phoenix Server
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

We haven't thought much about a good way to publicly list the "IT" classes that are executed against the phoenix server. (Currently your best bet is to look at the ``Executing Maven`` line at the top of the "Full Log" of "Console Output" of ``phoenix.dataverse.org-apitest-develop`` Jenkins job mentioned above.) We endeavor to keep the list of tests in the "all-in-one" Docker environment described above in sync with the list of tests configured in Jenkins. That is to say, refer to :download:`run-test-suite.sh <../../../../conf/docker-aio/run-test-suite.sh>` mentioned in ``conf/docker-aio/readme.md`` for the current list of IT tests that are expected to pass. Here's a dump of that file:

.. literalinclude:: ../../../../conf/docker-aio/run-test-suite.sh

Accessibility Testing
---------------------

Expand Down
4 changes: 2 additions & 2 deletions scripts/installer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ GLASSFISH_SETUP_SCRIPT=${INSTALLER_ZIP_DIR}/as-setup.sh
API_SCRIPTS=${INSTALLER_ZIP_DIR}/setup-datasetfields.sh ${INSTALLER_ZIP_DIR}/setup-users.sh ${INSTALLER_ZIP_DIR}/setup-builtin-roles.sh ${INSTALLER_ZIP_DIR}/setup-dvs.sh ${INSTALLER_ZIP_DIR}/data ${INSTALLER_ZIP_DIR}/setup-identity-providers.sh ${INSTALLER_ZIP_DIR}/setup-all.sh ${INSTALLER_ZIP_DIR}/post-install-api-block.sh
JHOVE_CONFIG=${INSTALLER_ZIP_DIR}/jhove.conf
JHOVE_SCHEMA=${INSTALLER_ZIP_DIR}/jhoveConfig.xsd
SOLR_SCHEMA=${INSTALLER_ZIP_DIR}/schema.xml ${INSTALLER_ZIP_DIR}/schema_dv_mdb_fields.xml ${INSTALLER_ZIP_DIR}/schema_dv_mdb_copies.xml ${INSTALLER_ZIP_DIR}/updateSchemaMDB.sh
SOLR_SCHEMA=${INSTALLER_ZIP_DIR}/schema.xml ${INSTALLER_ZIP_DIR}/schema_dv_mdb_fields.xml ${INSTALLER_ZIP_DIR}/updateSchemaMDB.sh
SOLR_CONFIG=${INSTALLER_ZIP_DIR}/solrconfig.xml
PYTHON_FILES=${INSTALLER_ZIP_DIR}/README_python.txt ${INSTALLER_ZIP_DIR}/installConfig.py ${INSTALLER_ZIP_DIR}/installUtils.py ${INSTALLER_ZIP_DIR}/install.py ${INSTALLER_ZIP_DIR}/installAppServer.py ${INSTALLER_ZIP_DIR}/requirements.txt ${INSTALLER_ZIP_DIR}/default.config ${INSTALLER_ZIP_DIR}/interactive.config
INSTALL_SCRIPT=${INSTALLER_ZIP_DIR}/install
Expand Down Expand Up @@ -56,7 +56,7 @@ ${JHOVE_SCHEMA}: ../../conf/jhove/jhoveConfig.xsd ${INSTALLER_ZIP_DIR}
@echo copying jhove schema file
/bin/cp ../../conf/jhove/jhoveConfig.xsd ${INSTALLER_ZIP_DIR}

${SOLR_SCHEMA}: ../../conf/solr/8.8.1/schema.xml ../../conf/solr/8.8.1/schema_dv_mdb_fields.xml ../../conf/solr/8.8.1/schema_dv_mdb_copies.xml ../../conf/solr/8.8.1/updateSchemaMDB.sh ${INSTALLER_ZIP_DIR}
${SOLR_SCHEMA}: ../../conf/solr/8.8.1/schema.xml ../../conf/solr/8.8.1/schema_dv_mdb_fields.xml ../../conf/solr/8.8.1/updateSchemaMDB.sh ${INSTALLER_ZIP_DIR}
@echo copying Solr schema file
/bin/cp ../../conf/solr/8.8.1/schema*.xml ../../conf/solr/8.8.1/updateSchemaMDB.sh ${INSTALLER_ZIP_DIR}

Expand Down
3 changes: 1 addition & 2 deletions scripts/installer/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,5 @@ jhove.conf
SOLR schema and config files, from conf/solr/8.8.1:

schema.xml
schema_dv_cmb_copies.xml
schema_dv_cmb_fields.xml
schema_dv_mdb_fields.xml
solrconfig.xml
5 changes: 2 additions & 3 deletions src/main/java/edu/harvard/iq/dataverse/api/Admin.java
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,8 @@ private Response deleteAuthenticatedUser(AuthenticatedUser au) {
authSvc.removeAuthentictedUserItems(au);

authSvc.deleteAuthenticatedUser(au.getId());
return ok("AuthenticatedUser " + au.getIdentifier() + " deleted. ");

}
return ok("AuthenticatedUser " + au.getIdentifier() + " deleted.");
}

@POST
@Path("authenticatedUsers/{identifier}/deactivate")
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/edu/harvard/iq/dataverse/api/Datasets.java
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ public Response getFileAccessFolderView(@PathParam("id") String datasetId, @Quer

String indexFileName = folderName.equals("") ? ".index.html"
: ".index-" + folderName.replace('/', '_') + ".html";
response.setHeader("Content-disposition", "attachment; filename=\"" + indexFileName + "\"");
response.setHeader("Content-disposition", "filename=\"" + indexFileName + "\"");


return Response.ok()
Expand Down
2 changes: 0 additions & 2 deletions src/test/java/edu/harvard/iq/dataverse/api/AdminIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ public void testListAuthenticatedUsers() throws Exception {

Response deleteSuperuser = UtilIT.deleteUser(superuserUsername);
assertEquals(200, deleteSuperuser.getStatusCode());

}


@Test
public void testFilterAuthenticatedUsersForbidden() throws Exception {
Expand Down
1 change: 1 addition & 0 deletions tests/integration-tests.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DataversesIT,DatasetsIT,SwordIT,AdminIT,BuiltinUsersIT,UsersIT,UtilIT,ConfirmEmailIT,FileMetadataIT,FilesIT,SearchIT,InReviewWorkflowIT,HarvestingServerIT,MoveIT,MakeDataCountApiIT,FileTypeDetectionIT,EditDDIIT,ExternalToolsIT,AccessIT,DuplicateFilesIT,DownloadFilesIT,LinkIT,DeleteUsersIT,DeactivateUsersIT,AuxiliaryFilesIT

0 comments on commit 7dbd78d

Please sign in to comment.