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
32 changes: 16 additions & 16 deletions generate/iso/currency/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def build_base_schema():

alpha_code_schema = build_base_schema()
alpha_code_schema.update({
"title": f"ISO 4217 Alphabetic Currency, Fund, and Precious Metal Code{' (Historical)' if is_historical else ''}",
"title": f"ISO 4217:2015 Alphabetic Currency, Fund, and Precious Metal Code{' (Historical)' if is_historical else ''}",
"description": f"A three-letter alphabetic code including {'withdrawn ' if is_historical else ''}currencies, funds, and precious metals ({published_date})",
"examples": alpha_code_examples,
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand All @@ -122,7 +122,7 @@ def build_base_schema():

alpha_currency_schema = build_base_schema()
alpha_currency_schema.update({
"title": f"ISO 4217 Alphabetic Currency Code{' (Historical)' if is_historical else ''}",
"title": f"ISO 4217:2015 Alphabetic Currency Code{' (Historical)' if is_historical else ''}",
"description": f"A three-letter alphabetic {'withdrawn ' if is_historical else ''}currency code, excluding funds and precious metals ({published_date})",
"examples": sorted(currency_alpha_codes.keys())[:4],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand All @@ -141,7 +141,7 @@ def build_base_schema():

alpha_fund_schema = build_base_schema()
alpha_fund_schema.update({
"title": f"ISO 4217 Alphabetic Fund Code{' (Historical)' if is_historical else ''}",
"title": f"ISO 4217:2015 Alphabetic Fund Code{' (Historical)' if is_historical else ''}",
"description": f"A three-letter alphabetic {'withdrawn ' if is_historical else ''}fund code ({published_date})",
"examples": sorted(fund_alpha_codes.keys())[:4],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand All @@ -160,7 +160,7 @@ def build_base_schema():

alpha_precious_metal_schema = build_base_schema()
alpha_precious_metal_schema.update({
"title": f"ISO 4217 Alphabetic Precious Metal Code{' (Historical)' if is_historical else ''}",
"title": f"ISO 4217:2015 Alphabetic Precious Metal Code{' (Historical)' if is_historical else ''}",
"description": f"A three-letter alphabetic code for {'withdrawn ' if is_historical else ''}precious metals ({published_date})",
"examples": ["XAU", "XAG", "XPT", "XPD"],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand Down Expand Up @@ -192,7 +192,7 @@ def build_base_schema():

numeric_code_schema = build_base_schema()
numeric_code_schema.update({
"title": f"ISO 4217 Numeric Currency, Fund, and Precious Metal Code{' (Historical)' if is_historical else ''}",
"title": f"ISO 4217:2015 Numeric Currency, Fund, and Precious Metal Code{' (Historical)' if is_historical else ''}",
"description": f"A three-digit numeric code including {'withdrawn ' if is_historical else ''}currencies, funds, and precious metals ({published_date})",
"examples": numeric_code_examples,
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand All @@ -202,7 +202,7 @@ def build_base_schema():

numeric_currency_schema = build_base_schema()
numeric_currency_schema.update({
"title": f"ISO 4217 Numeric Currency Code{' (Historical)' if is_historical else ''}",
"title": f"ISO 4217:2015 Numeric Currency Code{' (Historical)' if is_historical else ''}",
"description": f"A three-digit numeric {'withdrawn ' if is_historical else ''}currency code, excluding funds and precious metals ({published_date})",
"examples": sorted(currency_numeric_codes.keys())[:4],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand All @@ -221,7 +221,7 @@ def build_base_schema():

numeric_fund_schema = build_base_schema()
numeric_fund_schema.update({
"title": f"ISO 4217 Numeric Fund Code{' (Historical)' if is_historical else ''}",
"title": f"ISO 4217:2015 Numeric Fund Code{' (Historical)' if is_historical else ''}",
"description": f"A three-digit numeric {'withdrawn ' if is_historical else ''}fund code ({published_date})",
"examples": sorted(fund_numeric_codes.keys())[:4],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand All @@ -240,7 +240,7 @@ def build_base_schema():

numeric_precious_metal_schema = build_base_schema()
numeric_precious_metal_schema.update({
"title": f"ISO 4217 Numeric Precious Metal Code{' (Historical)' if is_historical else ''}",
"title": f"ISO 4217:2015 Numeric Precious Metal Code{' (Historical)' if is_historical else ''}",
"description": f"A three-digit numeric code for {'withdrawn ' if is_historical else ''}precious metals ({published_date})",
"examples": [959, 961, 962, 964],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand Down Expand Up @@ -272,7 +272,7 @@ def build_base_schema():
if not is_historical:
numeric_code_additional_schema = {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Numeric Additional Currency Code",
"title": "ISO 4217:2015 Numeric Additional Currency Code",
"description": "User-assigned numeric codes in the range 900-998",
"examples": [900, 950, 998],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand All @@ -284,7 +284,7 @@ def build_base_schema():

alpha_unknown_schema = {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Alphabetic Unknown Currency Code",
"title": "ISO 4217:2015 Alphabetic Unknown Currency Code",
"description": "The alphabetic code for transactions where no currency is involved",
"examples": ["XXX"],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand All @@ -294,7 +294,7 @@ def build_base_schema():

numeric_unknown_schema = {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Numeric Unknown Currency Code",
"title": "ISO 4217:2015 Numeric Unknown Currency Code",
"description": "The numeric code for transactions where no currency is involved",
"examples": [999],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand All @@ -304,7 +304,7 @@ def build_base_schema():

alpha_test_schema = {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Alphabetic Test Currency Code",
"title": "ISO 4217:2015 Alphabetic Test Currency Code",
"description": "The alphabetic code specifically reserved for testing purposes",
"examples": ["XTS"],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand All @@ -314,7 +314,7 @@ def build_base_schema():

numeric_test_schema = {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Numeric Test Currency Code",
"title": "ISO 4217:2015 Numeric Test Currency Code",
"description": "The numeric code specifically reserved for testing purposes",
"examples": [963],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand Down Expand Up @@ -344,9 +344,9 @@ def build_base_schema():
def main():
script_dir = os.path.dirname(os.path.abspath(__file__))
project_root = os.path.dirname(os.path.dirname(os.path.dirname(script_dir)))
current_data_file = os.path.join(project_root, "build", "iso", "currency", "list-one.json")
historical_data_file = os.path.join(project_root, "build", "iso", "currency", "list-three.json")
output_dir = os.path.join(project_root, "schemas", "iso", "currency")
current_data_file = os.path.join(project_root, "external", "iso", "currency", "list-one.json")
historical_data_file = os.path.join(project_root, "external", "iso", "currency", "list-three.json")
output_dir = os.path.join(project_root, "schemas", "iso", "currency", "2025")

# Generate current schemas
if not os.path.exists(current_data_file):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Alphabetic Currency, Fund, and Precious Metal Code",
"title": "ISO 4217:2015 Alphabetic Currency, Fund, and Precious Metal Code",
"description": "A three-letter alphabetic code including currencies, funds, and precious metals (2025-05-12)",
"examples": [ "AED", "AFN", "ALL", "AMD", "BOV", "CHE", "XAG" ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Alphabetic Currency Code",
"title": "ISO 4217:2015 Alphabetic Currency Code",
"description": "A three-letter alphabetic currency code, excluding funds and precious metals (2025-05-12)",
"examples": [ "AED", "AFN", "ALL", "AMD" ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Alphabetic Fund Code",
"title": "ISO 4217:2015 Alphabetic Fund Code",
"description": "A three-letter alphabetic fund code (2025-05-12)",
"examples": [ "BOV", "CHE", "CHW", "CLF" ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Alphabetic Precious Metal Code",
"title": "ISO 4217:2015 Alphabetic Precious Metal Code",
"description": "A three-letter alphabetic code for precious metals (2025-05-12)",
"examples": [ "XAU", "XAG", "XPT", "XPD" ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Alphabetic Test Currency Code",
"title": "ISO 4217:2015 Alphabetic Test Currency Code",
"description": "The alphabetic code specifically reserved for testing purposes",
"examples": [ "XTS" ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Alphabetic Unknown Currency Code",
"title": "ISO 4217:2015 Alphabetic Unknown Currency Code",
"description": "The alphabetic code for transactions where no currency is involved",
"examples": [ "XXX" ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Alphabetic Currency, Fund, and Precious Metal Code (Historical)",
"title": "ISO 4217:2015 Alphabetic Currency, Fund, and Precious Metal Code (Historical)",
"description": "A three-letter alphabetic code including withdrawn currencies, funds, and precious metals (2025-03-31)",
"examples": [ "ADP", "AFA", "ALK", "ANG" ],
"deprecated": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Alphabetic Currency Code (Historical)",
"title": "ISO 4217:2015 Alphabetic Currency Code (Historical)",
"description": "A three-letter alphabetic withdrawn currency code, excluding funds and precious metals (2025-03-31)",
"examples": [ "ADP", "AFA", "ALK", "ANG" ],
"deprecated": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Numeric Currency, Fund, and Precious Metal Code (Historical)",
"title": "ISO 4217:2015 Numeric Currency, Fund, and Precious Metal Code (Historical)",
"description": "A three-digit numeric code including withdrawn currencies, funds, and precious metals (2025-03-31)",
"examples": [ 4, 8, 20, 24 ],
"deprecated": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Numeric Currency Code (Historical)",
"title": "ISO 4217:2015 Numeric Currency Code (Historical)",
"description": "A three-digit numeric withdrawn currency code, excluding funds and precious metals (2025-03-31)",
"examples": [ 4, 8, 20, 24 ],
"deprecated": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Numeric Additional Currency Code",
"title": "ISO 4217:2015 Numeric Additional Currency Code",
"description": "User-assigned numeric codes in the range 900-998",
"examples": [ 900, 950, 998 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Numeric Currency, Fund, and Precious Metal Code",
"title": "ISO 4217:2015 Numeric Currency, Fund, and Precious Metal Code",
"description": "A three-digit numeric code including currencies, funds, and precious metals (2025-05-12)",
"examples": [ 8, 12, 32, 36, 940, 959 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Numeric Currency Code",
"title": "ISO 4217:2015 Numeric Currency Code",
"description": "A three-digit numeric currency code, excluding funds and precious metals (2025-05-12)",
"examples": [ 8, 12, 32, 36 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Numeric Fund Code",
"title": "ISO 4217:2015 Numeric Fund Code",
"description": "A three-digit numeric fund code (2025-05-12)",
"examples": [ 940, 947, 948, 970 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Numeric Precious Metal Code",
"title": "ISO 4217:2015 Numeric Precious Metal Code",
"description": "A three-digit numeric code for precious metals (2025-05-12)",
"examples": [ 959, 961, 962, 964 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Numeric Test Currency Code",
"title": "ISO 4217:2015 Numeric Test Currency Code",
"description": "The numeric code specifically reserved for testing purposes",
"examples": [ 963 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO 4217 Numeric Unknown Currency Code",
"title": "ISO 4217:2015 Numeric Unknown Currency Code",
"description": "The numeric code for transactions where no currency is involved",
"examples": [ 999 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"target": "../../../schemas/ieee/posix/path-absolute.json",
"target": "../../../../schemas/ieee/posix/2017/path-absolute.json",
"tests": [
{
"description": "Invalid type - number",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"target": "../../../schemas/ieee/posix/path-relative.json",
"target": "../../../../schemas/ieee/posix/2017/path-relative.json",
"tests": [
{
"description": "Invalid type - number",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"target": "../../../schemas/ieee/posix/path.json",
"target": "../../../../schemas/ieee/posix/2017/path.json",
"tests": [
{
"description": "Invalid type - number",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"target": "../../../schemas/iso/currency/alpha-code.json",
"target": "../../../../schemas/iso/currency/2025/alpha-code.json",
"tests": [
{
"description": "Invalid type - integer",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"target": "../../../schemas/iso/currency/alpha-currency.json",
"target": "../../../../schemas/iso/currency/2025/alpha-currency.json",
"tests": [
{
"description": "Invalid type - integer",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"target": "../../../schemas/iso/currency/alpha-fund.json",
"target": "../../../../schemas/iso/currency/2025/alpha-fund.json",
"tests": [
{
"description": "Invalid type - integer",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"target": "../../../schemas/iso/currency/alpha-precious-metal.json",
"target": "../../../../schemas/iso/currency/2025/alpha-precious-metal.json",
"tests": [
{
"description": "Invalid type - integer",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"target": "../../../schemas/iso/currency/alpha-test.json",
"target": "../../../../schemas/iso/currency/2025/alpha-test.json",
"tests": [
{
"description": "Invalid type - integer",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"target": "../../../schemas/iso/currency/alpha-unknown.json",
"target": "../../../../schemas/iso/currency/2025/alpha-unknown.json",
"tests": [
{
"description": "Invalid type - integer",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"target": "../../../../schemas/iso/currency/historical/alpha-code.json",
"target": "../../../../../schemas/iso/currency/2025/historical/alpha-code.json",
"tests": [
{
"description": "Invalid type - integer",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"target": "../../../../schemas/iso/currency/historical/alpha-currency.json",
"target": "../../../../../schemas/iso/currency/2025/historical/alpha-currency.json",
"tests": [
{
"description": "Invalid type - integer",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"target": "../../../../schemas/iso/currency/historical/numeric-code.json",
"target": "../../../../../schemas/iso/currency/2025/historical/numeric-code.json",
"tests": [
{
"description": "Invalid type - string",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"target": "../../../../schemas/iso/currency/historical/numeric-currency.json",
"target": "../../../../../schemas/iso/currency/2025/historical/numeric-currency.json",
"tests": [
{
"description": "Invalid type - string",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"target": "../../../schemas/iso/currency/numeric-code-additional.json",
"target": "../../../../schemas/iso/currency/2025/numeric-code-additional.json",
"tests": [
{
"description": "Invalid type - string",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"target": "../../../schemas/iso/currency/numeric-code.json",
"target": "../../../../schemas/iso/currency/2025/numeric-code.json",
"tests": [
{
"description": "Invalid type - string",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"target": "../../../schemas/iso/currency/numeric-currency.json",
"target": "../../../../schemas/iso/currency/2025/numeric-currency.json",
"tests": [
{
"description": "Invalid type - string",
Expand Down
Loading