Giter VIP home page Giter VIP logo

Comments (1)

brynpickering avatar brynpickering commented on August 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.