Skip to content

Commit

Permalink
Merge pull request #100 from sine-fdn/random-data-gen
Browse files Browse the repository at this point in the history
Random data gen
  • Loading branch information
zeitgeist authored Sep 17, 2024
2 parents 6190269 + a1b92ec commit 60cb034
Show file tree
Hide file tree
Showing 10 changed files with 1,218 additions and 47 deletions.
50 changes: 42 additions & 8 deletions gen/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions gen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ serde_json = "1.0.96"
rust_decimal = "1.35.0"
rust_decimal_macros = "^1.20"
regex = "1.10.4"
quickcheck = "1"
quickcheck_macros = "1"
uuid = { version = "1.8", features = ["v4", "serde"] }
32 changes: 24 additions & 8 deletions gen/schemas/hoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,13 @@
]
},
"energyConsumptionUnit": {
"type": [
"string",
"null"
"anyOf": [
{
"$ref": "#/definitions/EnergyConsumptionUnit"
},
{
"type": "null"
}
]
},
"feedstocks": {
Expand Down Expand Up @@ -168,6 +172,15 @@
"Electric"
]
},
"EnergyConsumptionUnit": {
"type": "string",
"enum": [
"l",
"kg",
"kWh",
"MJ"
]
},
"Feedstock": {
"type": "object",
"required": [
Expand All @@ -178,11 +191,14 @@
"$ref": "#/definitions/FeedstockType"
},
"feedstockPercentage": {
"type": [
"number",
"null"
],
"format": "double"
"anyOf": [
{
"$ref": "#/definitions/Decimal"
},
{
"type": "null"
}
]
},
"regionProvenance": {
"type": [
Expand Down
13 changes: 8 additions & 5 deletions gen/schemas/tad.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,14 @@
"$ref": "#/definitions/FeedstockType"
},
"feedstockPercentage": {
"type": [
"number",
"null"
],
"format": "double"
"anyOf": [
{
"$ref": "#/definitions/Decimal"
},
{
"type": "null"
}
]
},
"regionProvenance": {
"type": [
Expand Down
32 changes: 24 additions & 8 deletions gen/schemas/toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,13 @@
]
},
"energyConsumptionUnit": {
"type": [
"string",
"null"
"anyOf": [
{
"$ref": "#/definitions/EnergyConsumptionUnit"
},
{
"type": "null"
}
]
},
"feedstocks": {
Expand Down Expand Up @@ -179,6 +183,15 @@
"Electric"
]
},
"EnergyConsumptionUnit": {
"type": "string",
"enum": [
"l",
"kg",
"kWh",
"MJ"
]
},
"Feedstock": {
"type": "object",
"required": [
Expand All @@ -189,11 +202,14 @@
"$ref": "#/definitions/FeedstockType"
},
"feedstockPercentage": {
"type": [
"number",
"null"
],
"format": "double"
"anyOf": [
{
"$ref": "#/definitions/Decimal"
},
{
"type": "null"
}
]
},
"regionProvenance": {
"type": [
Expand Down
Loading

0 comments on commit 60cb034

Please sign in to comment.