Add --update_ssds_provenance option and its basic implementation - #145
Merged
Conversation
Add early return in plot_2column() to avoid creating an empty _2column_cmocean.png when no instrument variables are present.
The .env file is meant to hold an API token for updating the SSDS_Metadata database with ProcessRun information.
This uses a new provenance.py module for submitting ProcessRun data set provenance information using the CRUD-style REST API of the mooring-ssds project.
Replace the multi-step CRUD orchestration (10–15 round trips: person lookup, software find-or-create, ProcessRun get-or-create, DataContainer get-or-create, input/resource linking) with a single POST to the new /api/process-runs/ endpoint. The server now resolves or creates all related entities atomically from natural keys (person_email, software_name/version, output_uri, input_uris, resources). Remove all client-side helpers that are no longer needed: _find_first, find_person_by_email, find_software, find_datacontainer, find_resource, _create_entity, _find_process_run_by_output, _ensure_link. Net change: -214 lines. Public API (get_dods_url, submit_process_run) and all call sites in process.py are unchanged. Closes mbari-org#144 (see also: previous junction-table linking bugs fixed while this endpoint was being developed on the server side)
- Add producer_name and producer_description to submit_process_run() and populate them with execution context in _submit_provenance() - Set software_uristring to the GitHub tree URL at the commit hash - Add output_dodsurlstring and input_dodsurlstrings with .html suffix for browsable OPeNDAP URLs - Refactor _submit_provenance() to accept base_path separately from output_nc, building the full path internally to match --log_file convention and produce correct OPeNDAP URLs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applies to #144