Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PDS label file paths and manifest files as additional possible inputs #745

Merged
merged 6 commits into from
Nov 2, 2023

Conversation

al-niessner
Copy link
Contributor

🗒️ Summary

Allow argument to any one or more of lidvid, label, and/or manifest.

⚙️ Test Data and/or Report

Unit tests pass as do test using manifest file (new test file). New help message:

Checks the search DB that all references exist. If the api-auth is
provided, then it will also check that the registry API also finds all the
references.

All arguments are either a lidvid, label, or manifest file.
   A lidvid must start with urn:nasa:pds:.
   A label must be a well formed PDS XML file.
   A manifest file is one item per line with an item being a lidvid or
label. Each line must be terminated by a LF.

Multiple arguments may be given in any order: 'urn:nasa:pds:foo::1.0
label.xml urn:nasa:pds:bar::2.0 manifest.txt'.

 -A,--auth-api <auth-file>          file with the URL and credential
                                    content to have full (all product
                                    states) read-only access to the
                                    registry API
 -a,--auth-opensearch <auth-file>   file with the URL and credential
                                    content to have full, direct read-only
                                    access to the search DB
 -h,--help                          show this text and exit
 -t,--threads <count>               process the lidvids in parallel
                                    (multiple threads) with this argument
                                    being the maximum number of threads
 -verbose,--verbose                 set logging level to INFO

An auth-file is either a text file of the Java property format with two
variables: 'url' and 'credentials'. The 'url' property should be the
complete base URL to the Registry Search endpoint or Search API, e.g.
'https://localhost:9876/base', and 'credentials' a path to a java property
file with the user name, password, and other credential information as
that used by harvest. Or it is an XML text file used by harvest with
<registry> containing the 'auth' attribute.

♻️ Related Issues

Closes #741

Al Niessner added 2 commits November 1, 2023 09:16
A lidvid must start with urn:nasa:pds: to be detected as such.

A label must be a well formed PDS4 XML file.

A manifest file is a one item per line where an item may be either a lidvid or a label.
@al-niessner al-niessner requested a review from a team as a code owner November 1, 2023 16:29
Copy link
Member

@nutjob4life nutjob4life left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although this also has the Java exceptions "gotcha" (throws Exception) the rest of validate does too, so approved! 👍

@jordanpadams jordanpadams changed the title Issue 741: more complete argument parsing Add paths to labels and manifest files as possible inputs Nov 1, 2023
@jordanpadams jordanpadams changed the title Add paths to labels and manifest files as possible inputs Add PDS label file paths and manifest files as additional possible inputs Nov 1, 2023
jordanpadams and others added 3 commits November 1, 2023 17:42
Expand help information to be more descriptive for users.
@jordanpadams jordanpadams merged commit f49894e into main Nov 2, 2023
@jordanpadams jordanpadams deleted the issue_741 branch November 2, 2023 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants