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

validation: improve warning message for unexpected properties #693

Merged

Conversation

giuseppe-steduto
Copy link
Member

Change the warning message generated when unexpected properties are
found in the REANA specification during the validation phase to include
the path to the invalidating properties.

Closes #679.

Copy link

codecov bot commented Nov 22, 2023

Codecov Report

Merging #693 (208a8e6) into master (691a378) will decrease coverage by 0.05%.
The diff coverage is 25.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #693      +/-   ##
==========================================
- Coverage   58.62%   58.57%   -0.05%     
==========================================
  Files          24       24              
  Lines        2388     2390       +2     
==========================================
  Hits         1400     1400              
- Misses        988      990       +2     
Files Coverage Δ
reana_client/validation/utils.py 73.43% <25.00%> (-2.37%) ⬇️

if warning_key == "additional_properties":
# warning_values is a list of unexpected properties
messages = [
f"'{value['property']}' (at {value['path']})"
Copy link
Member

Choose a reason for hiding this comment

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

The path might be empty, so sometimes this is shown:
Unexpected properties found in REANA specification file: 'environment' (at )

setup.py Outdated
@@ -45,7 +45,7 @@
"click>=7",
"pathspec==0.9.0",
"jsonpointer>=2.0",
"reana-commons[yadage,snakemake,cwl]>=0.9.4a1,<0.10.0",
"reana-commons[yadage,snakemake,cwl]>=0.9.4a4,<0.10.0",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"reana-commons[yadage,snakemake,cwl]>=0.9.4a4,<0.10.0",
"reana-commons[yadage,snakemake,cwl]>=0.9.4a3,<0.10.0",

After this CI should pass!

Change the warning message generated when unexpected properties are
found in the REANA specification during the validation phase to include
the path to the invalidating properties.

Closes reanahub#679.
@mdonadoni mdonadoni merged commit 208a8e6 into reanahub:master Dec 1, 2023
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

validate: detecting misplaced environment clause for Serial workflows
2 participants