Skip to main content

Planetary Data System (PDS) Data Object Identifier (DOI) Service

Project description

NASA PDS DOI Service

The PDS DOI Service provides tools for PDS operators to mint DOIs.

Prerequisites

  • Python 3.7 or above
  • a login to OSTI server

User Documentation

https://nasa-pds.github.io/pds-doi-service/ 

Developers

Get the code and work on a branch

git clone ...
git checkout -b "#<issue number>"

Install virtual env

pip install virtualenv
python -m venv venv
source venv/bin/activate

Deploy dependencies:

pip install -r requirements.txt
pip install -r requirements_dev.txt

or

pip install -e .

Update your local configuration to access the OSTI test server

Create a file in the base directory of the project named pds_doi_service.ini, the following may be used as a template

[OSTI]
user = <ask pds-operator@jpl.nasa.gov>
password = <ask pds-operator@jpl.nasa.gov>
release_input_schematron = config/IAD3_scheematron.sch
input_xsd = config/iad_schema.xsd

[PDS4_DICTIONARY]
url = https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_JSON_1D00.JSON
pds_node_identifier = 0001_NASA_PDS_1.pds.Node.pds.name

[LANDING_PAGES]
# template url, arguments are
# 1) product_class suffix, after _
# 2) lid
# 3) vid
url = https://pds.nasa.gov/ds-view/pds/view{}.jsp?identifier={}&version={}

[OTHER]
doi_publisher = NASA Planetary Data System
global_keyword_values = PDS; PDS4;
pds_uri = http://pds.nasa.gov/pds4/pds/v1
transaction_dir = ./transaction_history
db_file = doi.db
db_table = doi
api_host = 0.0.0.0
api_port = 8080
emailer_local_host = localhost
emailer_port       = 25
emailer_sender     = pdsen-doi-test@jpl.nasa.gov
emailer_receivers  = pdsen-doi-test@jpl.nasa.gov
draft_validate_against_xsd_flag = True
release_validate_against_xsd_flag = True
reserve_validate_against_xsd_flag = True
pds_registration_doi_token = 10.17189
logging_level=DEBUG

Launch API server

$ pip install pds-doi-service
$ pds-doi-api

The started service documentation is available on http://localhost:8080/PDS_APIs/pds_doi_api/0.1/ui/

Running with Docker

To run the server on a Docker container, please execute the following from the root directory:

# building the image
docker build -t pds-doi-service .

# starting up a container
docker run -p 8080:8080 pds-doi-service

However, note that when launching the container via docker run, all configuration values are derived from the default INI file bundled with the repo. To override the configuration, it is recommended to launch the service via docker-compose:

docker-compose up

This will launch the DOI Service container using the top-level docker-compose.yml file, which specifies that environment variables be imported from doi_service.env. Modify doi_service.env to define any configuration values to override when the service is launched.

Test

Unit tests (for developers) :

python setup.py test

Behavioral testing (for Integration & Testing)

Then you can run the behavioral tests:

behave

Note this will download reference test data. If they need to be updated you have to first remove your local copy of the reference data (test/aaDOI_production_submitted_labels)

You can also run them for a nicer reporting:

behave -f allure_behave.formatter:AllureFormatter -o ./allure ./features 
allure service allure

To report to testrail

Test reports can be pushed to testrail: https://cae-testrail.jpl.nasa.gov/testrail/

Project: Planetary Data System (PDS) Test suite: pds-doi-service

Set you environment:

export TESTRAIL_USER=<your email in testrail>
export TESTRAIL_KEY=<your API key in tesrail>

Run the tests:

behave

See the results in https://cae-testrail.jpl.nasa.gov/testrail/index.php?/projects/overview/168

Documentation management

Design :

See in this repository:

https://github.com/NASA-PDS/pds-doi-service/tree/master/docs

User documentation

Managed with sphinx

brew install sphinx-doc
pip install -r requirements_dev.txt
cd docs
sphinx-build -b html source build -a 

Build & Release

The build and release process is managed in github actions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pds_doi_service-1.1.1.tar.gz (50.4 MB view details)

Uploaded Source

Built Distributions

pds_doi_service-1.1.1-py3.7.egg (464.6 kB view details)

Uploaded Egg

pds_doi_service-1.1.1-py3-none-any.whl (253.4 kB view details)

Uploaded Python 3

File details

Details for the file pds_doi_service-1.1.1.tar.gz.

File metadata

  • Download URL: pds_doi_service-1.1.1.tar.gz
  • Upload date:
  • Size: 50.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.7

File hashes

Hashes for pds_doi_service-1.1.1.tar.gz
Algorithm Hash digest
SHA256 c7b865dc81b4b83ef9b058b376942fa0dce0906ddb42be4d058e5e4f6c92bc23
MD5 3fee9444dc05f3d11bb666c2b0a40ea2
BLAKE2b-256 22c7448d88f964e36e7d0efb17727b223aba7a6592542bd6ccae9d1382b1906a

See more details on using hashes here.

File details

Details for the file pds_doi_service-1.1.1-py3.7.egg.

File metadata

  • Download URL: pds_doi_service-1.1.1-py3.7.egg
  • Upload date:
  • Size: 464.6 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.7

File hashes

Hashes for pds_doi_service-1.1.1-py3.7.egg
Algorithm Hash digest
SHA256 b5649f2a88f0f538e5e210a6e9065e93a45f8655e48b7d635fdc3bd4100a9743
MD5 69888bb82f48ec7ac246a967ec43e020
BLAKE2b-256 4d79d9680a0f0ba8afe67a983a8c7b29935e313aa0a116583a7d4fed0cc11382

See more details on using hashes here.

File details

Details for the file pds_doi_service-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: pds_doi_service-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 253.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.7

File hashes

Hashes for pds_doi_service-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d3431c73b1e90c68d5b5efa5093847ba9a3abb3b617bd70e85b22265103a1f9b
MD5 888857dfce03027cf4a60ac56f33a5db
BLAKE2b-256 3145b9c332fcb576c247d90ed901e852f27a8c1482d1eed69f3de434eabe78ce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page