-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
576ac4d
commit 23366e0
Showing
7 changed files
with
231 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
title = "Mesh Record Component" | ||
|
||
############################################# | ||
# Requirement 1: This is a record component # | ||
############################################# | ||
|
||
[[allOf]] | ||
title = "Record Component" | ||
"$ref" = "record_component.json" | ||
|
||
################################################## | ||
# Requirement 2: Mesh Record Component Specifics # | ||
################################################## | ||
|
||
[[allOf]] | ||
title = "Mesh Record Component" | ||
description = "Single component in a mesh record." | ||
type = "object" | ||
required = ["attributes"] | ||
|
||
[allOf.properties.attributes] | ||
required = ["position"] | ||
title = "Record Component attributes" | ||
description = "Standard-defined attributes at the Record Component level." | ||
|
||
[allOf.properties.attributes.properties] | ||
position."$ref" = "attribute_defs.json#/$defs/vec_float_attribute" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
type = "object" | ||
title = "Particle Species" | ||
description = "Dict of particle quantities." | ||
propertyNames.pattern = "^\\w*$" | ||
|
||
[properties.attributes] | ||
|
||
################################################## | ||
# First requirement: standard-defined attributes # | ||
################################################## | ||
|
||
[[properties.attributes.allOf]] | ||
title = "Particle Species attributes" | ||
description = "Standard-defined attributes at the Particle Species level." | ||
# No required attributes | ||
required = [] | ||
|
||
[properties.attributes.allOf.properties] | ||
id."$ref" = "attribute_defs.json#/$defs/int_attribute" | ||
|
||
#################################################### | ||
# Second requirement: General layout of attributes # | ||
#################################################### | ||
|
||
[[properties.attributes.allOf]] | ||
title = "Attribute layout" | ||
description = "Custom attributes allowed, no required attributes defined." | ||
"$ref" = "attributes.json" | ||
|
||
|
||
[patternProperties."^(?!(attributes|particlePatches)).*"] | ||
title = "Record" | ||
"$ref" = "record.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
######################################################### | ||
# Requirement 1: Mesh-specific structure and attributes # | ||
######################################################### | ||
|
||
[[allOf]] | ||
|
||
type = "object" | ||
required = ["attributes"] | ||
title = "Record" | ||
description = "A list of particle quantities." | ||
|
||
[allOf.properties.attributes] | ||
title = "Attributes" | ||
|
||
#################################### | ||
# Requirement 1.1: Mesh attributes # | ||
#################################### | ||
|
||
[[allOf.properties.attributes.allOf]] | ||
|
||
title = "Particle Record attributes" | ||
description = "Standard-defined attributes at the Particle Record level." | ||
required = ["timeOffset", "unitDimension"] | ||
|
||
[allOf.properties.attributes.allOf.properties] | ||
|
||
timeOffset."$ref" = "attribute_defs.json#/$defs/float_attribute" | ||
unitDimension."$ref" = "attribute_defs.json#/$defs/unitDimension" | ||
dataOrder."$ref" = "attribute_defs.json#/$defs/string_attribute" | ||
|
||
################################################ | ||
# Requirement 1.2: Generic attribute structure # | ||
################################################ | ||
|
||
[[allOf.properties.attributes.allOf]] | ||
title = "Attribute layout" | ||
"$ref" = "attributes.json" | ||
|
||
###################################### | ||
# Requirement 2: Contains components # | ||
###################################### | ||
|
||
[[allOf]] | ||
title = "Contains components" | ||
|
||
#################################################### | ||
# Requirement 2.1: Either this is a scalar mesh... # | ||
#################################################### | ||
|
||
[[allOf.oneOf]] | ||
title = "Scalar component" | ||
"$ref" = "record_component.json" | ||
|
||
################################################# | ||
# Requirement 2.2: ... or it's a vector mesh. # | ||
# Note that exactly one of these two conditions # | ||
# must be true, not both at once (oneOf). # | ||
################################################# | ||
|
||
[[allOf.oneOf]] | ||
title = "Vector component" | ||
description = "Additionally to the attributes, at least one component must be contained" | ||
# The attributes are contained in this dict, and at least one further | ||
# non-scalar component. Hence, we require at least two entries. | ||
minProperties = 2 | ||
propertyNames.pattern = "^\\w*$" | ||
|
||
[allOf.oneOf.patternProperties] | ||
|
||
[allOf.oneOf.patternProperties."^(?!attributes).*"] | ||
title = "Scalar component" | ||
"$ref" = "record_component.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
############################################## | ||
# Requirement 1: Record Component attributes # | ||
############################################## | ||
|
||
[[allOf]] | ||
title = "Record Component" | ||
description = "Single component in a record." | ||
type = "object" | ||
required = ["attributes"] | ||
|
||
[allOf.properties.attributes] | ||
title = "Attributes" | ||
|
||
################################################ | ||
# Requirement 1.1: Standard-defined attributes # | ||
################################################ | ||
|
||
[[allOf.properties.attributes.allOf]] | ||
title = "Record Component attributes" | ||
description = "Standard-defined attributes at the Record Component level." | ||
required = ["unitSI"] | ||
|
||
[allOf.properties.attributes.allOf.properties] | ||
unitSI."$ref" = "attribute_defs.json#/$defs/float_attribute" | ||
|
||
############################################# | ||
# Requirement 1.2: Generic attribute layout # | ||
############################################# | ||
|
||
[[allOf.properties.attributes.allOf]] | ||
title = "Attribute layout" | ||
"$ref" = "attributes.json" | ||
|
||
########################################### | ||
# Requirement 2: Either array or constant # | ||
########################################### | ||
|
||
[[allOf]] | ||
title = "Either array or constant" | ||
|
||
##################### | ||
# Option 2.1: Array # | ||
##################### | ||
|
||
[[allOf.oneOf]] | ||
required = ["data", "datatype"] | ||
description = "An n-dimensional dataset containing the payload." | ||
title = "Array dataset" | ||
|
||
[allOf.oneOf.properties] | ||
|
||
datatype.enum = [ | ||
"CHAR", | ||
"UCHAR", | ||
"SCHAR", | ||
"SHORT", | ||
"INT", | ||
"LONG", | ||
"LONGLONG", | ||
"USHORT", | ||
"UINT", | ||
"ULONG", | ||
"ULONGLONG", | ||
"FLOAT", | ||
"DOUBLE", | ||
"LONG_DOUBLE", | ||
"CFLOAT", | ||
"CDOUBLE", | ||
"CLONG_DOUBLE", | ||
"BOOL", | ||
] | ||
# TODO: properly define this | ||
data.type = "array" | ||
|
||
######################## | ||
# Option 2.2: Constant # | ||
######################## | ||
|
||
[[allOf.oneOf]] | ||
title = "Constant dataset" | ||
description = "A dataset represented by two attributes: The constant value and its shape." | ||
required = ["attributes"] | ||
|
||
[allOf.oneOf.properties.attributes] | ||
required = ["shape", "value"] | ||
|
||
[allOf.oneOf.properties.attributes.properties] | ||
value."$ref" = "attribute_defs.json#/$defs/float_attribute" | ||
shape."$ref" = "attribute_defs.json#/$defs/vec_int_attribute" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters