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 capability for user to input JSON file with additional context products #28

Closed
jordanpadams opened this issue Jun 27, 2019 · 4 comments · Fixed by #60
Closed

Add capability for user to input JSON file with additional context products #28

jordanpadams opened this issue Jun 27, 2019 · 4 comments · Fixed by #60
Assignees
Labels
enhancement New feature or request

Comments

@jordanpadams
Copy link
Member

For development purposes, a data producer may have context products that are not registered that are in their data products being validated. Right now, documentation notes user should update JSON config file with additional products.

This new feature should allow for a JSON file to be included via command-line instead of requiring an update to the existing config file.

@danyu-pds
Copy link
Contributor

@jordanpadams
If a data producer have context products that are not registered (not-registered_context_products file) and can be get from the command-line, will the validate use the not-registered_context_products file only or not-registered_context_products file and registered_context_products file?

@jordanpadams
Copy link
Member Author

@danyu-pds both not-registered_context_products file and registered_context_products file .

in addition, when the not-registered_context_products file is specified, we should throw a warning that this should be used for archive development only, and all context products need to be registered for a valid released archive bundle.

@danyu-pds
Copy link
Contributor

OK.
Thanks!

danyu-pds pushed a commit that referenced this issue Jul 25, 2019
context products

Added option --no-registe-prod-context <dir/file.json> to give the
not-registered_context_products JSON file.

Created Product_Context map with REGISTERED_PRODUCTs and
NON_REGISTERED_PRODUCTs if it is available.

Added a problem type NON_REGISTERED_PRODUCT for warning message.
@danyu-pds
Copy link
Contributor

Added option --no-registe-prod-context <dir/file.json> to give the
not-registered_context_products JSON file.

Created Product_Context map with REGISTERED_PRODUCTs and
NON_REGISTERED_PRODUCTs if it is available.

Added a problem type NON_REGISTERED_PRODUCT for warning message.

To test this:
Run the script:
validate --no-registe-prod-context <dir/json file>

For example:
validate --no-registe-prod-context ~/PDS-EN/temp/non_registered_context_products_test.json

In the output of report will see:
PDS Validate Tool Report
... ...
Parameters:
... ...
Registered Contexts File /Users/danyu/git/validate/target/validate-1.16.0-SNAPSHOT/resources/registered_context_products.json
Non Registered Contexts File /Users/danyu/PDS-EN/temp/non_registered_context_products_test.json

Product Level Validation Results

PASS: gov.nasa.pds.validate.ValidateLauncher
INFO [info.validation.general] number of Registered Products: 1893
INFO [info.validation.general] number of Non Registered Products: 10
WARNING [warning.product_not_registered] This should be used for archive development only, and all context products need to be registered for a valid released archive bundle.
INFO [info.validation.general] Total number of Product Context: 1903

Summary:

0 error(s)
1 warning(s)

Message Types:
1 warning.product_not_registered

End of Report

jordanpadams pushed a commit that referenced this issue Jul 26, 2019
… context products (#60)

* issue #28: Add capability for user to input JSON file with additional
context products

Added option --no-registe-prod-context <dir/file.json> to give the
not-registered_context_products JSON file.

Created Product_Context map with REGISTERED_PRODUCTs and
NON_REGISTERED_PRODUCTs if it is available.

Added a problem type NON_REGISTERED_PRODUCT for warning message.

* Fixed a typo

* Updates to error handling and CLI info

* Added error handling for bad JSON file
* Modified CLI info to be more user-friendly
jordanpadams added a commit that referenced this issue Jul 26, 2019
Issue #28: Integration tests for new feature checkout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants