Git Product home page Git Product logo

doi-service's People

Contributors

acraugh avatar actions-user avatar alexdunnjpl avatar collinss-jpl avatar dependabot[bot] avatar jordanpadams avatar lylebarner avatar mjjoyce avatar nutjob4life avatar pdsen-ci avatar ramesh-maddegoda avatar tloubrieu-jpl avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

doi-service's Issues

Re-organize and clean-up code to meet coding standards

  1. Organize code as a python package so that it can be tested and packaged with:
    $ python setup.py test
    $ python setup.py sdist bdist_wheel

  2. use the libraries standard for PDS dev (e.g. requests instead of urllib)

  3. break the code into sub-modules and files,

Associated requirements:
πŸ¦„ #16

document requirements and tests

Test more "programmatic" way of documenting requirements, possibly link them to tests

Look at behavioral testing (behave package)

Develop DOI Status / Query component

Design Details

See https://github.com/NASA-PDS/pds-doi-service/blob/master/docs/design/pds-doi-service-srd.md#listretrieve-a-doi

Inputs

This component should enable the status query of:

  • DOI (1..*) - should return 0..1 DOI summary objects
  • LID (1..*) - should return 0..* DOI summary objects
  • LIDVID (1..*) - should return 0..1 DOI summary objects
  • Submitter (1..*) - should return 0..* DOI summary objects
  • Discipline Node Abbreviation (1..*) - should return 0..* DOI summary objects
  • Submission datetime range (start, end) (ISO-8601 format) - should return 0..* DOI summary objects

Outputs

Based upon the DOI summary objects returned from the database, the software should return the summaries in two possible formats (specified via the API):

  • JSON
  • CSV

Applicable requirements
πŸ¦„ #30

Develop DOI metadata automated validation component

Validation of the DOI metadata will most likely involve some curation from PDS personnel, however, there are some way we could potentially validate specific values entered. We could check these individually, use something like Schematron to validate.

Below is Schematron we can look through for reference submitted from one our discipline node colleagues.

SBN-DataCite.sch.txt (rename to .sch)

Applicable requirements
πŸ¦„ #12
πŸ¦„ #13

The software shall be capable of accepting a request to update DOI metadata.

Design Details

  • Input: DOI Metadata Object, force_flag (available in the event we want to overwrite a record)

  • General steps for updates:

    1. Verify the input DOI Metadata is valid
    2. Verify DOI from DOI Metadata Object is in current system.
      a. Failure: Return error that DOI does not exist
      b. Success: continue
    3. Optionally, check DOI+Node:
      a. if force flag is true, verify DOI+Node from DOI Metadata Object match a currently existing DOI+Node combination in the system.
      i. Failure: Return error with expected DOI +Node combination
      ii. Success: Continue
      b. If force flag is false, continue.
    4. Insert data into database (NOTE: database should be keeping transaction record for DOIs)
    5. Submit updated metadata to OSTI.
    6. Return submission response to user
    7. Continue to verify update status with OSTI and notify user (see #27).
  • Outputs:
    TBD

Flow Diagram

TBD

Develop Status / Query API and component for OSTI status of a DOI

Request made by Ron:
An issue came up a couple of days ago where the Data Provider noticed that a DOI record, which was added @ OSTI on 2020-02-27, wasn’t showing @ DOI.org.
The OSTI record still has a status of β€œpending”. I regularly check for β€œpending” records using the OSTI GUI. But, the OSTI record doesn’t show up as β€œpending” in the GUI.

The point is that something like a CRON job will need to be in place to ensure that the OSTI β€œpending” records are propagated to DOI.org so that the DOI record(s) are accessible.

Linked requirements:
πŸ¦„ #30
πŸ¦„ #15

Update documentation for operational installation and usage

  • Develop Sphinx documentation for the repo
  • Documentation should include the following sections:
    • Installation
    • Usage
      • How to reserve a DOI
      • How to release a DOI (draft then release)
      • How to update DOI metadata (query then release)
    • Development
    • Support

See https://github.com/NASA-PDS/pds-deep-archive and https://nasa-pds.github.io/pds-deep-archive/# for an example of the docs. See docs directory for how the structure the RST files: https://github.com/NASA-PDS/pds-deep-archive/tree/master/docs

API Implementation for DOI Service

Applicable requirements
πŸ¦„ #35
πŸ¦„ #30
πŸ¦„ #5
πŸ¦„ #9
πŸ¦„ #7
πŸ¦„ #6

Acceptance criteria:
The pds-doi-service should propose a restful server to activate the management of DOIs are described in the requirements.

Develop Pending DOI Handler component for iteratively querying OSTI for DOI status until status change

START

Once a DOI submission enters a pending state, this handler component is triggered to will iteratively query OSTI for the current status of the pending DOI submission(s). Note: All submissions should enter this state when submitted to OSTI, unless there is an immediate failure returned.

Inputs

  • List of pending_submissions - this dictionary contains all the submitted objects
    • the identifiers for these objects may be:
      • DOI(s) - already reserved/released a some prior point
      • LIDVID(s) - first time attempting to reserve/release a DOI for this product

Capabilities

Once a status change has been identified for individual members of pending_submissions:

  • update the database with the updated status
  • return to iterating over the remaining pending_submissions (Note: be sure to maintain those submissions whose status has updated so we can report on them once all pending_submissions have been updated.)

Once all members of pending_submissions have changed status (or a timeout has occurred):

Design REST API and JSON response

We need to properly design the REST API and JSON response format for the DOI service.

Applicable requirements
πŸ¦„ #5
πŸ¦„ #6
πŸ¦„ #7
πŸ¦„ #8
πŸ¦„ #9
πŸ¦„ #10
πŸ¦„ #11

Reporter Comments
Should we play around with Swagger here? Or may not be worth the effort just yet.

Develop initial requirements and design for DOI Service

This web service should meet the following use cases:

  1. Generate DOI Object from PDS4 Label
    a. A user posts a bundle bundle/collection/product PDS4 label to the service.
    b. The service translates the metadata from the PDS4 label into the DOI/IAD Record Object
    c. The service return the IAD record object

Example Record Objects: DOI_bundle.xml.txt, DOI_collection_data.xml.txt

  1. User Submits DOI Object
    a. A user posts a DOI/IAD Record object
    b. The service verifies validity of the object
    c. The service posts the object to the Tracking Service
    i. Alternatively, the service could post the object to a file staging area or just include in email
    c. The service notifies Operator of DOI submission
    i. Alternatively, the service could send an email to Operator for manual vetting and submission.

  2. Operator Reserves DOI Object
    a. The authenticated Operator submits a DOI object to the service for reserve DOI
    b. The service validates the DOI object
    c. The service submit the DOI object to the IAD Service and verifies return values
    d. The service posts Reserved DOI information to Tracking Service and forwards response to Operator

  3. Operator Release DOI Object
    a. The authenticated Operator submits a DOI object to the service for release DOI
    b. The service validates the DOI object
    c. The service submit the DOI object to the IAD Service and verifies return values
    d. The service posts Released/Published DOI information to Tracking Service and forwards response to Operator

Other things to think about:

  • Ability to query DOIs - should probably be done by Tracking Service, but for workaround, could probably use DataCite
  • Accumulating volumes - allow for some easy way to version accumulating volumes
  • Best effort DOIs - e.g. "LROC RDR data" - give them the latest DOI for that data
  • Figure out how to track DOIs at a LID-level

More details on the IAD API and Schema: https://www.osti.gov/iad2/docs#record-model-fields

Update default DOI metadata according to changes in requirements

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.