Comments (2)
We had a required
at one point, but you can replicate it with:
sex:
Or for multiple fields:
sex:
lifeStage:
recordedBy:
Listing a field in the specifications will trigger a test for that field. If that field cannot be found, than the implementation will throw an error.
However, empty: False
is implied by default for any field (the field cannot be empty). So, if you rather just know if a field is available, without making any statements about its content, you should use:
sex:
empty: True
Also note that the specifications dictate what will be tested in the data file, not the other way. So if a data file contains fields that are not listed in the specification, that this will not throw any warning or error.
from whip.
Oh, the required
we had was also term1 : required
, term2 : required
not required: term1, term2
as you suggest. Anyway, I like the syntax as in my previous comment, because it does not break the term: specification
pattern.
Also, it allows to start a specification quite gentle:
scientificName:
empty: True
recordedBy:
empty: True
(both terms above should be in the file)
And you can extend it easily to a more robust specification:
scientificName:
allowed: [...]
recordedBy:
delimitedvalues:
delimiter: " | "
regex: ...
from whip.
Related Issues (19)
- Look into swagger
- redundant evaluation test `equals` HOT 2
- Priority of the `empty` test validation HOT 1
- Add specifications HOT 2
- Create test file from examples in specification
- Questions about numberformat HOT 2
- Ok to ONLY accept empty values with empty: True?
- Declare external vocabularies HOT 5
- Usage of the word 'allowed' HOT 2
- Lookup values HOT 3
- whip vs DQ IG Tests and assertions HOT 1
- Can we get rid of "type", but then how to define an integer? HOT 5
- When does a value need to be quoted? HOT 2
- Negative values not covered with current syntax on `numberformat` HOT 2
- Handling integers inside schema definition
- Feature request: Checks for multi-column data consistency HOT 2
- Add documentation on how the specifications can tackle different NaN options
- Support "forbidden" as a test
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whip.