Skip to content
Merged
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: 10 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.DEFAULT_GOAL := all

JSONSCHEMA ?= ./node_modules/@sourcemeta/jsonschema/cli.js
JSONSCHEMA ?= ./node_modules/@sourcemeta/jsonschema/npm/cli.js
JQ ?= jq
SHELLCHECK ?= shellcheck
TAR ?= tar
Expand All @@ -11,6 +11,7 @@ MKDIRP ?= mkdir -p
RMRF ?= rm -rf
NODE ?= node
NPM ?= npm
TIME ?= time

include generated.mk

Expand All @@ -21,24 +22,24 @@ all: common test node_modules

.PHONY: common
common: $(GENERATED) node_modules
$(NODE) $(JSONSCHEMA) metaschema schemas meta
$(NODE) $(JSONSCHEMA) lint schemas meta
$(NODE) $(JSONSCHEMA) validate meta/schemas-root.json schemas
$(NODE) $(JSONSCHEMA) validate meta/schemas.json schemas
$(NODE) $(JSONSCHEMA) validate meta/test.json test
$(TIME) $(NODE) $(JSONSCHEMA) metaschema schemas meta
$(TIME) $(NODE) $(JSONSCHEMA) lint schemas meta
$(TIME) $(NODE) $(JSONSCHEMA) validate meta/schemas-root.json schemas
$(TIME) $(NODE) $(JSONSCHEMA) validate meta/schemas.json schemas
$(TIME) $(NODE) $(JSONSCHEMA) validate meta/test.json test
$(SHELLCHECK) scripts/*.sh
./scripts/quality-schemas-tests-mirror.sh
./scripts/quality-templates-xbrl-utr-mirror.sh

# TODO: Make `jsonschema fmt` automatically detect test files
.PHONY: lint
lint: common node_modules
$(NODE) $(JSONSCHEMA) fmt schemas meta --check
$(NODE) $(JSONSCHEMA) fmt test --check --default-dialect "https://json-schema.org/draft/2020-12/schema"
$(TIME) $(NODE) $(JSONSCHEMA) fmt schemas meta --check
$(TIME) $(NODE) $(JSONSCHEMA) fmt test --check --default-dialect "https://json-schema.org/draft/2020-12/schema"

.PHONY: test
test: node_modules
$(NODE) $(JSONSCHEMA) test ./test
$(TIME) $(NODE) $(JSONSCHEMA) test ./test
$(NODE) npm/cjs.test.js
$(NODE) npm/esm.test.mjs

Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@
"access": "public"
},
"devDependencies": {
"@sourcemeta/jsonschema": "^12.7.1"
"@sourcemeta/jsonschema": "^12.10.1"
}
}
2 changes: 1 addition & 1 deletion schemas/2020-12/bipm/si/2019/base/prefixed/exagram.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 0, 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "Eg",
"$ref": "../unit/kilogram.json"
}
2 changes: 1 addition & 1 deletion schemas/2020-12/bipm/si/2019/base/prefixed/petaampere.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 0, 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "PA",
"$ref": "../unit/ampere.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 0, 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "Pcd",
"$ref": "../unit/candela.json"
}
2 changes: 1 addition & 1 deletion schemas/2020-12/bipm/si/2019/base/prefixed/petakelvin.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 0, 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "PK",
"$ref": "../unit/kelvin.json"
}
2 changes: 1 addition & 1 deletion schemas/2020-12/bipm/si/2019/base/prefixed/petametre.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 0, 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "Pm",
"$ref": "../unit/metre.json"
}
2 changes: 1 addition & 1 deletion schemas/2020-12/bipm/si/2019/base/prefixed/petamole.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "Pmol",
"$ref": "../unit/mole.json"
}
2 changes: 1 addition & 1 deletion schemas/2020-12/bipm/si/2019/base/prefixed/petasecond.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 0, 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "Ps",
"$ref": "../unit/second.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "PBq",
"$ref": "../unit/becquerel.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 0, 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "PC",
"$ref": "../unit/coulomb.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 0, 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "P°C",
"$ref": "../unit/degree-celsius.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "PF",
"$ref": "../unit/farad.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "PGy",
"$ref": "../unit/gray.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "PH",
"$ref": "../unit/henry.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "PHz",
"$ref": "../unit/hertz.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 0, 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "PJ",
"$ref": "../unit/joule.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "Pkat",
"$ref": "../unit/katal.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 0, 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "Plm",
"$ref": "../unit/lumen.json"
}
2 changes: 1 addition & 1 deletion schemas/2020-12/bipm/si/2019/derived/prefixed/petalux.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 0, 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "Plx",
"$ref": "../unit/lux.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 0, 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "PN",
"$ref": "../unit/newton.json"
}
2 changes: 1 addition & 1 deletion schemas/2020-12/bipm/si/2019/derived/prefixed/petaohm.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "PΩ",
"$ref": "../unit/ohm.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 0, 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "PPa",
"$ref": "../unit/pascal.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 0, 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "Prad",
"$ref": "../unit/radian.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "PS",
"$ref": "../unit/siemens.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "PSv",
"$ref": "../unit/sievert.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 0, 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "Psr",
"$ref": "../unit/steradian.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 0, 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "PT",
"$ref": "../unit/tesla.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 0, 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "PV",
"$ref": "../unit/volt.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 0, 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "PW",
"$ref": "../unit/watt.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"examples": [ 0, 1, 100, 1000 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.bipm.org/en/publications/si-brochure" ],
"x-prefix-factor": 1000000000000000.0,
"x-prefix-factor": 1.0000000000000000e+15,
"x-symbol": "PWb",
"$ref": "../unit/weber.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
0.0,
1.5,
-3.14,
340282346638528859811704183484516925440.0,
-340282346638528859811704183484516925440.0,
3.402823466385288598117041834845169254400e+38,
-3.402823466385288598117041834845169254400e+38,
"NaN",
"+Inf",
"-Inf",
Expand Down
8 changes: 4 additions & 4 deletions schemas/2020-12/ieee/floating-point/2019/binary32.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
0.0,
1.5,
-3.14,
340282346638528859811704183484516925440.0,
-340282346638528859811704183484516925440.0,
3.402823466385288598117041834845169254400e+38,
-3.402823466385288598117041834845169254400e+38,
1.4013e-45
],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://ieeexplore.ieee.org/document/8766229" ],
"type": "number",
"maximum": 340282346638528859811704183484516925440.0,
"minimum": -340282346638528859811704183484516925440.0
"maximum": 3.402823466385288598117041834845169254400e+38,
"minimum": -3.402823466385288598117041834845169254400e+38
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
1.5,
-3.14159,
299800000.0,
179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0,
-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0,
1.797693134862315708145274237317043567980705675258449965989174768031572607800285387605895586327668781715404589535143824642343213268894641827684675467035375169860499105765512820762454900903893289440758685084551339423045832369032229481658085593321233482747978262041447231687381771809192998812504040261841248583680e+308,
-1.797693134862315708145274237317043567980705675258449965989174768031572607800285387605895586327668781715404589535143824642343213268894641827684675467035375169860499105765512820762454900903893289440758685084551339423045832369032229481658085593321233482747978262041447231687381771809192998812504040261841248583680e+308,
"NaN",
"+Inf",
"-Inf",
Expand Down
Loading