Comments (1)
* Optional keys do not seem to be checked, a warning would be helpful [Missing Parser Warning for Missing Keys #35](https://github.com/OpenEnergyPlatform/omi/issues/35)
Added check for optional fields, which will raise a warning if missing
* If there's an error (more precise: some format problem, e.g. mandatory key is missing) while processing, OMI immediately stops e.g. stating `omi.dialects.base.parser.ParserException: metadata string does not contain an id`. In my opinion it'd be better to parse the entire metadata and give a list of errors/warnings, otherwise one might end up in a trial-and-error odyssey.
Currently, there are four validation steps:
- Parse metadata from JSON string
- Check metadata based on JSONschema
- Check license
- Check optional fields (only warnings, no errors)
If there is an error in one of this steps, validation will stop an throw an error - I don't see how this can be changed (if JSON cannot be read, you don't get a dict, you cannot go on...). BUT, I think JSONschema bundles its error messages, so at least you will have a single error for all schema violations.
So I think you will have to live, with some stages of error and no one error-message for all issues in your metadata file...
* Lacking details where error is located: e.g. if there's a malformed string OMI prints `dateutil.parser._parser.ParserError: String does not contain a date:`. Pardon, which field?
I think JSONschema gives more meaningful error messages...
from omi.
Related Issues (20)
- Source code is cluttered
- New validation function needed
- Conversion update for 1.5.2, 1.6 and 2.0
- More Error messages needed HOT 4
- Conversion creates empty fields when adding new metadata keys
- The metadata generated by the omi compiler has a modified key sequence HOT 1
- Documentation on how to use conversion is missing in RTD and Readme
- Include the metadata validation scripts from the oedatamodel HOT 14
- omi compiler for oemetadata results in some unexpected key names
- Adapt to github actions from travis
- OMI omits `null` values from json during processing
- Compiling metadata with minimum or empty fields causes a NoneType error.
- Return error report in OMI validation
- Inconsistent omi field names compared to oemetadata spec
- Evaluate integration of functions to generate metadata with ioprocmeta HOT 1
- metadata parser wrongly adds current date to temporal metadata
- Add new Issue-Templates
- Document and reuse existing methods to (auto-)generate OEMetadata
- Minor improvements to the key sequence and some api enhancements
- OMI rewrite
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 omi.