Comments (4)
Sounds like a good strategy, thanks!
from nomenclature.
The validation is happening as part of an iteration over all file names anyway, so why not catch the error that happens in the parsing of a particular file, add the message "The following occurred in file {file}: {error.message}", then raise the error again?
from nomenclature.
Good point, but I don't think that it's the cleanest way to intercept our own errors and then pop something on. Simply saving the file name does not cost that much memory.
Additionally, there is a use case where having the file name inside the RegionAggregationMapping
is rather useful. When checking if there are any model collisions for the given region mappings. Let's say we have two mappings both for model_a
, we only realize the error once we are reading the second file that defines a mapping for model_a
. However, I would argue its important for the user to know both conflicting files. If we have it saved inside the RegionAggregationMapping
that piece of information is easy to come by.
from nomenclature.
Perfect, I'll open a PR as soon as I have something
from nomenclature.
Related Issues (20)
- Pandas 2.0 breaks test_check_aggregate.expected_fail_return
- MetaCode brainstorming HOT 6
- Align Processor structure HOT 2
- Use different name for ISO3-code attribute
- Improve required data output
- pydantic 2.0 breaks nomenclature
- General options for a DataStructureDefinition HOT 3
- Enable using model mappings from external repository
- Implement MetaCodeList-validation using pandera
- Get relative path fails if file is not part of current working directory
- nomenclature install from GitHub fails exclude tests HOT 1
- Refactor and extend RequiredDataValidator HOT 2
- Invalid regions do not raise an error as part of RegionProcessor
- General-config fails if folder is not present
- country names HOT 2
- Potential conflicts with overlapping region-aggregation instructions
- Upgrade to use latest pydantic HOT 1
- Allow wildcard variables HOT 1
- Mix multiple external repos in a single dimension
- Nightly tests fail to run
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 nomenclature.