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 fails in CI if no value is provided for the methodology_transparency field #72

Open
demeringo opened this issue Nov 28, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@demeringo
Copy link
Contributor

demeringo commented Nov 28, 2024

Bug description

See the failed validation of this PR #71

To Reproduce

Creat a new entry (new tool), without providing a value of the field methodology_transparency.

=> validation fails in CI

With this error:

Valid: 32 Columns: ("tool_name", "organization", "website", "sub_module", "environmental_indicator", "quick_description", "assessment_type", "main_perimeter", "other_perimeters", "assessed_functional_unit", "data_entry_points", "life_cycle_steps", "ghg_scope", "focus", "licence", "self_hostable", "originating_country", "logo", "inside_models", "methodology_transparency", "ref_sources", "status", "Creator", "Creation date", "Creator_comment", "reviewer_1", "review_1_date", "review_1_explanation", "reviewer_2", "review_2_date", "review_2_explanation", "Linked Publications"); Records: 74; Delimiter: ,
─────────────────────────────────── Dataset ────────────────────────────────────
                dataset                
┏━━━━━━━┳━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━┓
┃ name  ┃ type  ┃ path      ┃ status  ┃
┡━━━━━━━╇━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━┩
│ tools │ table │ tools.csv │ INVALID │
└───────┴───────┴───────────┴─────────┘
──────────────────────────────────── Tables ────────────────────────────────────
                                     tools                                      
┏━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Row ┃ Field ┃ Type             ┃ Message                                     ┃
┡━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ 75  │ 20    │ constraint-error │ The cell "null" in row at position "75" and │
│     │       │                  │ field "methodology_transparency" at         │
│     │       │                  │ position "20" does not conform to a         │
│     │       │                  │ constraint: constraint "enum" is            │
│     │       │                  │ "['Undisclosed', 'Disclosed only to         │
│     │       │                  │ internal stakeholders or clients',          │
│     │       │                  │ 'Disclosed to a scientific panel who did    │
│     │       │                  │ not share the results', 'Disclosed to a     │
│     │       │                  │ scientific panel who shared the results',   │
│     │       │                  │ 'Fully Disclosed', 'Not Applicable']"       │
└─────┴───────┴──────────────────┴─────────────────────────────────────────────┘

Validation fails

Expected behavior

Either make the field not mandatory in validation, or initialize it with a default value.

JSON OUTPUT

Additional context

@demeringo demeringo added the bug Something isn't working label Nov 28, 2024
@demeringo demeringo self-assigned this Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant