Comments (1)
The import
key is removed from the dictionary after resolving its contents and before the model definition reaches the schema validator. This means that standard VSCode schema validator won't work well.
In fact, the way we allow a. relative file imports, b. applications of overrides, and c. loading tabular data, means that IDE schema validators are likely to complain frequently. For instance, the schema requires a technology to define a parent
, but you could define the following two YAML files:
file1.yaml
techs:
tech1:
parent: supply
file2.yaml
techs:
tech1:
flow_cap_max: 10
And merge them together with import
in model.yaml
:
import:
- file1.yaml
- file2.yaml
Your IDE linter will complain that there is no parent
defined in file2.yaml
. However, this is perfectly valid for Calliope.
Similarly, the schema checks that cost_...
parameters have defined costs
as one of the dims
. But you could define this in tech_groups
and it would be valid for Calliope:
tech_groups:
foo:
cost_flow_cap:
data: null
index: monetary
dims: costs
techs:
bar:
inherit: foo
cost_flow_cap.data: 1 # the IDE linter will complain.
from calliope.
Related Issues (20)
- Ensuring data and model configuration remain in sync at all times (model, backend, backendmath) HOT 12
- Mispaced math documentation guide in pre-defined math HOT 1
- Improving the handling of invalid backends HOT 1
- Invalid configuration showing for un-activated modes due to schema defaults HOT 4
- Account for python's optimize mode to enable faster model building HOT 2
- Use of native sparse array support in xarray / pandas / netCDF HOT 6
- Default parameter duplication and separation of "lookups" HOT 11
- Isolate postprocessing data creation methods HOT 10
- AttrDict fails when uniting regular dicts HOT 4
- Letting users define parameters and additional dimensions in YAML files HOT 8
- Proposed fixes / consistency changes for documentation HOT 6
- Potential misinterpretation of (internal) cost calculation related to OM cost term HOT 4
- Setting storage_initial and cyclic_storage HOT 3
- Possible duplicate links
- Wrong "in domain" symbol HOT 4
- Wording in `flow_cap_min` HOT 1
- Is `available_flow_cap` correct under various settings?
- constraints.force_asyncronous_prod_con breaks storage capacity expansion and dispatch in 0.6.10
- No unit for `global_expressions` set, even if schema requires HOT 2
- cost_var duplicate index error with multiple carriers HOT 1
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 calliope.