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

Clarification: @optional means full, empty, or partially full? #23

Open
mhGLEIF opened this issue Jan 3, 2019 · 2 comments
Open

Clarification: @optional means full, empty, or partially full? #23

mhGLEIF opened this issue Jan 3, 2019 · 2 comments
Assignees
Labels

Comments

@mhGLEIF
Copy link

mhGLEIF commented Jan 3, 2019

Another trivial clarification, I'm afraid 🙁

I am using @optional currently in a csvs to mean a column may hold one of

  • any of the allowed values defined for that column (in all cells)
  • any of the allowed values defined for that column (in some of the cells with the rest empty)
  • no values (totally empty column, just a header and n blank cells)

Is that the intended meaning? It seems to be from the way the validator works?

It's not totally clear to me from the doc if a partially empty column is OK:

http://digital-preservation.github.io/csv-schema/csv-schema-1.1.html#column-definitions-examples

Is there a different directive for this?

@DavidUnderdown
Copy link
Contributor

Testing is always row-by-row, so yes a partially empty column would be fine - @optional is effectively equivalent to adding "or empty" to your column test.

I see if I can think of some clearer wording.

@mhGLEIF
Copy link
Author

mhGLEIF commented Jan 4, 2019

Thanks for clarifying. So "column" is shorthand for "the cell in this column in this row". As I surmised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants