Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in sustainability modules mapping, fix pre-commit script #501

Merged
merged 3 commits into from
Jan 17, 2025
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
2 changes: 1 addition & 1 deletion docs/cost/ids/sustainability.md
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ Disclose the financial instrument type from the list:
:columns: 8
OC4IDS mapping
^^^
1. Get the [`Finance`](../../reference/schema.md#finance) object in [`.udget.finance`](project-schema.json,,budget/finance) or [`contractingProcesses.summary.finance`](project-schema.json,/definitions/ContractingProcessSummary,finance) that represents the financing arrangement. If none exists yet, [add a financing arrangement](../common.md#add-a-financing-arrangement).
1. Get the [`Finance`](../../reference/schema.md#finance) object in [`.budget.finance`](project-schema.json,,budget/finance) or [`contractingProcesses.summary.finance`](project-schema.json,/definitions/ContractingProcessSummary,finance) that represents the financing arrangement. If none exists yet, [add a financing arrangement](../common.md#add-a-financing-arrangement).
2. Set the the financing arrangement's [`.assetClass`](project-schema.json,/definitions/Finance,assetClass) and [`.type`](project-schema.json,/definitions/Finance,type) according to the instrument type:
Instrument type | [`.assetClass`](project-schema.json,/definitions/Finance,assetClass) | [`.type`](project-schema.json,/definitions/Finance,type)
Expand Down
4 changes: 2 additions & 2 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def _get_definition_references(schema, defn, parents=None, project_schema=None,

if "properties" in schema:
for key, value in schema["properties"].items():
if value.get("type") in {"array", ["array"]} and "$ref" in value["items"]:
if value.get("type") in ["array", ["array"]] and "$ref" in value["items"]:
if value["items"]["$ref"] == f"#/definitions/{defn}":
references.append([*parents, key, "0"])
elif include_nested:
Expand Down Expand Up @@ -249,7 +249,7 @@ def _update_sub_schema_reference(schema):
# Add schema table
properties_to_collapse = []
for key, value in definition["properties"].items():
if value.get("type") not in {"object", ["object"]}:
if value.get("type") not in ["object", ["object"]]:
properties_to_collapse.append(key)

definition["content"].extend(
Expand Down
2 changes: 1 addition & 1 deletion mapping/sustainability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@
- equity
- guarantees
mapping: |-
1. Get the [`Finance`](../../reference/schema.md#finance) object in [`.udget.finance`](project-schema.json,,budget/finance) or [`contractingProcesses.summary.finance`](project-schema.json,/definitions/ContractingProcessSummary,finance) that represents the financing arrangement. If none exists yet, [add a financing arrangement](../common.md#add-a-financing-arrangement).
1. Get the [`Finance`](../../reference/schema.md#finance) object in [`.budget.finance`](project-schema.json,,budget/finance) or [`contractingProcesses.summary.finance`](project-schema.json,/definitions/ContractingProcessSummary,finance) that represents the financing arrangement. If none exists yet, [add a financing arrangement](../common.md#add-a-financing-arrangement).
2. Set the the financing arrangement's [`.assetClass`](project-schema.json,/definitions/Finance,assetClass) and [`.type`](project-schema.json,/definitions/Finance,type) according to the instrument type:
Instrument type | [`.assetClass`](project-schema.json,/definitions/Finance,assetClass) | [`.type`](project-schema.json,/definitions/Finance,type)
Expand Down
Loading