Comments (9)
See https://github.com/iiasa/ariadne-intern-workflow/blob/31cfbc2f9bf89b498a301b65cce56a585343a9c2/.github/workflows/validation.yml#L28 for a real-world use case.
from nomenclature.
Should be reasonably quick to implement. Who should take this one myself or @LauWien since she did the CLI originally?
from nomenclature.
I created the issue more as a reminder for the medium-term development. Let's leave this until next year...
from nomenclature.
On further thought: currently, nomenclature.testing.assert_valid_structure()
only validates the variable and region dimensions.
Going forward, the behavior should be as follows:
- by default, all sub-folders in
definitions
are validated - if a value for dimensions is given explicitly, (only) these dimensions are validated
This default is more cautious than only validating default dimensions because additional dimensions may be added over time in a project - and the user adding these dimensions may forget to add these new dimensions to the tests.
from nomenclature.
Hello!
I think my implementation works now.
A few questions still to make sure it's correct:
- Should the non-default dimensions only be the variables on an IamDataFrame (variable, scenario, ...) or could it be a random name? I figured it could be anything because of issue 68 but let me know.
- Now we can pass any number of arguments in the terminal like this "nomenclature validate-project path/myproject variable region scenario". Is it fine like this or do you prefer that the user enters the list in the form "['variable','region',...]"?
- I have a test with an empty dimension, a test working fine with a dimension '"scenario" and one also working fine with a random dimension "foo". Do I need more?
- Are there other steps for this issue?
Thank you!
from nomenclature.
- Should the non-default dimensions only be the variables on an IamDataFrame (variable, scenario, ...) or could it be a random name? I figured it could be anything because of issue 68 but let me know.
As a first PR, I would only add the feature to pass a list of dimensions via the CLI (and not worry about #68 yet).
- Now we can pass any number of arguments in the terminal like this "nomenclature validate-project path/myproject variable region scenario". Is it fine like this or do you prefer that the user enters the list in the form "['variable','region',...]"?
I would expect a CLI like
nomenclature validate-project . --dimensions=["variable", "region"]
so that we can add more options later.
- I have a test with an empty dimension, a test working fine with a dimension '"scenario" and one also working fine with a random dimension "foo". Do I need more?
As mentioned by @phackstock yesterday, it would be good to have one passing and one failing test. To make it easier for the reviewer, it would be useful to clearly name the test-data folders like "cli-dimension-failing" (with a dimension where the validation fails because something is not correct with the specifications) and a "cli-dimension-passing". In both cases, the dimension could be called "foo".
- Are there other steps for this issue?
Better to keep the PR as simple as possible, then discuss and review, merge - and then start another one with a next set of features.
from nomenclature.
OK thank you very much! Now I am stuck... Do either of you know how to pass a list as an option in CLI?
from nomenclature.
Looking at the click documentation quickly, this looks like a promising start https://click.palletsprojects.com/en/8.1.x/options/#multiple-options.
Also when you open a PR you can choose to open it as a draft PR which might be a good idea in this case, then we can discuss more closely to the code. Once it's all ready you set it to "ready for review". https://github.blog/2019-02-14-introducing-draft-pull-requests/
from nomenclature.
Great thank you!!
from nomenclature.
Related Issues (20)
- CLI is gone in v0.13.0 release
- Explicit CLI check does not work on Windows as part of GH action
- Add validation function that returns invalid items rather than logging+raising HOT 3
- Docs build currently failing
- Add link to ISO 3166-1 country list directly to docs
- Fix warnings
- Improve test coverage
- Fix multiple repo test
- Removing repositories after tests fails on Windows
- Double stacking external repos does not work as expected HOT 1
- Nomenclature not compatible with latest version of black
- Using only country in nomenclature config breaks CodeList HOT 2
- Update to pyam 2.1 breaks test_aggregation_differences_export
- Multiple external repo docs are not up to date
- Allow hierarchy filtering in nomenclature.yaml for importing regions form external repo
- Version number slightly broken
- Export complete DataStructureDefinition to Excel HOT 1
- Setting of repository attribute slightly broken
- Exclude defaults when writing to yaml
- Show source file and line for duplicate items
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.