{"id":19292127,"url":"https://github.com/nasa-pds/doi-service","last_synced_at":"2026-03-10T07:05:26.226Z","repository":{"id":37482779,"uuid":"236099103","full_name":"NASA-PDS/doi-service","owner":"NASA-PDS","description":"Service and tools for generating DOIs for PDS bundles, collections, and data sets","archived":false,"fork":false,"pushed_at":"2024-12-02T17:40:21.000Z","size":10063,"stargazers_count":2,"open_issues_count":76,"forks_count":3,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-08T21:47:16.055Z","etag":null,"topics":["doi","nasa","nasa-pds","pds"],"latest_commit_sha":null,"homepage":"https://nasa-pds.github.io/doi-service","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NASA-PDS.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":"docs/support/faqs.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-24T23:10:35.000Z","updated_at":"2024-09-16T18:05:59.000Z","dependencies_parsed_at":"2024-05-06T19:39:30.243Z","dependency_job_id":"ce0c4c3a-be4d-4f36-b2f9-fd4480e67cc9","html_url":"https://github.com/NASA-PDS/doi-service","commit_stats":null,"previous_names":["nasa-pds/pds-doi-service"],"tags_count":30,"template":false,"template_full_name":"NASA-PDS/template-repo-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NASA-PDS%2Fdoi-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NASA-PDS%2Fdoi-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NASA-PDS%2Fdoi-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NASA-PDS%2Fdoi-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NASA-PDS","download_url":"https://codeload.github.com/NASA-PDS/doi-service/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250183278,"owners_count":21388684,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["doi","nasa","nasa-pds","pds"],"created_at":"2024-11-09T22:29:25.599Z","updated_at":"2026-02-10T23:08:19.941Z","avatar_url":"https://github.com/NASA-PDS.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NASA PDS DOI Service\n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5764878.svg)](https://doi.org/10.5281/zenodo.5764878) [![🤪 Unstable integration \u0026 delivery](https://github.com/NASA-PDS/doi-service/actions/workflows/unstable-cicd.yaml/badge.svg)](https://github.com/NASA-PDS/doi-service/actions/workflows/unstable-cicd.yaml) [![😌 Stable integration \u0026 delivery](https://github.com/NASA-PDS/doi-service/actions/workflows/stable-cicd.yaml/badge.svg)](https://github.com/NASA-PDS/doi-service/actions/workflows/stable-cicd.yaml)\n\nThe Planetary Data System (PDS) Digital Object Identifier (DOI) Service provides tools for PDS operators to mint [DOI](https://www.doi.org/)s.\n\n\n## Prerequisites\n\n- Python 3.12 or above\n- A login to the DOI Service Provider endpoint server (currently DataCite)\n\n\n## User Documentation\n\nPlease visit the documentation at: https://nasa-pds.github.io/doi-service/\n\n\n## Developers\n\n[JPL Internal Wiki](https://wiki.jpl.nasa.gov/display/PDSEN/DOI+Service)\n\nGet the code and work on a branch:\n\n    git clone ...\n    git checkout -b \"#\u003cissue number\u003e\"\n\nInstall a Python virtual environment, say in a `venv` directory:\n\n    python3 -m venv venv\n    source venv/bin/activate\n\n    # On Windows\n    .\\venv\\Scripts\\activate\n\nInstall the package and its dependencies for development into the virtual environment:\n\n    pip install --editable \".[dev]\"\n\nIf you get an error like\n\n    src/types.h:36:2: error: You need a compatible libgit2 version (1.1.x)\n\nthen you're probably using [brew.sh](https://brew.sh)'s Python 3.10. Use their Python 3.12 or 3.13 instead.\n\nUpdate your local configuration to access the DOI service provider's test server.\n\nCreate a file in the base directory of the project named `pds_doi_service.ini`; the following may be used as a template\n\n    [SERVICE]\n    # Should be set to DataCite (case-insensitive)\n    provider = datacite\n\n    [DATACITE]\n    # Select the appropriate URL endpoint for either a test or production deployment\n    url = https://api.test.datacite.org/dois\n    #url = https://api.datacite.org/dois\n    user = \u003ccontact [PDS Help Desk](https://pds.nasa.gov/?feedback=true)\u003e\n    password = \u003ccontact [PDS Help Desk](https://pds.nasa.gov/?feedback=true)\u003e\n    doi_prefix = 10.17189\n    validate_against_schema = True\n\n    [OSTI]\n    # This section is kept for posterity, but should be ignored as OSTI is no longer a supported endpoint\n    url = https://www.osti.gov/iad2test/api/records\n    #url = https://www.osti.gov/iad2/api/records\n    user = \u003ccontact [PDS Help Desk](https://pds.nasa.gov/?feedback=true)\u003e\n    password = \u003ccontact [PDS Help Desk](https://pds.nasa.gov/?feedback=true)\u003e\n    doi_prefix = 10.17189\n    validate_against_schema = True\n\n    [PDS4_DICTIONARY]\n    url = https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_JSON_1D00.JSON\n    pds_node_identifier = 0001_NASA_PDS_1.pds.Node.pds.name\n\n    [API_AUTHENTICATION]\n    # Add the issuer of the oauth tokens, for cognito https://cognito-idp.\u003caws-region\u003e.amazonaws.com/\u003cuserpoolID\u003e\n    jwt_issuer =\n    # Add the entire content of the JSON file at https://cognito-idp.\u003caws-region\u003e.amazonaws.com/\u003cuserpoolID\u003e/.well-known/jwks.json\n    json_web_key_set =\n    jwt_lifetime_seconds = 3600\n    jwt_algorithm = RS256\n\n    [OTHER]\n    logging_level = INFO\n    doi_publisher = NASA Planetary Data System\n    global_keyword_values = PDS,PDS4\n    pds_uri = https://pds.nasa.gov/pds4/pds/v1/\n    transaction_dir = ./transaction_history\n    db_file = doi.db\n    db_table = doi\n    api_host = 0.0.0.0\n    api_port = 8080\n    api_valid_referrers =\n    emailer_local_host = localhost\n    emailer_port       = 25\n    emailer_sender     = pdsen-doi-test@jpl.nasa.gov\n    emailer_receivers  = pdsen-doi-test@jpl.nasa.gov\n\n\n## Launch API server\n\nTo run the DOI API server, try:\n\n```console\n$ pip install pds-doi-service\n$ pds-doi-api\n```\n\nThe started service documentation is available on http://localhost:8080/PDS_APIs/pds_doi_api/0.2/ui/\n\n👉 **Note:** When the `api_valid_referrers` option is set in `pds_doi_service.ini`, this service documentation UI will be unavailable.\n\n\n## Running with Docker\n\nTo run the server on a Docker container, please execute the following from the package directory:\n\n```console\n$ # building the image\n$ docker image build --tag pds-doi-service --file docker/Dockerfile .\n$ # starting up a container\n$ docker container run --publish 8080:8080 pds-doi-service\n```\n\nHowever, note that when launching the container via `docker container run`, all configuration values are derived from the default INI file bundled with the repository. To override the configuration, it is recommended to launch the service via a Docker Composition:\n\n```console\n$ cd docker\n$ # Make a copy of the docker composition environment template:\n$ cp doi_service.env.in doi_service.env\n$ # Edit the environment file, setting the credentials within:\n$ vi doi_service.env\n$ # Start the composition; on some systems, `docker compose` is `docker-compose`:\n$ docker compose up\n```\n\nThis will launch the DOI Service container using the `docker-compose.yaml` file in the `docker` subdirectory, which specifies that environment variables be imported from `doi_service.env`. Modify `doi_service.env` (after copying it from `doi_service.env.in`) to define any configuration values to override when the service is launched.\n\n## Test\n\nTesting details are detailed in this section.\n\n\n### Tox (for developers)\n\n#### N.B. Updates to pip dependencies are not automatically applied to existing tox virtual environments, to keep unit testing fast.  The simplest way to propagate dependency updates is to delete `./.tox` and run tox again.\n\n[tox](https://tox.readthedocs.io/) is installed automatically during `pip install --editable \".[dev]\"`, and provides virtual environments and run configurations for\n- unit/functional testing\n- linting\n- building the rich documentation.\n\nTo launch the full set of tests, simply set the following environment variables:\n\n- `CI` should be set to `true`\n- `DATACITE_USER` should be set to the PDS username of the testing Datacite instance\n- `DATACITE_PASSWORD` should be set to that username's password\n\nThen run:\n\n    tox\n\nYou can also run individual components:\n\n```console\n$ tox -e tests  # Run unit, functional, and integration tests\n$ tox -e lint  # Run flake8, mypy, and black code reformatting\n$ tox -e docs  # Build the documentation to see if that works\n```\n\nIt is strongly recommended to add `tox -e lint` to your `pre-commit` [git hook](https://www.atlassian.com/git/tutorials/git-hooks), and `tox -e tests` in a `pre-push` hook, as only linted and test-passing PRs will be merged.\n\nThe following linting example is provided for ease of use:\n\n```bash\nSTAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep \".py$\")\n\necho \"Linting files\"\ntox -e lint\ngit add $STAGED_FILES  # add any lint-related changes to the current commit\n\nif [ $? -ne 0 ]\nthen\n    echo \"Initial lint detected errors, re-linting to determine whether errors remain\"\n    tox -e lint\n    if [ $? -ne 0 ]\n    then\n      exit 1\n    fi\nfi\n\nexit 0\n```\n\nYou can also run `pytest`, `sphinx-build`, `mypy`, etc., if that's more your speed.\n\n\n### ~~Behavioral testing (for Integration \u0026 Testing)~~\n\n~~Behavioral tests are also pre-installed in the Python virtual environment when you run `pip install --editable .[dev]`. Launch those by running:~~\n\n    behave\n\n~~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`)~~\n\n~~You can also run them for a nicer reporting:~~\n\n    behave -f allure_behave.formatter:AllureFormatter -o ./allure ./features\n    allure service allure\n\n~~👉 **Note:** This assumes you have [Allure Test Reporting](http://allure.qatools.ru/) framework installed.~~\n\n\n#### Testrail Reporting\n\nTest reports can be pushed to [Testrail](https://cae-testrail.jpl.nasa.gov/testrail/)\n\nProject: Planetary Data System (PDS)\nTest suite: pds-doi-service\n\nSet your environment:\n\n    export TESTRAIL_USER=\u003cyour email in testrail\u003e\n    export TESTRAIL_KEY=\u003cyour API key in tesrail\u003e\n\nRun the tests:\n\n    behave\n\nSee the results in https://cae-testrail.jpl.nasa.gov/testrail/index.php?/projects/overview/168\n\n👉 **Note:** This assumes you have access to the [Jet Propulsion Laboratory's Testrail installation](https://opencae.jpl.nasa.gov/portal/#/tool-detail/site__18_5_3_83a025f_1554392171681_999533_17603_cover).\n\n\n## Documentation Management\n\nDocumentation about the documentation is described in this section.\n\n\n### Design\n\nSee in this repository:\n\n    https://github.com/NASA-PDS/pds-doi-service/tree/main/docs\n\nor the `docs` directory in the source package.\n\n\n### User Documentation\n\nUser documentation is managed with Sphinx, which is also installed in your Python virtual environment when you run `pip install --editable \".[dev]\"`. You can use `tox` as described above to make the docs, or by hand at any time by running:\n\n    sphinx-build -ab html docs/source docs/build\n\n\n## Build \u0026 Release\n\nThe build and release process is managed by [GitHub Actions](https://github.com/features/actions) and the [Roundup](https://github.com/NASA-PDS/roundup-action).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnasa-pds%2Fdoi-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnasa-pds%2Fdoi-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnasa-pds%2Fdoi-service/lists"}