Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions dodo.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,13 @@ def task_generate_meta_schemas():
name = Path(example.root_directory).name
yield {
"name": name,
"file_dep": [schema.file_path for schema in example.schemas]
+ [BASE_META_SCHEMA_PATH, CORE_SCHEMA_PATH, Path(SOURCE_PATH, "meta_schema.py")],
"file_dep": [schema.schema.file_path for schema in example.schemas]
+ [
BASE_META_SCHEMA_PATH,
CORE_SCHEMA_PATH,
Path(SOURCE_PATH, "meta_schema.py"),
Path(SOURCE_PATH, "schema.py"),
],
"targets": [schema.meta_schema_path for schema in example.schemas],
"actions": [(example.generate_meta_schemas, [])],
"clean": True,
Expand All @@ -54,7 +59,7 @@ def task_validate_schemas():
yield {
"name": name,
"task_dep": [f"generate_meta_schemas:{name}"],
"file_dep": [schema.file_path for schema in example.schemas]
"file_dep": [schema.schema.file_path for schema in example.schemas]
+ [schema.meta_schema_path for schema in example.schemas]
+ [BASE_META_SCHEMA_PATH, CORE_SCHEMA_PATH, Path(SOURCE_PATH, "meta_schema.py")],
"actions": [(example.validate_schemas, [])],
Expand All @@ -68,7 +73,7 @@ def task_generate_json_schemas():
yield {
"name": name,
"task_dep": [f"validate_schemas:{name}"],
"file_dep": [schema.file_path for schema in example.schemas]
"file_dep": [schema.schema.file_path for schema in example.schemas]
+ [schema.meta_schema_path for schema in example.schemas]
+ [CORE_SCHEMA_PATH, BASE_META_SCHEMA_PATH, Path(SOURCE_PATH, "schema_to_json.py")],
"targets": [schema.json_schema_path for schema in example.schemas],
Expand Down Expand Up @@ -98,7 +103,7 @@ def task_generate_markdown():
yield {
"name": name,
"targets": [template.markdown_output_path for template in example.doc_templates],
"file_dep": [schema.file_path for schema in example.schemas]
"file_dep": [schema.schema.file_path for schema in example.schemas]
+ [template.path for template in example.doc_templates]
+ [Path(SOURCE_PATH, "docs", "grid_table.py")],
"task_dep": [f"validate_schemas:{name}"],
Expand Down Expand Up @@ -131,7 +136,7 @@ def set_log_level(level):
yield {
"name": name,
"task_dep": [f"validate_schemas:{name}"],
"file_dep": [schema.file_path for schema in example.cpp_schemas]
"file_dep": [schema.schema.file_path for schema in example.cpp_schemas]
+ [schema.meta_schema_path for schema in example.schemas]
+ [
CORE_SCHEMA_PATH,
Expand Down Expand Up @@ -159,7 +164,7 @@ def task_generate_web_docs():
yield {
"name": name,
"task_dep": [f"validate_schemas:{name}", f"generate_json_schemas:{name}", f"validate_example_files:{name}"],
"file_dep": [schema.file_path for schema in example.schemas]
"file_dep": [schema.schema.file_path for schema in example.schemas]
+ [template.path for template in example.doc_templates]
+ [Path(SOURCE_PATH, "docs", "mkdocs_web.py")],
"targets": [Path(example.web_docs_directory_path, "public")],
Expand Down
18 changes: 9 additions & 9 deletions examples/address/schema/Address.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ Root:
Data Elements:
metadata:
Description: "Metadata"
Data Type: "{Metadata}"
Type: "{Metadata}"
Required: True
address:
Description: "Actual Address Data"
Data Type: "{Address}"
Type: "{Address}"
Required: True

SchemaType:
Expand All @@ -32,28 +32,28 @@ Address:
Data Elements:
street_address:
Description: "Street Address"
Data Type: "String"
Type: "String"
post_office_box:
Description: "Post office box"
Data Type: "String"
Type: "String"
extended_address:
Description: "Extended Address"
Data Type: "String"
Type: "String"
locality:
Description: "Locality"
Data Type: "String"
Type: "String"
Required: True
Notes: "E.g., city or town"
postal_code:
Description: "Postal Code"
Data Type: "String"
Type: "String"
region:
Description: "Region"
Data Type: "String"
Type: "String"
Required: True
Notes: "E.g., state or province"
country:
Description: "Country"
Data Type: "String"
Type: "String"
Required: True

4 changes: 3 additions & 1 deletion examples/fan_spec/cpp/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ dependencies:
- name: "courier"
url: "https://github.com/bigladder/courier.git"
- name: "fmt"
url: "https://github.com/fmtlib/fmt.git"
url: "https://github.com/fmtlib/fmt.git"
- name: "btwxt"
url: "https://github.com/bigladder/btwxt.git"
20 changes: 13 additions & 7 deletions examples/fan_spec/schema/ASHRAE205.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,18 @@ RepresentationSpecificationTemplate:
Required: True
description:
Required: False
Custom Attributes:
Scalable:
Type: Boolean
Applies To: ["Numeric"]
Description: "Indicates whether the value can be scaled"
Applies to Children: True

RatingTemplate:
Object Type: "Data Group Template"
Required Data Elements:
rating_reproducible_from_data:
Data Type: Boolean
Type: Boolean
Unit System: IPUnits

# Common Enumerations
Expand Down Expand Up @@ -174,24 +180,24 @@ LiquidMixture:
Data Elements:
liquid_components:
Description: "An array of all liquid components within the liquid mixture"
Data Type: "[{LiquidComponent}]"
Type: "[{LiquidComponent}]"
Required: True
Notes: "Array may contain a single component"
concentration_type:
Description: "Defines whether concentration is defined on a volume or mass basis"
Data Type: "<ConcentrationType>"
Type: "<ConcentrationType>"
Required: True

LiquidComponent:
Object Type: "Data Group"
Data Elements:
liquid_constituent:
Description: "Substance of this component of the mixture"
Data Type: "<LiquidConstituent>"
Type: "<LiquidConstituent>"
Required: True
concentration:
Description: "Concentration of this component of the mixture"
Data Type: "Numeric"
Type: "Numeric"
Units: "-"
Constraints: [">=0.0", "<=1.0"]
Notes: "If omitted, assume equal distribution with any other component with no defined concentration (e.g., can be left blank for the primary component)"
Expand All @@ -201,13 +207,13 @@ Scaling:
Data Elements:
minimum:
Description: "Minimum scaling factor"
Data Type: "Numeric"
Type: "Numeric"
Units: "-"
Constraints: [">0.0", "<=1.0"]
Notes: "If not specified, may be scaled down to any value greater than zero"
maximum:
Description: "Maximum scaling factor"
Data Type: "Numeric"
Type: "Numeric"
Units: "-"
Constraints: [">=1.0"]
Notes: "If not specified, unlimited"
Loading
Loading