Skip to content

Commit

Permalink
Merge pull request #5949 from IQSS/develop
Browse files Browse the repository at this point in the history
Update version to v4.15
  • Loading branch information
kcondon committed Jun 14, 2019
2 parents 57a392d + d368c85 commit 62ba199
Show file tree
Hide file tree
Showing 189 changed files with 5,634 additions and 2,064 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,10 @@ scripts/installer/default.config
.idea
**/*.iml
/bin/

# do not track Visual Studio Code files
.vscode

# ignore UI testing related files
tests/node_modules
tests/package-lock.json
42 changes: 42 additions & 0 deletions .travis.yml.future
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
services:
- docker

jobs:
include:
# Execute java unit- and integration tests
- stage: test
language: java
jdk:
- oraclejdk8
script: mvn -DcompilerArgument=-Xlint:unchecked test -P all-unit-tests
after_success: mvn jacoco:report coveralls:report

# Execute Cypress for UI testing
# see https://docs.cypress.io/guides/guides/continuous-integration.html
- stage: test
language: node_js
node_js:
- "10"
addons:
apt:
packages:
# Ubuntu 16+ does not install this dependency by default, so we need to install it ourselves
- libgconf-2-4
cache:
# Caches $HOME/.npm when npm ci is default script command
# Caches node_modules in all other cases
npm: true
directories:
# we also need to cache folder with Cypress binary
- ~/.cache
# we want to cache the Glassfish and Solr dependencies as well
- conf/docker-aio/dv/deps
before_install:
- cd tests
install:
- npm ci
before_script:
- ./run_docker_dataverse.sh
script:
# --key needs to be injected using CYPRESS_RECORD_KEY to keep it secret
- $(npm bin)/cypress run --record
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ If you are interested in working on the main Dataverse code, great! Before you s

Please read http://guides.dataverse.org/en/latest/developers/version-control.html to understand how we use the "git flow" model of development and how we will encourage you to create a GitHub issue (if it doesn't exist already) to associate with your pull request. That page also includes tips on making a pull request.

After making your pull request, your goal should be to help it advance through our kanban board at https://waffle.io/IQSS/dataverse . If no one has moved your pull request to the code review column in a timely manner, please reach out. Thanks!
After making your pull request, your goal should be to help it advance through our kanban board at https://github.com/orgs/IQSS/projects/2 . If no one has moved your pull request to the code review column in a timely manner, please reach out. Thanks!

[dataverse-community Google Group]: https://groups.google.com/group/dataverse-community
[Community Call]: https://dataverse.org/community-calls
Expand Down
2 changes: 1 addition & 1 deletion PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Welcome! New contributors should at least glance at [CONTRIBUTING.md](/CONTRIBUT

## Related Issues

- connects to #ISSUE_NUMBER: ISSUE_TITLE
- #ISSUE_NUMBER: ISSUE_TITLE

## Pull Request Checklist

Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Dataverse®
===============

Dataverse is an [open source][] web application for sharing, citing, analyzing, and preserving research data (developed by the [Data Science and Products team](http://www.iq.harvard.edu/people/people/data-science-products) at the [Institute for Quantitative Social Science](http://iq.harvard.edu/) and the [Dataverse community][]).
Dataverse is an [open source][] software platform for sharing, finding, citing, and preserving research data (developed by the [Data Science and Products team](http://www.iq.harvard.edu/people/people/data-science-products) at the [Institute for Quantitative Social Science](http://iq.harvard.edu/) and the [Dataverse community][]).

[dataverse.org][] is our home on the web and shows a map of Dataverse installations around the world, a list of [features][], [integrations][] that have been made possible through [REST APIs][], our development [roadmap][], and more.

Expand All @@ -17,8 +17,6 @@ Dataverse is a trademark of President and Fellows of Harvard College and is regi

[![Dataverse Project logo](src/main/webapp/resources/images/dataverseproject_logo.jpg?raw=true "Dataverse Project")](http://dataverse.org)

[![Waffle.io - Columns and their card count](https://badge.waffle.io/IQSS/dataverse.svg?columns=all)](https://waffle.io/IQSS/dataverse)

[![Build Status](https://travis-ci.org/IQSS/dataverse.svg?branch=develop)](https://travis-ci.org/IQSS/dataverse) [![Coverage Status](https://coveralls.io/repos/IQSS/dataverse/badge.svg?branch=develop&service=github)](https://coveralls.io/github/IQSS/dataverse?branch=develop)

[dataverse.org]: https://dataverse.org
Expand Down
2 changes: 1 addition & 1 deletion conf/docker-aio/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Also usable for normal development and system evaluation; not intended for produ
- Installation (integration test): `docker exec dv /opt/dv/setupIT.bash`
(Note that it's possible to customize the installation by editing `conf/docker-aio/default.config` and running `docker exec dv /opt/dv/install.bash` but for the purposes of integration testing, the `setupIT.bash` script above works fine.)

- update `dataverse.siteUrl` (appears only necessary for `DatasetsIT.testPrivateUrl`): `docker exec -it dv /usr/local/glassfish4/bin/asadmin create-jvm-options "-Ddataverse.siteUrl=http\://localhost\:8084"` (or use the provided `seturl.bash`)
- update `dataverse.siteUrl` (appears only necessary for `DatasetsIT.testPrivateUrl`): `docker exec dv /usr/local/glassfish4/bin/asadmin create-jvm-options "-Ddataverse.siteUrl=http\://localhost\:8084"` (or use the provided `seturl.bash`)

#### Run integration tests:

Expand Down
2 changes: 1 addition & 1 deletion conf/docker-aio/run-test-suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ fi

# 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.
mvn test -Dtest=DataversesIT,DatasetsIT,SwordIT,AdminIT,BuiltinUsersIT,UsersIT,UtilIT,ConfirmEmailIT,FileMetadataIT,FilesIT,SearchIT,InReviewWorkflowIT,HarvestingServerIT,MoveIT,MakeDataCountApiIT -Ddataverse.test.baseurl=$dvurl
mvn test -Dtest=DataversesIT,DatasetsIT,SwordIT,AdminIT,BuiltinUsersIT,UsersIT,UtilIT,ConfirmEmailIT,FileMetadataIT,FilesIT,SearchIT,InReviewWorkflowIT,HarvestingServerIT,MoveIT,MakeDataCountApiIT,FileTypeDetectionIT -Ddataverse.test.baseurl=$dvurl
2 changes: 1 addition & 1 deletion conf/docker-aio/seturl.bash
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

docker exec -it dv /usr/local/glassfish4/bin/asadmin create-jvm-options "\"-Ddataverse.siteUrl=http\://localhost\:8084\""
docker exec dv /usr/local/glassfish4/bin/asadmin create-jvm-options "\"-Ddataverse.siteUrl=http\://localhost\:8084\""
11 changes: 11 additions & 0 deletions conf/jhove/jhove.conf
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,15 @@
<module>
<class>edu.harvard.hul.ois.jhove.module.Utf8Module</class>
</module>
<!-- New modules for application/gzip and application/warc: -->
<module>
<class>edu.harvard.hul.ois.jhove.module.GzipModule</class>
</module>
<module>
<class>edu.harvard.hul.ois.jhove.module.WarcModule</class>
</module>
<!-- A new 3rd-party module for image/png from mcgauth.com: -->
<module>
<class>com.mcgath.jhove.module.PngModule</class>
</module>
</jhoveConfig>
1 change: 1 addition & 0 deletions conf/solr/7.3.1/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
<field name="dvObjectType" type="string" stored="true" indexed="true" multiValued="false"/>
<field name="metadataSource" type="string" stored="true" indexed="true" multiValued="false"/>
<field name="isHarvested" type="boolean" stored="true" indexed="true" multiValued="false"/>
<field name="fileDeleted" type="boolean" stored="true" indexed="true" multiValued="false"/>

<field name="dvName" type="text_en" stored="true" indexed="true" multiValued="false"/>
<field name="dvAlias" type="text_en" stored="true" indexed="true" multiValued="false"/>
Expand Down
5 changes: 5 additions & 0 deletions doc/release-notes/2202-improved-file-detection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Upgrade instructions:

A new version of file type detection software, Jhove, is added in this release. It requires an update of its configuration file: ``jhove.conf``. Download the new configuration file from the Dataverse release page on GitHub, or from the source tree at https://github.com/IQSS/dataverse/blob/master/conf/jhove/jhove.conf, and place it in ``<GLASSFISH_DOMAIN_DIRECTORY>/config/``. For example: ``/usr/local/glassfish4/glassfish/domains/domain1/config/jhove.conf``.

**Important:** If your Glassfish installation directory is different from ``/usr/local/glassfish4``, make sure to edit the header of the config file, to reflect the correct location.
4 changes: 4 additions & 0 deletions doc/release-notes/3575-usernames.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* In an effort to prevent accidental duplicate accounts, user spoofing, or other username-based confusion, this release introduces a database constraint that no longer allows usernames that are exactly the same but use different capitalization, e.g. Bob11 vs. bob11. You may need to do some cleanup before upgrading to deal with existing usernames like this.
* To check whether you have any usernames like this that need cleaning up, run the case insensitive duplicate queries from our [Useful Queries doc](https://docs.google.com/document/d/1-Y_iUduSxdDNeK1yiGUxe7t-Md7Fy965jp4o4m1XEoE/edit?usp=sharing "Useful Queries doc").
* Once you identify the usernames that need cleaning up, you should use either [Merge User Accounts](http://guides.dataverse.org/en/latest/api/native-api.html#merge-user-accounts) (if it’s the same person) or [Change User Identifier](http://guides.dataverse.org/en/latest/api/native-api.html#change-user-identifier) (if they are different people).
* After the cleanup you can safely upgrade without issue.
1 change: 1 addition & 0 deletions doc/release-notes/5584-dataset-page-solr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Improved search on files within a dataset plus search facets are added to the dataset page. A solr schema upgrade and a full reindex are required to fully take advantage of this functionality.
21 changes: 18 additions & 3 deletions doc/sphinx-guides/source/admin/dataverses-datasets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,23 @@ Removes a link between a dataset and a dataverse. Only accessible to superusers.

curl -H "X-Dataverse-key: $API_TOKEN" -X DELETE http://$SERVER/api/datasets/$linked-dataset-id/deleteLink/$linking-dataverse-alias

Mint new PID for a Dataset
^^^^^^^^^^^^^^^^^^^^^^^^^^
Mint a PID for a File That Does Not Have One
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

In the following example, the database id of the file is 42::

export FILE_ID=42
curl http://localhost:8080/api/admin/$FILE_ID/registerDataFile

Mint PIDs for Files That Do Not Have Them
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If you have a large number of files, you might want to consider miniting PIDs for files individually using the ``registerDataFile`` endpoint above in a for loop, sleeping between each registration::

curl http://localhost:8080/api/admin/registerDataFileAll

Mint a New DOI for a Dataset with a Handle
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Mints a new identifier for a dataset previously registered with a handle. Only accessible to superusers. ::

Expand All @@ -88,5 +103,5 @@ As a superuser, click "Update Current Version" when publishing. (This option is
Diagnose Constraint Violations Issues in Datasets
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To identifiy invalid data values in specific datasets (if, for example, an attempt to edit a dataset results in a ConstraintViolationException in the server log), or to check all the datasets in the Dataverse for constraint violations, see :ref:`Dataset Validation <dataset-validation-api>` in the :doc:`/api/native-api` section of the User Guide.
To identify invalid data values in specific datasets (if, for example, an attempt to edit a dataset results in a ConstraintViolationException in the server log), or to check all the datasets in the Dataverse for constraint violations, see :ref:`Dataset Validation <dataset-validation-api>` in the :doc:`/api/native-api` section of the User Guide.

12 changes: 12 additions & 0 deletions doc/sphinx-guides/source/admin/harvestserver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ harvesting protocol. Note that the terms "Harvesting Server" and "OAI
Server" are being used interchangeably throughout this guide and in
the inline help text.

If you want to learn more about OAI-PMH, you could take a look at
`DataCite OAI-PMH guide <https://support.datacite.org/docs/datacite-oai-pmh>`_
or the `OAI-PMH protocol definition <https://www.openarchives.org/OAI/openarchivesprotocol.html>`_.

You might consider adding your OAI-enabled production instance of Dataverse to
`this shared list <https://docs.google.com/spreadsheets/d/12cxymvXCqP_kCsLKXQD32go79HBWZ1vU_tdG4kvP5S8/>`_
of such instances.

How does it work?
-----------------

Expand All @@ -28,6 +36,10 @@ Harvesting server can be enabled or disabled on the "Harvesting
Server" page accessible via the :doc:`dashboard`. Harvesting server is by
default disabled on a brand new, "out of the box" Dataverse.

The OAI-PMH endpoint can be accessed at ``http(s)://<Your Dataverse FQDN>/oai``.
If you want other services to harvest your repository, point them to this URL.
*Example URL for 'Identify' verb*: `demo.dataverse.org OAI <https://demo.dataverse.org/oai?verb=Identify>`_

OAI Sets
--------

Expand Down
4 changes: 2 additions & 2 deletions doc/sphinx-guides/source/admin/solr-search-index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Solr Search Index
=================

Dataverse requires Solr to be operational at all times. If you stop Solr, you should see a error about this on the home page, which is powered by the search index Solr provides. You can set up Solr by following the steps in our Installation Guide's :doc:`/installation/prerequisites` and :doc:`/installation/config` sections explaining how to configure it. This section you're reading now is about the care and feeding of the search index. PostgreSQL is the "source of truth" and the Dataverse application will copy data from PostgreSQL into Solr. For this reason, the search index can be rebuilt at any time. Depending on the amount of data you have, this can be a slow process. You are encouraged to experiment with production data to get a sense of how long a full reindexing will take.
Dataverse requires Solr to be operational at all times. If you stop Solr, you should see a error about this on the root dataverse page, which is powered by the search index Solr provides. You can set up Solr by following the steps in our Installation Guide's :doc:`/installation/prerequisites` and :doc:`/installation/config` sections explaining how to configure it. This section you're reading now is about the care and feeding of the search index. PostgreSQL is the "source of truth" and the Dataverse application will copy data from PostgreSQL into Solr. For this reason, the search index can be rebuilt at any time. Depending on the amount of data you have, this can be a slow process. You are encouraged to experiment with production data to get a sense of how long a full reindexing will take.

.. contents:: Contents:
:local:
Expand All @@ -17,7 +17,7 @@ Clear and Reindex
Clearing Data from Solr
~~~~~~~~~~~~~~~~~~~~~~~

Please note that the moment you issue this command, it will appear to end users looking at the home page that all data is gone! This is because the home page is powered by the search index.
Please note that the moment you issue this command, it will appear to end users looking at the root dataverse page that all data is gone! This is because the root dataverse page is powered by the search index.

``curl http://localhost:8080/api/admin/index/clear``

Expand Down
5 changes: 5 additions & 0 deletions doc/sphinx-guides/source/admin/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,8 @@ In real life production use, it may be possible to end up in a situation where s
(contrary to what the message suggests, there are no specific "details" anywhere in the stack trace that would explain what values violate which constraints)

To identifiy the specific invalid values in the affected datasets, or to check all the datasets in the Dataverse for constraint violations, see :ref:`Dataset Validation <dataset-validation-api>` in the :doc:`/api/native-api` section of the User Guide.

Many Files with a File Type of "Unknown", "Application", or "Binary"
--------------------------------------------------------------------

From the home page of a Dataverse installation you can get a count of files by file type by clicking "Files" and then scrolling down to "File Type". If you see a lot of files that are "Unknown", "Application", or "Binary" you can have Dataverse attempt to redetect the file type by using the :ref:`Redetect File Type <redetect-file-type>` API endpoint.
7 changes: 5 additions & 2 deletions doc/sphinx-guides/source/api/client-libraries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ Because Dataverse is a SWORD server, additional client libraries exist for Java,
Python
------

https://github.com/IQSS/dataverse-client-python is the offical Python package for Dataverse APIs.
There are two Python modules for interacting with Dataverse APIs.

`pyDataverse <https://github.com/AUSSDA/pyDataverse>`_ had its initial release in 2019 and can be installed with ``pip install pyDataverse``. The module is developed by `Stefan Kasberger <http://stefankasberger.at>`_ from `AUSSDA - The Austrian Social Science Data Archive <https://aussda.at>`_.

`dataverse-client-python <https://github.com/IQSS/dataverse-client-python>`_ had its initial release in 2015. `Robert Liebowitz <https://github.com/rliebz>`_ created this library while at the `Center for Open Science (COS) <https://centerforopenscience.org>`_ and the COS uses it to integrate the `Open Science Framework (OSF) <https://osf.io>`_ with Dataverse via an add-on which itself is open source and listed on the :doc:`/api/apps` page.

`Robert Liebowitz <https://github.com/rliebz>`_ created this library while at the `Center for Open Science (COS) <https://centerforopenscience.org>`_ and the COS uses it to integrate the `Open Science Framework (OSF) <https://osf.io>`_ with Dataverse via an add-on which itself is open source and listed on the :doc:`/api/apps` page.

R
-
Expand Down
24 changes: 23 additions & 1 deletion doc/sphinx-guides/source/api/dataaccess.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,18 @@ It returns a zipped bundle that contains the data in the following formats:
* Data (Variable) metadata record, in DDI XML;
* File citation, in Endnote and RIS formats.


Parameters:
~~~~~~~~~~~
none.

``fileMetadataId``

============== ===========
Value Description
============== ===========
ID Exports file with specific file metadata ``ID``.
============== ===========


Data Variable Metadata Access
-----------------------------
Expand Down Expand Up @@ -177,6 +186,19 @@ Example:
</dataDscr>
</codeBook>
Parameters:
~~~~~~~~~~~

``fileMetadataId``

============== ===========
Value Description
============== ===========
ID Exports file with specific file metadata ``ID``. For example for data file with id 6 and file metadata id 2: ``curl 'http://localhost:8080/api/access/datafile/6/metadata/ddi?fileMetadataId=2'``
============== ===========


More information on DDI is available in the :doc:`/user/tabulardataingest/ingestprocess` section of the User Guide.

Advanced options/Parameters:
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx-guides/source/api/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ Rather than using a production installation of Dataverse, API users are welcome
Support
-------

If you are using the APIs for an installation of Dataverse hosted by your institution, you may want to reach out to the team that supports it. At the top of the Dataverse installation's home page, there should be a form you can fill out by clicking the "Support" link.
If you are using the APIs for an installation of Dataverse hosted by your institution, you may want to reach out to the team that supports it. In the header at the top of the site, there should be a form you can fill out by clicking the "Support" link.

If you are having trouble with http://demo.dataverse.org or have questions about the APIs, please feel free to reach out to the Dataverse community via https://groups.google.com/forum/#!forum/dataverse-community .
Loading

0 comments on commit 62ba199

Please sign in to comment.