Skip to content

Commit

Permalink
Merge pull request #487 from open-contracting/camelCase
Browse files Browse the repository at this point in the history
fix: Use camelCase codes
  • Loading branch information
jpmckinney authored Jul 3, 2024
2 parents b90fd07 + 92d25df commit 66ff8a8
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions docs/cost/ids/sustainability.md
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ Project level:
If an environmental impact assessment was conducted:
1. Set [`environment.hasImpactAssessment`](project-schema.json,,environment/hasImpactAssessment) to `true`.
2. Add a [`Classification`](../../reference/schema.md#classification) object to the [`environment.impactCategories`](project-schema.json,,environment/impactCategories) array, set its [`.scheme`](project-schema.json,/definitions/Classification,scheme) to 'ifc-environmental-social' and set its [`.id`](project-schema.json,/definitions/Classification,id) to the lowercase letter of the category into which the project falls.
2. Add a [`Classification`](../../reference/schema.md#classification) object to the [`environment.impactCategories`](project-schema.json,,environment/impactCategories) array, set its [`.scheme`](project-schema.json,/definitions/Classification,scheme) to 'ifcEnvironmentalSocial' and set its [`.id`](project-schema.json,/definitions/Classification,id) to the lowercase letter of the category into which the project falls.
If an environmental impact assessment was not conducted, set [`environment.hasImpactAssessment`](project-schema.json,,environment/hasImpactAssessment) to `false`.
```json
Expand All @@ -549,7 +549,7 @@ If an environmental impact assessment was not conducted, set [`environment.hasIm
"hasImpactAssessment": true,
"impactCategories": [
{
"scheme": "ifc-environmental-social",
"scheme": "ifcEnvironmentalSocial",
"id": "a"
}
]
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@
"hasImpactAssessment": true,
"impactCategories": [
{
"scheme": "ifc-environmental-social",
"scheme": "ifcEnvironmentalSocial",
"id": "a"
}
],
Expand Down
2 changes: 1 addition & 1 deletion manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,7 @@ def _get_paths(d, path=""):
elif element["refs"] != "": # elements that reference another element and have a blank example
example = mapping[element["refs"]]["example"]
# A dict is used to preserve order (unlike a set).
element["fields"] = list({path: 0 for path in _get_paths(json.loads(example))})
element["fields"] = list(dict.fromkeys(_get_paths(json.loads(example)), 0))

write_yaml_file(filename, list(mapping.values()))

Expand Down
2 changes: 1 addition & 1 deletion mapping/process-level-procurement.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CoST IDS element,Description,Mapping to OC4IDS,Mapping from OCDS,OC4IDS Fields,O
Procuring entity,Enter name of the organization carrying out the procurement,Project Level: Add an entry to `parties` with 'procuringEntity' included in its `.roles` | Contracting process: Record the name and identifier in `.summary.tender.procuringEntity`,"Check the `/parties` array for `Organization` objects with 'procuringEntity' in `/roles`. Copy each object to the `parties` array in OC4IDS. If there is more than one procuring entity, do not set `.summary.tender.procuringEntity.name` and `.summary.tender.procuringEntity.id`; otherwise, set them to the procuring entity's `.name` and `.id`.","parties,parties/id,parties/name,parties/role,contractingProcesses,contractingProcesses/summary,contractingProcesses/summary/tender,contractingProcesses/summary/tender/procuringEntity,contractingProcesses/summary/tender/procuringEntity/id,contractingProcesses/summary/tender/procuringEntity/name",parties/roles='procuringEntity'
Procuring entity contact details,Postal and Electronic address,Project Level: Publish the postal address in `parties.address` and the electronic address in `parties.contactPoint`,"Check the `/parties` array for `Organization` objects with 'procuringEntity' in `/roles`. Copy each object to the `parties` array in OC4IDS. If there is more than one procuring entity, do not set `.summary.tender.procuringEntity.name` and `.summary.tender.procuringEntity.id`; otherwise, set them to the procuring entity's `.name` and `.id`.","parties,parties/id,parties/address,parties/address/streetAddress,parties/address/locality,parties/address/region,parties/address/postalCode,parties/address/countryName,parties/contactPoint,parties/contactPoint/email",parties/roles='procuringEntity'
Contract administrative entity,Enter name of the organization carrying out the contract administrative entity if different from the Procuring Entity,Project Level: Add an entry to `parties` with 'administrativeEntity' included in its `.roles` | Contracting process: Record the name and identifier in `.summary.tender.administrativeEntity`,"Check the `/parties` array for `Organization` objects with 'administrativeEntity' in `/roles`. Copy each object to the `parties` array in OC4IDS. If there is more than one procuring entity, do not set `.summary.tender.administrativeEntity.name` and `.summary.tender.administrativeEntity.id`; otherwise, set them to the procuring entity's `.name` and `.id`.","parties,parties/id,parties/name,parties/role,contractingProcesses,contractingProcesses/summary,contractingProcesses/summary/tender,contractingProcesses/summary/tender/administrativeEntity,contractingProcesses/summary/tender/administrativeEntity/id,contractingProcesses/summary/tender/administrativeEntity/name",parties/roles='administrativeEntity'
Contract status,"Select from pre-award, active or closed",Contracting process: Publish in `.summary.status` using the contractingProcessStatus codelist,Set `.summary.status` to a value from the contractingProcessStatus codelist according to the business logic in the codelist.,"contractingProcesses,contractingProcesses/summary,contractingProcesses/summary/status",
Contract status,"Select from preAward, active or closed",Contracting process: Publish in `.summary.status` using the contractingProcessStatus codelist,Set `.summary.status` to a value from the contractingProcessStatus codelist according to the business logic in the codelist.,"contractingProcesses,contractingProcesses/summary,contractingProcesses/summary/status",
Procurement process,"Develop a list such as International Competitive Bidding, National Competitive Bidding, Donor Procurement Rules, Framework, Direct Award",Contracting process: Publish in `.summary.tender.procurementMethodDetails` and map to `.summary.tender.procurementMethod`,Set `.summary.tender.procurementMethod` and `.summary.tender.procurementMethodDetails`to the values of `/tender/procurementMethod` and `/tender/procurementMethodDetails` respectively.,"contractingProcesses,contractingProcesses/summary,contractingProcesses/summary/tender,contractingProcesses/summary/tender/procurementMethodDetails,contractingProcesses/summary/tender/procurementMethod",
Contract type,"Develop a list such as Design, Supervision, Design & Supervision, Design & Build, Construction","Contracting process: Add one or more values to the `.summary.nature` array. (e.g. [""design"", ""build""] for a design and build contract)",*Map from `/tender/items/classification` or `/tender/items/additionalClassifications` or infer from `/tender/description`.*,"contractingProcesses,contractingProcesses/summary,contractingProcesses/summary/nature",
Number of firms tendering,Number of firms who submit a tender,Contracting process: Publish in `.summary.tender.numberOfTenderers`,Set `.summary.numberOfTenderers` to the value of `/tender/numberOfTenderers`.,"contractingProcesses,contractingProcesses/summary,contractingProcesses/summary/tender,contractingProcesses/summary/tender/numberOfTenderers",
Expand Down
4 changes: 2 additions & 2 deletions mapping/sustainability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@
If an environmental impact assessment was conducted:
1. Set [`environment.hasImpactAssessment`](project-schema.json,,environment/hasImpactAssessment) to `true`.
2. Add a [`Classification`](../../reference/schema.md#classification) object to the [`environment.impactCategories`](project-schema.json,,environment/impactCategories) array, set its [`.scheme`](project-schema.json,/definitions/Classification,scheme) to 'ifc-environmental-social' and set its [`.id`](project-schema.json,/definitions/Classification,id) to the lowercase letter of the category into which the project falls.
2. Add a [`Classification`](../../reference/schema.md#classification) object to the [`environment.impactCategories`](project-schema.json,,environment/impactCategories) array, set its [`.scheme`](project-schema.json,/definitions/Classification,scheme) to 'ifcEnvironmentalSocial' and set its [`.id`](project-schema.json,/definitions/Classification,id) to the lowercase letter of the category into which the project falls.
If an environmental impact assessment was not conducted, set [`environment.hasImpactAssessment`](project-schema.json,,environment/hasImpactAssessment) to `false`.
example: |-
Expand All @@ -442,7 +442,7 @@
"hasImpactAssessment": true,
"impactCategories": [
{
"scheme": "ifc-environmental-social",
"scheme": "ifcEnvironmentalSocial",
"id": "a"
}
]
Expand Down
2 changes: 1 addition & 1 deletion schema/project-level/codelists/classificationScheme.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ sdgTarget,Sustainable Development Goal Targets,The Sustainable Development Goal
icms,International Cost Measurement Standard,"The International Cost Measurement Standard provides a single methodology for reporting, grouping and classifying construction project costs.",https://icms-coalition.org/the-standard/,costMeasurement
costIdsLegalType,CoST IDS Legal Type,The CoST IDS classification of an organization's legal type.,https://standard.open-contracting.org/infrastructure/latest/en/cost/ids/sustainability/#climate-finance-accredited-entity-type,organization
costIdsAdministrativeLevel,CoST IDS Administrative Level,The CoST IDS classification of an organization's administrative level.,https://standard.open-contracting.org/infrastructure/latest/en/cost/ids/sustainability/#climate-finance-accredited-entity-type,organization
ifc-environmental-social,International Finance Corporation’s Policy on environmental and social sustainability,"As part of the review of environmental and social risks and impacts of a proposed investment, IFC uses a process of environmental and social categorization to reflect the magnitude of risks and impacts.",https://www.ifc.org/en/insights-reports/2012/publications-policy-sustainability-2012,purpose
ifcEnvironmentalSocial,International Finance Corporation’s Policy on environmental and social sustainability,"As part of the review of environmental and social risks and impacts of a proposed investment, IFC uses a process of environmental and social categorization to reflect the magnitude of risks and impacts.",https://www.ifc.org/en/insights-reports/2012/publications-policy-sustainability-2012,purpose
9 changes: 5 additions & 4 deletions schema/project-level/codelists/contractingProcessStatus.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Code,Title,Description,Business Logic
pre-award,Pre-award,"No contract has yet been awarded, and the process has not ended.","`tender.status` is not 'cancelled', 'unsuccessful' or 'withdrawn', and one of: There are no awards or contracts; All `Award.status` and `Contract.status` are 'pending'; All award dates (in order of preference: `Award.date`, `tender.awardPeriod`) are in the future."
active,Active,"A contract was awarded, but not all contracts have ended.","One of: There is at least one `Contract.status` of 'active'; At least one contract period (in order of preference: `Contract.period`, `Award.contractPeriod`, `tender.contractPeriod`) includes the present date."
closed,Closed,"The process ended with no contract being awarded, or all contracts have ended.","One of: `tender.status` is 'cancelled', 'unsuccessful' or 'withdrawn'; There is at least one award, and all `Award.status` are 'cancelled' or 'unsuccessful'; There is at least one contract, and all `Contract.status` are 'terminated' or 'cancelled'; The `.endDate` of all contract periods (in order of preference: `Contract.period`, `Award.contractPeriod`, `tender.contractPeriod`), are in the past."
Code,Title,Description,Business Logic,Deprecated
preAward,Pre-award,"No contract has yet been awarded, and the process has not ended.","`tender.status` is not 'cancelled', 'unsuccessful' or 'withdrawn', and one of: There are no awards or contracts; All `Award.status` and `Contract.status` are 'pending'; All award dates (in order of preference: `Award.date`, `tender.awardPeriod`) are in the future.",
active,Active,"A contract was awarded, but not all contracts have ended.","One of: There is at least one `Contract.status` of 'active'; At least one contract period (in order of preference: `Contract.period`, `Award.contractPeriod`, `tender.contractPeriod`) includes the present date.",
closed,Closed,"The process ended with no contract being awarded, or all contracts have ended.","One of: `tender.status` is 'cancelled', 'unsuccessful' or 'withdrawn'; There is at least one award, and all `Award.status` are 'cancelled' or 'unsuccessful'; There is at least one contract, and all `Contract.status` are 'terminated' or 'cancelled'; The `.endDate` of all contract periods (in order of preference: `Contract.period`, `Award.contractPeriod`, `tender.contractPeriod`), are in the past.",
pre-award,Pre-award,"This code is deprecated in favour of 'preAward', to conform to the use of camelCase for codes.",,0.9.5
5 changes: 3 additions & 2 deletions schema/project-level/project-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -590,9 +590,10 @@
"description": "The status of this contracting process. Drawn from the [contractingProcessStatus codelist](https://standard.open-contracting.org/infrastructure/{{version}}/{{lang}}/reference/codelists/#contractingprocessstatus).",
"type": "string",
"enum": [
"pre-award",
"preAward",
"active",
"closed"
"closed",
"pre-award"
],
"codelist": "contractingProcessStatus.csv",
"openCodelist": false
Expand Down

0 comments on commit 66ff8a8

Please sign in to comment.