Merge pull request #796 from nuest/dataverse-docs

[MRG] Add docs for Figshare and Dataverse; update Dataverse installations file formatting
pull/802/head
Tim Head 2019-09-19 22:07:04 +02:00 zatwierdzone przez GitHub
commit 27eeef2c97
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
7 zmienionych plików z 651 dodań i 8 usunięć

Wyświetl plik

@ -11,6 +11,7 @@ Release date: TBD
New features
------------
- Add support for Figshare in :pr:`788` by :user:`nuest`.
- Add support for Dataverse in :pr:`739` by :user:`Xarthisius`.
API changes
-----------

Wyświetl plik

@ -82,4 +82,4 @@ The "Later" items are things that are at the back of the project's mind. At this
time there is no active plan for an item. The project would like to find the
resources and time to discuss and then execute these ideas.
* support execution on a remote host (with more resources than available locally) via the command-line
* add support for using ZIP files as the repo (`repo2docker https://example.com/an-archive.zip`) this will give us access to several archives (like Zenodo) that expose things as ZIP files.
* add support for using ZIP files as the repo (`repo2docker https://example.com/an-archive.zip`)

Wyświetl plik

@ -5,7 +5,7 @@ jupyter-repo2docker
images from source code repositories**.
``repo2docker`` fetches a repository
(from GitHub, GitLab, Zenodo, a Git repository or a local directory)
(from GitHub, GitLab, Zenodo, Figshare, Dataverse installations, a Git repository or a local directory)
and builds a container image in which the code can be executed.
The image build process is based on the configuration files found in the repository.

Wyświetl plik

@ -12,8 +12,11 @@ Using ``repo2docker``
``repo2docker`` can build a reproducible computational environment for any repository that
follows :ref:`specification`. repo2docker is called with the URL of a Git repository,
a DOI from Zenodo or Figshare, or a path to a local directory. It then
performs these steps:
a `DOI <https://en.wikipedia.org/wiki/Digital_object_identifier>`_ from Zenodo or Figshare,
a `Handle <https://en.wikipedia.org/wiki/Handle_System>`_ or DOI from a Dataverse installation,
or a path to a local directory.
It then performs these steps:
1. Inspects the repository for :ref:`configuration files <config-files>`. These will be used to build
the environment needed to run the repository.

File diff suppressed because one or more lines are too long

Wyświetl plik

@ -10,7 +10,14 @@ from ..utils import copytree, deep_get
class Dataverse(DoiProvider):
"""Provide contents of a Dataverse dataset."""
"""
Provide contents of a Dataverse dataset.
This class loads a a list of existing Dataverse installations from the internal
file dataverse.json. This file is manually updated with the following command:
python setup.py generate_dataverse_file
"""
def __init__(self):
data_file = os.path.join(os.path.dirname(__file__), "dataverse.json")

Wyświetl plik

@ -31,8 +31,13 @@ class GenerateDataverseInstallationsFileCommand(Command):
data = json.loads(resp_body.decode("utf-8"))
if "installations" not in data:
raise ValueError("Malformed installation map.")
with open("repo2docker/contentproviders/dataverse.json", "wb") as fp:
fp.write(resp_body)
def get_identifier(json):
return int(json["id"])
data["installations"].sort(key=get_identifier)
with open("repo2docker/contentproviders/dataverse.json", "w") as fp:
json.dump(data, fp, indent=4, sort_keys=True)
__cmdclass = versioneer.get_cmdclass()