From f187b850137960f889107502626737737d56a837 Mon Sep 17 00:00:00 2001 From: odscjen Date: Mon, 13 Nov 2023 14:42:45 +0000 Subject: [PATCH 01/19] project-schema.json: add lobbyingMeetings,Meetings,PublicOfficial objects and minutes.lobbyingMeeting code --- .../project-level/codelists/documentType.csv | 1 + schema/project-level/project-schema.json | 80 +++++++++++++++++++ 2 files changed, 81 insertions(+) diff --git a/schema/project-level/codelists/documentType.csv b/schema/project-level/codelists/documentType.csv index 38d01b9e..e103f0fa 100644 --- a/schema/project-level/codelists/documentType.csv +++ b/schema/project-level/codelists/documentType.csv @@ -64,3 +64,4 @@ contractAmendment,Contract amendment,A legal document that changes or adds to th designReport,Project design report,"A record of the justification for the design approach adopted in the project, typically issued before the works start, by the consultant or firm that will supervise the works.",OC4IDS paymentCertificate,Payment certificate,A document certifying that the work specified on a supplier's estimate or invoice is complete and that payment to the supplier is approved.,OC4IDS escalationApproval,Escalation approval,Documentation of one or more approved escalations of the contract price during the project life-cycle.,OC4IDS +minutes.lobbyingMeeting,Lobbying meeting minutes,"A record of the issues discussed, agreements reached and decisions taken at a lobbying meeting.",OC4IDS diff --git a/schema/project-level/project-schema.json b/schema/project-level/project-schema.json index 31606722..fdc34d06 100644 --- a/schema/project-level/project-schema.json +++ b/schema/project-level/project-schema.json @@ -296,6 +296,16 @@ ], "default": "en", "minLength": 1 + }, + "lobbyingMeetings": { + "title": "Lobbying meetings", + "description": "Information about lobbying meetings in relation to the project. That is, meetings with public officials that are made, managed or directed with the purpose of influencing public decision-making in relation to the project, whether for private, public or collective ends, whether for compensation or without. Public decision-making is the creation and amendment of legislation or any other regulatory measures; the development, modification and implementation of public policies, strategies and programmes; and the awarding of government contracts or grants, administrative decisions or any other public spending decisions.", + "type": "array", + "items": { + "$ref": "#/definitions/Meeting" + }, + "uniqueItems": true, + "minItems": 1 } }, "definitions": { @@ -1998,6 +2008,76 @@ } }, "minProperties": 1 + }, + "Meeting": { + "title": "Meeting", + "description": "The details of a meeting.", + "type": "object", + "properties": { + "id": { + "title": "ID", + "description": "A locally unique identifier for the meeting.", + "type": [ + "string" + ] + }, + "date": { + "title": "Date", + "description": "The date of the meeting.", + "type": [ + "string" + ], + "format": "date-time" + }, + "location": { + "title": "Location", + "description": "The location of the meeting.", + "$ref": "#/definitions/Location" + }, + "numberOfParticipants": { + "title": "Participant count", + "description": "The number of people in attendance at the meeting.", + "type": "number" + }, + "publicOfficial": { + "title": "Public official", + "description": "A position held by a person (or advisor to a person) with decision-making powers, who is elected, appointed or employed within the executive or legislative branches of power at national, sub-national, or supra-national levels; within private bodies performing public functions; and within public international organizations domiciled or operational in the country concerned.", + "$ref": "#/definitions/PublicOfficial" + } + }, + "required": [ + "id" + ], + "minProperties": 1 + }, + "PublicOfficial": { + "title": "Public official", + "description": "A position held by a person (or advisor to a person) with decision-making powers, who is elected, appointed or employed within the executive or legislative branches of power at national, sub-national, or supra-national levels; within private bodies performing public functions; and within public international organizations domiciled or operational in the country concerned.", + "type": "object", + "properties": { + "person": { + "title": "Person.", + "description": "The person.", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "The full name of the person.", + "type": "string" + }, + "organization": { + "title": "Organization", + "description": "The organization in respect of which the person is a public official.", + "$ref": "#/definitions/OrganizationReference" + } + } + }, + "jobTitle": { + "title": "Job title", + "description": "The job title of the person with respect to the organization.", + "type": "string" + } + } } }, "minProperties": 1 From 6026cabaec9e6af4d1da138272281ef17f755876 Mon Sep 17 00:00:00 2001 From: odscjen Date: Mon, 13 Nov 2023 14:45:07 +0000 Subject: [PATCH 02/19] manage.py pre-commit --- docs/_static/i18n.csv | 32 +++++++++++++++ docs/reference/schema.md | 87 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+) diff --git a/docs/_static/i18n.csv b/docs/_static/i18n.csv index 45a581b6..459c5983 100644 --- a/docs/_static/i18n.csv +++ b/docs/_static/i18n.csv @@ -366,3 +366,35 @@ completion/finalValueDetails,Final value details,True, completion/finalScope,Final scope,True, completion/finalScopeDetails,Final scope details,True, language,Language,True, +lobbyingMeetings,Lobbying meetings,False, +lobbyingMeetings,Meeting,False, +lobbyingMeetings/id,ID,True, +lobbyingMeetings/date,Date,False, +lobbyingMeetings/location,Location,False, +lobbyingMeetings/location,Delivery Location,False, +lobbyingMeetings/location/id,Identifier,True, +lobbyingMeetings/location/description,Description,True, +lobbyingMeetings/location/geometry,Geometry,False, +lobbyingMeetings/location/geometry/type,Type,False, +lobbyingMeetings/location/geometry/coordinates,Coordinates,False, +lobbyingMeetings/location/gazetteer,Gazetteer,False, +lobbyingMeetings/location/gazetteer/scheme,Gazetteer scheme,False, +lobbyingMeetings/location/gazetteer/identifiers,Identifiers,False, +lobbyingMeetings/location/uri,URI,True, +lobbyingMeetings/location/address,Address,False, +lobbyingMeetings/location/address,Address,False, +lobbyingMeetings/location/address/streetAddress,Street address,True, +lobbyingMeetings/location/address/locality,Locality,True, +lobbyingMeetings/location/address/region,Region,True, +lobbyingMeetings/location/address/postalCode,Postal code,True, +lobbyingMeetings/location/address/countryName,Country name,True, +lobbyingMeetings/numberOfParticipants,Participant count,False, +lobbyingMeetings/publicOfficial,Public official,False, +lobbyingMeetings/publicOfficial,Public official,False, +lobbyingMeetings/publicOfficial/person,Person.,False, +lobbyingMeetings/publicOfficial/person/name,Name,True, +lobbyingMeetings/publicOfficial/person/organization,Organization,False, +lobbyingMeetings/publicOfficial/person/organization,Organization reference,False, +lobbyingMeetings/publicOfficial/person/organization/name,Organization name,True, +lobbyingMeetings/publicOfficial/person/organization/id,Organization ID,True, +lobbyingMeetings/publicOfficial/jobTitle,Job title,True, diff --git a/docs/reference/schema.md b/docs/reference/schema.md index 23e72b19..a3974d02 100644 --- a/docs/reference/schema.md +++ b/docs/reference/schema.md @@ -323,6 +323,7 @@ Each `Classification` has the following fields: This sub-schema is referenced by the following properties: * [`locations`](project-schema.json,,locations) +* [`Meeting/location`](project-schema.json,/definitions/Meeting,location) Each `Location` has the following fields: @@ -345,6 +346,11 @@ Each `Location` has the following fields: :title: locations ``` +```{jsoninclude} ../../docs/examples/example.json +:jsonpointer: /projects/0/lobbyingMeetings/0/location +:title: lobbyingMeetings/0/location +``` + ```` ````` @@ -489,6 +495,7 @@ This sub-schema is referenced by the following properties: * [`BudgetBreakdown/sourceParty`](project-schema.json,/definitions/BudgetBreakdown,sourceParty) * [`Transaction/payer`](project-schema.json,/definitions/Transaction,payer) * [`Transaction/payee`](project-schema.json,/definitions/Transaction,payee) +* [`PublicOfficial/person/organization`](project-schema.json,/definitions/PublicOfficial,person/organization) Each `OrganizationReference` has the following fields: @@ -556,6 +563,11 @@ Each `OrganizationReference` has the following fields: :title: transactions/0/payee ``` +```{jsoninclude} ../../docs/examples/example.json +:jsonpointer: /projects/0/lobbyingMeetings/0/publicOfficial/person/organization +:title: lobbyingMeetings/0/publicOfficial/person/organization +``` + ```` ````` @@ -601,6 +613,11 @@ Each `Address` has the following fields: :title: parties/0/address ``` +```{jsoninclude} ../../docs/examples/example.json +:jsonpointer: /projects/0/lobbyingMeetings/0/location/address +:title: lobbyingMeetings/0/location/address +``` + ```` ````` @@ -1076,3 +1093,73 @@ Each `MilestoneReference` has the following fields: ```` ````` + +### Meeting + +`Meeting` is defined as: + +```{field-description} ../../build/current_lang/project-schema.json /definitions/Meeting +``` + +This sub-schema is referenced by the following properties: +* [`lobbyingMeetings`](project-schema.json,,lobbyingMeetings) + +Each `Meeting` has the following fields: + +`````{tab-set} + +````{tab-item} Schema + +```{jsonschema} ../../build/current_lang/project-schema.json +:pointer: /definitions/Meeting +:collapse: id,date,location,numberOfParticipants,publicOfficial +:addtargets: +``` + +```` + +````{tab-item} Examples + +```{jsoninclude} ../../docs/examples/example.json +:jsonpointer: /projects/0/lobbyingMeetings +:title: lobbyingMeetings +``` + +```` + +````` + +### PublicOfficial + +`PublicOfficial` is defined as: + +```{field-description} ../../build/current_lang/project-schema.json /definitions/PublicOfficial +``` + +This sub-schema is referenced by the following properties: +* [`Meeting/publicOfficial`](project-schema.json,/definitions/Meeting,publicOfficial) + +Each `PublicOfficial` has the following fields: + +`````{tab-set} + +````{tab-item} Schema + +```{jsonschema} ../../build/current_lang/project-schema.json +:pointer: /definitions/PublicOfficial +:collapse: jobTitle +:addtargets: +``` + +```` + +````{tab-item} Examples + +```{jsoninclude} ../../docs/examples/example.json +:jsonpointer: /projects/0/lobbyingMeetings/0/publicOfficial +:title: lobbyingMeetings/0/publicOfficial +``` + +```` + +````` From 3fb8899ed1e8b3c2da1501d41e347f44c8530519 Mon Sep 17 00:00:00 2001 From: odscjen Date: Mon, 13 Nov 2023 15:07:23 +0000 Subject: [PATCH 03/19] update examples/ --- docs/examples/blank.json | 30 +++++++++++++++++++++++++++++- docs/examples/example.json | 26 +++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/docs/examples/blank.json b/docs/examples/blank.json index 488b17a2..9b2911b8 100644 --- a/docs/examples/blank.json +++ b/docs/examples/blank.json @@ -416,5 +416,33 @@ "finalValueDetails": "", "finalScope": "", "finalScopeDetails": "" - } + }, + "lobbyingMeetings": [ + { + "id": "string", + "location": { + "id": "string", + "description": "string", + "address": { + "streetAddress": "string", + "locality": "string", + "region": "string", + "postalCode": "string", + "countryName": "string" + } + }, + "date": "date-time", + "numberOfParticipants": "integer", + "publicOfficial": { + "person": { + "name": "string" + }, + "organization": { + "id": "string", + "name": "string" + }, + "jobTitle": "string" + } + } + ] } diff --git a/docs/examples/example.json b/docs/examples/example.json index 0e501ca7..ea20694e 100644 --- a/docs/examples/example.json +++ b/docs/examples/example.json @@ -959,7 +959,31 @@ "finalValueDetails": "Budget increase due to construction delay.", "finalScope": "Upgrade of Junctions 4 and 5 and repairs to the watercourse at Junction 5.", "finalScopeDetails": "Scope was expanded to include repairs to a watercourse damaged during construction excavation." - } + }, + "lobbyingMeetings": [ + { + "id": "1", + "date": "2024-01-01T00:00:00Z", + "address": { + "streetAddress": "1600 Amphitheatre Pkwy", + "locality": "London", + "region": "London", + "postalCode": "WC1 8HG", + "countryName": "United Kingdom" + }, + "numberOfParticipants": 4, + "publicOfficial": { + "person": { + "name": "Brett Gliddon" + }, + "organization": { + "name": "Motorways UK", + "id": "GB-GOR-XX1234" + }, + "jobTitle": "Group General Manager Transport Services" + } + } + ] } ] } From 7c0e55b3ccf22648eab2efe428dd42a06f352272 Mon Sep 17 00:00:00 2001 From: odscjen Date: Mon, 13 Nov 2023 15:10:37 +0000 Subject: [PATCH 04/19] update changelog.md --- docs/reference/changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/reference/changelog.md b/docs/reference/changelog.md index ff4f09f9..0ddd3c3d 100644 --- a/docs/reference/changelog.md +++ b/docs/reference/changelog.md @@ -28,6 +28,10 @@ * `.transactions` * `.milestones` * `ContractingProcesses.milestones` +* [#428](https://github.com/open-contracting/infrastructure/pull/428) - add objects: + * `Meeting` + * `lobbyingMeetings` + * `PublicOfficial` ### Codelists From 1d7214b8ce7c2b5ee1478593a10455889e4826fc Mon Sep 17 00:00:00 2001 From: odscjen Date: Mon, 13 Nov 2023 15:19:30 +0000 Subject: [PATCH 05/19] fix build errors, change Meeting.location to ref Address --- docs/_static/i18n.csv | 23 ++++++----------------- docs/examples/blank.json | 14 +++++--------- docs/examples/example.json | 2 +- docs/reference/schema.md | 11 +++-------- schema/project-level/project-schema.json | 4 ++-- 5 files changed, 17 insertions(+), 37 deletions(-) diff --git a/docs/_static/i18n.csv b/docs/_static/i18n.csv index 459c5983..05ba3e5f 100644 --- a/docs/_static/i18n.csv +++ b/docs/_static/i18n.csv @@ -371,23 +371,12 @@ lobbyingMeetings,Meeting,False, lobbyingMeetings/id,ID,True, lobbyingMeetings/date,Date,False, lobbyingMeetings/location,Location,False, -lobbyingMeetings/location,Delivery Location,False, -lobbyingMeetings/location/id,Identifier,True, -lobbyingMeetings/location/description,Description,True, -lobbyingMeetings/location/geometry,Geometry,False, -lobbyingMeetings/location/geometry/type,Type,False, -lobbyingMeetings/location/geometry/coordinates,Coordinates,False, -lobbyingMeetings/location/gazetteer,Gazetteer,False, -lobbyingMeetings/location/gazetteer/scheme,Gazetteer scheme,False, -lobbyingMeetings/location/gazetteer/identifiers,Identifiers,False, -lobbyingMeetings/location/uri,URI,True, -lobbyingMeetings/location/address,Address,False, -lobbyingMeetings/location/address,Address,False, -lobbyingMeetings/location/address/streetAddress,Street address,True, -lobbyingMeetings/location/address/locality,Locality,True, -lobbyingMeetings/location/address/region,Region,True, -lobbyingMeetings/location/address/postalCode,Postal code,True, -lobbyingMeetings/location/address/countryName,Country name,True, +lobbyingMeetings/location,Address,False, +lobbyingMeetings/location/streetAddress,Street address,True, +lobbyingMeetings/location/locality,Locality,True, +lobbyingMeetings/location/region,Region,True, +lobbyingMeetings/location/postalCode,Postal code,True, +lobbyingMeetings/location/countryName,Country name,True, lobbyingMeetings/numberOfParticipants,Participant count,False, lobbyingMeetings/publicOfficial,Public official,False, lobbyingMeetings/publicOfficial,Public official,False, diff --git a/docs/examples/blank.json b/docs/examples/blank.json index 9b2911b8..659e1772 100644 --- a/docs/examples/blank.json +++ b/docs/examples/blank.json @@ -421,15 +421,11 @@ { "id": "string", "location": { - "id": "string", - "description": "string", - "address": { - "streetAddress": "string", - "locality": "string", - "region": "string", - "postalCode": "string", - "countryName": "string" - } + "streetAddress": "string", + "locality": "string", + "region": "string", + "postalCode": "string", + "countryName": "string" }, "date": "date-time", "numberOfParticipants": "integer", diff --git a/docs/examples/example.json b/docs/examples/example.json index ea20694e..b8dd76cc 100644 --- a/docs/examples/example.json +++ b/docs/examples/example.json @@ -964,7 +964,7 @@ { "id": "1", "date": "2024-01-01T00:00:00Z", - "address": { + "location": { "streetAddress": "1600 Amphitheatre Pkwy", "locality": "London", "region": "London", diff --git a/docs/reference/schema.md b/docs/reference/schema.md index a3974d02..5b1baf93 100644 --- a/docs/reference/schema.md +++ b/docs/reference/schema.md @@ -323,7 +323,6 @@ Each `Classification` has the following fields: This sub-schema is referenced by the following properties: * [`locations`](project-schema.json,,locations) -* [`Meeting/location`](project-schema.json,/definitions/Meeting,location) Each `Location` has the following fields: @@ -346,11 +345,6 @@ Each `Location` has the following fields: :title: locations ``` -```{jsoninclude} ../../docs/examples/example.json -:jsonpointer: /projects/0/lobbyingMeetings/0/location -:title: lobbyingMeetings/0/location -``` - ```` ````` @@ -586,6 +580,7 @@ When working with data, users ought to be aware that addresses might not always This sub-schema is referenced by the following properties: * [`Location/address`](project-schema.json,/definitions/Location,address) * [`Organization/address`](project-schema.json,/definitions/Organization,address) +* [`Meeting/location`](project-schema.json,/definitions/Meeting,location) Each `Address` has the following fields: @@ -614,8 +609,8 @@ Each `Address` has the following fields: ``` ```{jsoninclude} ../../docs/examples/example.json -:jsonpointer: /projects/0/lobbyingMeetings/0/location/address -:title: lobbyingMeetings/0/location/address +:jsonpointer: /projects/0/lobbyingMeetings/0/location +:title: lobbyingMeetings/0/location ``` ```` diff --git a/schema/project-level/project-schema.json b/schema/project-level/project-schema.json index fdc34d06..0954facd 100644 --- a/schema/project-level/project-schema.json +++ b/schema/project-level/project-schema.json @@ -2032,12 +2032,12 @@ "location": { "title": "Location", "description": "The location of the meeting.", - "$ref": "#/definitions/Location" + "$ref": "#/definitions/Address" }, "numberOfParticipants": { "title": "Participant count", "description": "The number of people in attendance at the meeting.", - "type": "number" + "type": "integer" }, "publicOfficial": { "title": "Public official", From b14f927d4ec7b55dea149c384f05d0a77c99712b Mon Sep 17 00:00:00 2001 From: odscjen Date: Mon, 13 Nov 2023 15:28:49 +0000 Subject: [PATCH 06/19] fix example errors --- docs/examples/blank.json | 10 +++++----- docs/examples/example.json | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/examples/blank.json b/docs/examples/blank.json index 659e1772..aaa3a110 100644 --- a/docs/examples/blank.json +++ b/docs/examples/blank.json @@ -431,11 +431,11 @@ "numberOfParticipants": "integer", "publicOfficial": { "person": { - "name": "string" - }, - "organization": { - "id": "string", - "name": "string" + "name": "string", + "organization": { + "id": "string", + "name": "string" + } }, "jobTitle": "string" } diff --git a/docs/examples/example.json b/docs/examples/example.json index b8dd76cc..c99264be 100644 --- a/docs/examples/example.json +++ b/docs/examples/example.json @@ -974,11 +974,11 @@ "numberOfParticipants": 4, "publicOfficial": { "person": { - "name": "Brett Gliddon" - }, - "organization": { - "name": "Motorways UK", - "id": "GB-GOR-XX1234" + "name": "Brett Gliddon", + "organization": { + "name": "Motorways UK", + "id": "GB-GOR-XX1234" + } }, "jobTitle": "Group General Manager Transport Services" } From 47d03b275da8c8625c7c75051fdad07852ba46cd Mon Sep 17 00:00:00 2001 From: odscjen Date: Tue, 14 Nov 2023 10:57:43 +0000 Subject: [PATCH 07/19] apply review suggestions --- docs/_static/i18n.csv | 22 +++++++++++----------- docs/examples/blank.json | 10 +++++----- docs/examples/example.json | 10 +++++----- docs/reference/changelog.md | 5 +---- docs/reference/schema.md | 16 ++++++++-------- schema/project-level/project-schema.json | 16 ++++++++-------- 6 files changed, 38 insertions(+), 41 deletions(-) diff --git a/docs/_static/i18n.csv b/docs/_static/i18n.csv index 05ba3e5f..f4a76053 100644 --- a/docs/_static/i18n.csv +++ b/docs/_static/i18n.csv @@ -370,20 +370,20 @@ lobbyingMeetings,Lobbying meetings,False, lobbyingMeetings,Meeting,False, lobbyingMeetings/id,ID,True, lobbyingMeetings/date,Date,False, -lobbyingMeetings/location,Location,False, -lobbyingMeetings/location,Address,False, -lobbyingMeetings/location/streetAddress,Street address,True, -lobbyingMeetings/location/locality,Locality,True, -lobbyingMeetings/location/region,Region,True, -lobbyingMeetings/location/postalCode,Postal code,True, -lobbyingMeetings/location/countryName,Country name,True, +lobbyingMeetings/address,Address,False, +lobbyingMeetings/address,Address,False, +lobbyingMeetings/address/streetAddress,Street address,True, +lobbyingMeetings/address/locality,Locality,True, +lobbyingMeetings/address/region,Region,True, +lobbyingMeetings/address/postalCode,Postal code,True, +lobbyingMeetings/address/countryName,Country name,True, lobbyingMeetings/numberOfParticipants,Participant count,False, lobbyingMeetings/publicOfficial,Public official,False, lobbyingMeetings/publicOfficial,Public official,False, lobbyingMeetings/publicOfficial/person,Person.,False, lobbyingMeetings/publicOfficial/person/name,Name,True, -lobbyingMeetings/publicOfficial/person/organization,Organization,False, -lobbyingMeetings/publicOfficial/person/organization,Organization reference,False, -lobbyingMeetings/publicOfficial/person/organization/name,Organization name,True, -lobbyingMeetings/publicOfficial/person/organization/id,Organization ID,True, +lobbyingMeetings/publicOfficial/organization,Organization,False, +lobbyingMeetings/publicOfficial/organization,Organization reference,False, +lobbyingMeetings/publicOfficial/organization/name,Organization name,True, +lobbyingMeetings/publicOfficial/organization/id,Organization ID,True, lobbyingMeetings/publicOfficial/jobTitle,Job title,True, diff --git a/docs/examples/blank.json b/docs/examples/blank.json index aaa3a110..659e1772 100644 --- a/docs/examples/blank.json +++ b/docs/examples/blank.json @@ -431,11 +431,11 @@ "numberOfParticipants": "integer", "publicOfficial": { "person": { - "name": "string", - "organization": { - "id": "string", - "name": "string" - } + "name": "string" + }, + "organization": { + "id": "string", + "name": "string" }, "jobTitle": "string" } diff --git a/docs/examples/example.json b/docs/examples/example.json index c99264be..b8dd76cc 100644 --- a/docs/examples/example.json +++ b/docs/examples/example.json @@ -974,11 +974,11 @@ "numberOfParticipants": 4, "publicOfficial": { "person": { - "name": "Brett Gliddon", - "organization": { - "name": "Motorways UK", - "id": "GB-GOR-XX1234" - } + "name": "Brett Gliddon" + }, + "organization": { + "name": "Motorways UK", + "id": "GB-GOR-XX1234" }, "jobTitle": "Group General Manager Transport Services" } diff --git a/docs/reference/changelog.md b/docs/reference/changelog.md index 0ddd3c3d..a96852fc 100644 --- a/docs/reference/changelog.md +++ b/docs/reference/changelog.md @@ -28,10 +28,7 @@ * `.transactions` * `.milestones` * `ContractingProcesses.milestones` -* [#428](https://github.com/open-contracting/infrastructure/pull/428) - add objects: - * `Meeting` - * `lobbyingMeetings` - * `PublicOfficial` +* [#428](https://github.com/open-contracting/infrastructure/pull/428) - add `lobbyingMeetings` field. ### Codelists diff --git a/docs/reference/schema.md b/docs/reference/schema.md index 5b1baf93..54a9045a 100644 --- a/docs/reference/schema.md +++ b/docs/reference/schema.md @@ -489,7 +489,7 @@ This sub-schema is referenced by the following properties: * [`BudgetBreakdown/sourceParty`](project-schema.json,/definitions/BudgetBreakdown,sourceParty) * [`Transaction/payer`](project-schema.json,/definitions/Transaction,payer) * [`Transaction/payee`](project-schema.json,/definitions/Transaction,payee) -* [`PublicOfficial/person/organization`](project-schema.json,/definitions/PublicOfficial,person/organization) +* [`PublicOfficial/organization`](project-schema.json,/definitions/PublicOfficial,organization) Each `OrganizationReference` has the following fields: @@ -558,8 +558,8 @@ Each `OrganizationReference` has the following fields: ``` ```{jsoninclude} ../../docs/examples/example.json -:jsonpointer: /projects/0/lobbyingMeetings/0/publicOfficial/person/organization -:title: lobbyingMeetings/0/publicOfficial/person/organization +:jsonpointer: /projects/0/lobbyingMeetings/0/publicOfficial/organization +:title: lobbyingMeetings/0/publicOfficial/organization ``` ```` @@ -580,7 +580,7 @@ When working with data, users ought to be aware that addresses might not always This sub-schema is referenced by the following properties: * [`Location/address`](project-schema.json,/definitions/Location,address) * [`Organization/address`](project-schema.json,/definitions/Organization,address) -* [`Meeting/location`](project-schema.json,/definitions/Meeting,location) +* [`Meeting/address`](project-schema.json,/definitions/Meeting,address) Each `Address` has the following fields: @@ -609,8 +609,8 @@ Each `Address` has the following fields: ``` ```{jsoninclude} ../../docs/examples/example.json -:jsonpointer: /projects/0/lobbyingMeetings/0/location -:title: lobbyingMeetings/0/location +:jsonpointer: /projects/0/lobbyingMeetings/0/address +:title: lobbyingMeetings/0/address ``` ```` @@ -1107,7 +1107,7 @@ Each `Meeting` has the following fields: ```{jsonschema} ../../build/current_lang/project-schema.json :pointer: /definitions/Meeting -:collapse: id,date,location,numberOfParticipants,publicOfficial +:collapse: id,date,address,numberOfParticipants,publicOfficial :addtargets: ``` @@ -1142,7 +1142,7 @@ Each `PublicOfficial` has the following fields: ```{jsonschema} ../../build/current_lang/project-schema.json :pointer: /definitions/PublicOfficial -:collapse: jobTitle +:collapse: organization,jobTitle :addtargets: ``` diff --git a/schema/project-level/project-schema.json b/schema/project-level/project-schema.json index 0954facd..233d2a99 100644 --- a/schema/project-level/project-schema.json +++ b/schema/project-level/project-schema.json @@ -2029,9 +2029,9 @@ ], "format": "date-time" }, - "location": { - "title": "Location", - "description": "The location of the meeting.", + "address": { + "title": "Address", + "description": "The address of the meeting.", "$ref": "#/definitions/Address" }, "numberOfParticipants": { @@ -2064,14 +2064,14 @@ "title": "Name", "description": "The full name of the person.", "type": "string" - }, - "organization": { - "title": "Organization", - "description": "The organization in respect of which the person is a public official.", - "$ref": "#/definitions/OrganizationReference" } } }, + "organization": { + "title": "Organization", + "description": "The organization in respect of which the person is a public official.", + "$ref": "#/definitions/OrganizationReference" + }, "jobTitle": { "title": "Job title", "description": "The job title of the person with respect to the organization.", From 9d35ec722fec0a1e7fa915c27f46d30ce8287f84 Mon Sep 17 00:00:00 2001 From: odscjen Date: Tue, 14 Nov 2023 11:32:24 +0000 Subject: [PATCH 08/19] add social.consultationMeetings and update sustainability.yaml --- docs/_static/i18n.csv | 23 ++++ docs/cost/ids/sustainability.md | 109 ++++++++++-------- docs/examples/blank.json | 2 +- docs/examples/example.json | 2 +- docs/reference/changelog.md | 2 +- docs/reference/schema.md | 56 +++++++++ mapping/sustainability.yaml | 54 +++++---- .../project-level/codelists/documentType.csv | 2 + schema/project-level/project-schema.json | 21 ++++ 9 files changed, 196 insertions(+), 75 deletions(-) diff --git a/docs/_static/i18n.csv b/docs/_static/i18n.csv index f4a76053..c2c0ca20 100644 --- a/docs/_static/i18n.csv +++ b/docs/_static/i18n.csv @@ -387,3 +387,26 @@ lobbyingMeetings/publicOfficial/organization,Organization reference,False, lobbyingMeetings/publicOfficial/organization/name,Organization name,True, lobbyingMeetings/publicOfficial/organization/id,Organization ID,True, lobbyingMeetings/publicOfficial/jobTitle,Job title,True, +social,Social,False, +social,Social,False, +social/consultationMeetings,Public consultation meetings,False, +social/consultationMeetings,Meeting,False, +social/consultationMeetings/id,ID,True, +social/consultationMeetings/date,Date,False, +social/consultationMeetings/address,Address,False, +social/consultationMeetings/address,Address,False, +social/consultationMeetings/address/streetAddress,Street address,True, +social/consultationMeetings/address/locality,Locality,True, +social/consultationMeetings/address/region,Region,True, +social/consultationMeetings/address/postalCode,Postal code,True, +social/consultationMeetings/address/countryName,Country name,True, +social/consultationMeetings/numberOfParticipants,Participant count,False, +social/consultationMeetings/publicOfficial,Public official,False, +social/consultationMeetings/publicOfficial,Public official,False, +social/consultationMeetings/publicOfficial/person,Person.,False, +social/consultationMeetings/publicOfficial/person/name,Name,True, +social/consultationMeetings/publicOfficial/organization,Organization,False, +social/consultationMeetings/publicOfficial/organization,Organization reference,False, +social/consultationMeetings/publicOfficial/organization/name,Organization name,True, +social/consultationMeetings/publicOfficial/organization/id,Organization ID,True, +social/consultationMeetings/publicOfficial/jobTitle,Job title,True, diff --git a/docs/cost/ids/sustainability.md b/docs/cost/ids/sustainability.md index d89df18e..0a8c9a8c 100644 --- a/docs/cost/ids/sustainability.md +++ b/docs/cost/ids/sustainability.md @@ -1440,7 +1440,7 @@ Disclose the occurrence of public meetings with communities and impacted groups :columns: 8 OC4IDS mapping ^^^ -See mapping for data point "Public consultation meetings" in the Social extension +See mapping for the Public consultation meetings data point in the Social module. ```json ``` @@ -1466,38 +1466,45 @@ OC4IDS mapping ^^^ For each planned disbursement: -* If the disbursement relates to a contracting processes, for example a payment from a funder to a supplier or subcontractor of a supplier, get the `ContractingProcess` in the `.contractingProcesses` array to which the disbursement relates and add a `Milestone` object to its `.summary.milestones` array. Otherwise, if the disbursement relates to the project, for example a payment from a funder to the public authority, add a `Milestone` object to the project-level `.milestones` array. -* Set the milestone's: - * `.id` incrementally - * `.status` to 'scheduled' - * `.dueDate` to the date on which the disbursement is planned to occur - * `.type` to 'payment' - * `.value` to the amount and currency of the planned disbursement +- If the disbursement relates to a contracting processes, for example a payment from a funder to a supplier or subcontractor of a supplier, get the `ContractingProcess` in the `.contractingProcesses` array to which the disbursement relates and add a `Milestone` object to its `.summary.milestones` array. Otherwise, if the disbursement relates to the project, for example a payment from a funder to the public authority, add a `Milestone` object to the project-level `.milestones` array. +- Set the milestone's: + - `.id` incrementally + - `.status` to 'scheduled' + - `.dueDate` to the date on which the disbursement is planned to occur + - `.type` to 'payment' + - `.value` to the amount and currency of the planned disbursement For each actual disbursement: -* If the disbursement relates to a contracting processes, for example a payment from a funder to a supplier or subcontractor of a supplier, get the `ContractingProcess` in the `.contractingProcesses` array to which the disbursement relates and add a `Transaction` object to its `.summary.transactions` array. Otherwise, if the disbursement relates to the project, for example a payment from a funder to the public authority, add a `Transaction` object to the project-level `.transactions` array. -* Set the transaction's: - * `.id` incrementally - * `.date` to the date of the disbursement - * `.value` to the amount and currency of the disbursement - -* Get the `Organization` in `.parties` that represents the payer. If none exists yet, [add an organization](../common.md#add-an-organization) for the payer: - * Add 'payer' to the organization's `.roles` array - * Set the transaction's `.payer` to the `.id` and `.name` of the organization -* Get the `Organization` in `.parties` that represents the payee. If none exists yet, [add an organization](../common.md#add-an-organization) for the payee: - * Add 'payee' to the organization's `.roles` array. - * Set the transaction's `.payee` to the `.id` and `.name` of the organization -* Get the `Milestone` in `.milestones` that represents that planned disbursement: - * Set its `.status` to 'met' - * Set its `.dateMet` to the date of the disbursement - * Set the transaction's `.relatedImplementationMilestone` to the `.id` and `.title` of the milestone +- If the disbursement relates to a contracting processes, for example a payment from a funder to a supplier or subcontractor of a supplier, get the `ContractingProcess` in the `.contractingProcesses` array to which the disbursement relates and add a `Transaction` object to its `.summary.transactions` array. Otherwise, if the disbursement relates to the project, for example a payment from a funder to the public authority, add a `Transaction` object to the project-level `.transactions` array. + +- Set the transaction's: + + - `.id` incrementally + - `.date` to the date of the disbursement + - `.value` to the amount and currency of the disbursement + +- Get the `Organization` in `.parties` that represents the payer. If none exists yet, [add an organization](../common.md#add-an-organization) for the payer: + + - Add 'payer' to the organization's `.roles` array + - Set the transaction's `.payer` to the `.id` and `.name` of the organization + +- Get the `Organization` in `.parties` that represents the payee. If none exists yet, [add an organization](../common.md#add-an-organization) for the payee: + + - Add 'payee' to the organization's `.roles` array. + - Set the transaction's `.payee` to the `.id` and `.name` of the organization + +- Get the `Milestone` in `.milestones` that represents that planned disbursement: + + - Set its `.status` to 'met' + - Set its `.dateMet` to the date of the disbursement + - Set the transaction's `.relatedImplementationMilestone` to the `.id` and `.title` of the milestone ```json { "milestones": [ { "id": "1", - "title": "Grant disbursement" + "title": "Grant disbursement", "status": "met", "dueDate": "2023-07-01T00:00:00Z", "dateMet": "2023-08-01T00:00:00Z", @@ -2128,16 +2135,16 @@ Project Level: For each meeting: -1. Publish the meeting invite. Add a document, set its `.documentType` to 'consultationMeetingInvite' and its `.url` to the URL at which the meeting invite is available. +1. Publish the meeting invite. Add a document, set its `.documentType` to 'consultationMeetingInvitation' and its `.url` to the URL at which the meeting invite is available. 2. Publish the meeting details. Add a `Meeting` object to the `.social.consultationMeetings` array and set: - `.id` incrementally - `.date` to the date of the meeting - `.address` to the address of the meeting -- `.participantCount` to the number of people that participated in the meeting +- `.numberOfparticipants` to the number of people that participated in the meeting -3. Publish the meeting minutes. Add a document, set its `.documentType` to 'consultationMeetingMinutes' and its `.url` to the URL at which the meeting minutes are available. +3. Publish the meeting minutes. Add a document, set its `.documentType` to 'minutes.consultationMeeting' and its `.url` to the URL at which the meeting minutes are available. ```json { "social": { @@ -2152,19 +2159,19 @@ For each meeting: "postalCode": "94043", "countryName": "United States" }, - "participantCount": 12 + "numberOfParticipants": 12 } ] }, "documents": [ { "id": "1", - "documentType": "consultationMeetingInvite", - "url": "http://example.com/consultationMeetingInvite.pdf" + "documentType": "consultationMeetingInvitation", + "url": "http://example.com/consultationMeetingInvitation.pdf" }, { "id": "2", - "documentType": "consultationMeetingMinutes", + "documentType": "minutes.consultationMeeting", "url": "http://example.com/consultationMeetingMinutes.pdf" } ] @@ -2816,16 +2823,17 @@ Project Level: For each meeting: -1. Publish the meeting agenda. Add a document, set its `.documentType` to 'lobbyingMeetingAgenda' and its `.url` to the URL at which the agenda is available. - -2. Publish the meeting details. Add a `Meeting` object to the `.lobbyingMeetings` array and set: +1. Publish the meeting details. Add a `Meeting` object to the `.lobbyingMeetings` array and set: - `.id` incrementally - `.date` to the date of the meeting - `.address` to the address of the meeting -- `.beneficiary` to the name of the organisation or interest group that ultimately benefits from the lobbying activity +- `.numberOfParticipants` to the number of people present at the meeting +- `.publicOfficial.name` to the name of the person who was representing the organization at the meeting. +- `.publicOfficial.organization` to the `.name` and `.id` of the organization the public official represents. These should match the organization's entry in the `parties` array + ` `.publicOfficial.jobTitle`to the job title of the person named in`.name\` -3. Publish the meeting minutes. Add a document, set its `.documentType` to 'lobbyingMeetingMinutes' and its `.url` to the URL at which the meeting minutes are available. +2. Publish the meeting minutes. Add a document, set its `.documentType` to 'minutes.lobbyingMeeting' and its `.url` to the URL at which the meeting minutes are available. ```json { "lobbyingMeetings": [ @@ -2834,23 +2842,28 @@ For each meeting: "date": "2024-01-01T00:00:00Z", "address": { "streetAddress": "1600 Amphitheatre Pkwy", - "locality": "Mountain View", - "region": "CA", - "postalCode": "94043", - "countryName": "United States" + "locality": "London", + "region": "London", + "postalCode": "WC1 8HG", + "countryName": "United Kingdom" }, - "beneficiary": "Arup Group" + "numberOfParticipants": 4, + "publicOfficial": { + "person": { + "name": "Brett Gliddon" + }, + "organization": { + "name": "Motorways UK", + "id": "GB-GOR-XX1234" + }, + "jobTitle": "Group General Manager Transport Services" + } } ], "documents": [ - { - "id": "1", - "documentType": "lobbyingMeetingAgenda", - "url": "http://example.com/lobbyingMeetingAgenda.pdf" - }, { "id": "2", - "documentType": "lobbyingMeetingMinutes", + "documentType": "minutes.lobbyingMeeting", "url": "http://example.com/lobbyingMeetingMinutes.pdf" } ] diff --git a/docs/examples/blank.json b/docs/examples/blank.json index 659e1772..ca3c419e 100644 --- a/docs/examples/blank.json +++ b/docs/examples/blank.json @@ -420,7 +420,7 @@ "lobbyingMeetings": [ { "id": "string", - "location": { + "address": { "streetAddress": "string", "locality": "string", "region": "string", diff --git a/docs/examples/example.json b/docs/examples/example.json index b8dd76cc..ea20694e 100644 --- a/docs/examples/example.json +++ b/docs/examples/example.json @@ -964,7 +964,7 @@ { "id": "1", "date": "2024-01-01T00:00:00Z", - "location": { + "address": { "streetAddress": "1600 Amphitheatre Pkwy", "locality": "London", "region": "London", diff --git a/docs/reference/changelog.md b/docs/reference/changelog.md index a96852fc..83c4d1d5 100644 --- a/docs/reference/changelog.md +++ b/docs/reference/changelog.md @@ -28,7 +28,7 @@ * `.transactions` * `.milestones` * `ContractingProcesses.milestones` -* [#428](https://github.com/open-contracting/infrastructure/pull/428) - add `lobbyingMeetings` field. +* [#428](https://github.com/open-contracting/infrastructure/pull/428) - add `lobbyingMeetings` and `social.consultationMeetings` fields. ### Codelists diff --git a/docs/reference/schema.md b/docs/reference/schema.md index 54a9045a..095f46b3 100644 --- a/docs/reference/schema.md +++ b/docs/reference/schema.md @@ -562,6 +562,11 @@ Each `OrganizationReference` has the following fields: :title: lobbyingMeetings/0/publicOfficial/organization ``` +```{jsoninclude} ../../docs/examples/example.json +:jsonpointer: /projects/0/social/consultationMeetings/0/publicOfficial/organization +:title: social/consultationMeetings/0/publicOfficial/organization +``` + ```` ````` @@ -613,6 +618,11 @@ Each `Address` has the following fields: :title: lobbyingMeetings/0/address ``` +```{jsoninclude} ../../docs/examples/example.json +:jsonpointer: /projects/0/social/consultationMeetings/0/address +:title: social/consultationMeetings/0/address +``` + ```` ````` @@ -1098,6 +1108,7 @@ Each `MilestoneReference` has the following fields: This sub-schema is referenced by the following properties: * [`lobbyingMeetings`](project-schema.json,,lobbyingMeetings) +* [`Social/consultationMeetings`](project-schema.json,/definitions/Social,consultationMeetings) Each `Meeting` has the following fields: @@ -1120,6 +1131,11 @@ Each `Meeting` has the following fields: :title: lobbyingMeetings ``` +```{jsoninclude} ../../docs/examples/example.json +:jsonpointer: /projects/0/social/consultationMeetings +:title: social/consultationMeetings +``` + ```` ````` @@ -1155,6 +1171,46 @@ Each `PublicOfficial` has the following fields: :title: lobbyingMeetings/0/publicOfficial ``` +```{jsoninclude} ../../docs/examples/example.json +:jsonpointer: /projects/0/social/consultationMeetings/0/publicOfficial +:title: social/consultationMeetings/0/publicOfficial +``` + +```` + +````` + +### Social + +`Social` is defined as: + +```{field-description} ../../build/current_lang/project-schema.json /definitions/Social +``` + +This sub-schema is referenced by the following properties: +* [`social`](project-schema.json,,social) + +Each `Social` has the following fields: + +`````{tab-set} + +````{tab-item} Schema + +```{jsonschema} ../../build/current_lang/project-schema.json +:pointer: /definitions/Social +:collapse: consultationMeetings +:addtargets: +``` + +```` + +````{tab-item} Examples + +```{jsoninclude} ../../docs/examples/example.json +:jsonpointer: /projects/0/social +:title: social +``` + ```` ````` diff --git a/mapping/sustainability.yaml b/mapping/sustainability.yaml index f11e6f83..ddb22929 100644 --- a/mapping/sustainability.yaml +++ b/mapping/sustainability.yaml @@ -801,7 +801,7 @@ module: Climate finance indicator: Public participation disclosure format: Disclose the occurrence of public meetings with communities and impacted groups including the minutes, number of the participants, dates and location of these meetings (E.g. Meeting 1 \[date\] \[location\] \[number of participants\] \[Document\], Meeting 2 \[date\] \[location\] \[number of participants\], \[Document\]). - mapping: See mapping for data point "Public consultation meetings" in the Social extension + mapping: See mapping for the Public consultation meetings data point in the Social module. example: '' - id: '3.20' title: Disbursement records @@ -1209,16 +1209,16 @@ For each meeting: - 1. Publish the meeting invite. Add a document, set its `.documentType` to 'consultationMeetingInvite' and its `.url` to the URL at which the meeting invite is available. + 1. Publish the meeting invite. Add a document, set its `.documentType` to 'consultationMeetingInvitation' and its `.url` to the URL at which the meeting invite is available. 2. Publish the meeting details. Add a `Meeting` object to the `.social.consultationMeetings` array and set: - `.id` incrementally - `.date` to the date of the meeting - `.address` to the address of the meeting - - `.participantCount` to the number of people that participated in the meeting + - `.numberOfparticipants` to the number of people that participated in the meeting - 3. Publish the meeting minutes. Add a document, set its `.documentType` to 'consultationMeetingMinutes' and its `.url` to the URL at which the meeting minutes are available. + 3. Publish the meeting minutes. Add a document, set its `.documentType` to 'minutes.consultationMeeting' and its `.url` to the URL at which the meeting minutes are available. example: |- { "social": { @@ -1233,19 +1233,19 @@ "postalCode": "94043", "countryName": "United States" }, - "participantCount": 12 + "numberOfParticipants": 12 } ] }, "documents": [ { "id": "1", - "documentType": "consultationMeetingInvite", - "url": "http://example.com/consultationMeetingInvite.pdf" + "documentType": "consultationMeetingInvitation", + "url": "http://example.com/consultationMeetingInvitation.pdf" }, { "id": "2", - "documentType": "consultationMeetingMinutes", + "documentType": "minutes.consultationMeeting", "url": "http://example.com/consultationMeetingMinutes.pdf" } ] @@ -1714,16 +1714,17 @@ For each meeting: - 1. Publish the meeting agenda. Add a document, set its `.documentType` to 'lobbyingMeetingAgenda' and its `.url` to the URL at which the agenda is available. - - 2. Publish the meeting details. Add a `Meeting` object to the `.lobbyingMeetings` array and set: + 1. Publish the meeting details. Add a `Meeting` object to the `.lobbyingMeetings` array and set: - `.id` incrementally - `.date` to the date of the meeting - `.address` to the address of the meeting - - `.beneficiary` to the name of the organisation or interest group that ultimately benefits from the lobbying activity + - `.numberOfParticipants` to the number of people present at the meeting + - `.publicOfficial.name` to the name of the person who was representing the organization at the meeting. + - `.publicOfficial.organization` to the `.name` and `.id` of the organization the public official represents. These should match the organization's entry in the `parties` array + ` `.publicOfficial.jobTitle`to the job title of the person named in`.name\` - 3. Publish the meeting minutes. Add a document, set its `.documentType` to 'lobbyingMeetingMinutes' and its `.url` to the URL at which the meeting minutes are available. + 2. Publish the meeting minutes. Add a document, set its `.documentType` to 'minutes.lobbyingMeeting' and its `.url` to the URL at which the meeting minutes are available. example: |- { "lobbyingMeetings": [ @@ -1732,23 +1733,28 @@ "date": "2024-01-01T00:00:00Z", "address": { "streetAddress": "1600 Amphitheatre Pkwy", - "locality": "Mountain View", - "region": "CA", - "postalCode": "94043", - "countryName": "United States" + "locality": "London", + "region": "London", + "postalCode": "WC1 8HG", + "countryName": "United Kingdom" }, - "beneficiary": "Arup Group" + "numberOfParticipants": 4, + "publicOfficial": { + "person": { + "name": "Brett Gliddon" + }, + "organization": { + "name": "Motorways UK", + "id": "GB-GOR-XX1234" + }, + "jobTitle": "Group General Manager Transport Services" + } } ], "documents": [ - { - "id": "1", - "documentType": "lobbyingMeetingAgenda", - "url": "http://example.com/lobbyingMeetingAgenda.pdf" - }, { "id": "2", - "documentType": "lobbyingMeetingMinutes", + "documentType": "minutes.lobbyingMeeting", "url": "http://example.com/lobbyingMeetingMinutes.pdf" } ] diff --git a/schema/project-level/codelists/documentType.csv b/schema/project-level/codelists/documentType.csv index e103f0fa..7a425c89 100644 --- a/schema/project-level/codelists/documentType.csv +++ b/schema/project-level/codelists/documentType.csv @@ -65,3 +65,5 @@ designReport,Project design report,"A record of the justification for the design paymentCertificate,Payment certificate,A document certifying that the work specified on a supplier's estimate or invoice is complete and that payment to the supplier is approved.,OC4IDS escalationApproval,Escalation approval,Documentation of one or more approved escalations of the contract price during the project life-cycle.,OC4IDS minutes.lobbyingMeeting,Lobbying meeting minutes,"A record of the issues discussed, agreements reached and decisions taken at a lobbying meeting.",OC4IDS +minutes.consultationMeeting,Consultation meeting minutes,"A record of the issues discussed, agreements reached and decisions taken at a public consultation meeting.",OC4IDS +consultationMeetingInvitation,Consultation meeting inviation,A document detailing the occurrence of a public consultation meeting relating to the project.,OC4IDS diff --git a/schema/project-level/project-schema.json b/schema/project-level/project-schema.json index 233d2a99..7bc9015a 100644 --- a/schema/project-level/project-schema.json +++ b/schema/project-level/project-schema.json @@ -306,6 +306,11 @@ }, "uniqueItems": true, "minItems": 1 + }, + "social": { + "title": "Social", + "description": "Information about the social impact of the project and actions the project will take to mitigate potentially negative impacts on adjacent populations and project workers.", + "$ref": "#/definitions/Social" } }, "definitions": { @@ -2078,6 +2083,22 @@ "type": "string" } } + }, + "Social": { + "title": "Social", + "description": "Information about the social impact of the project and actions the project will take to mitigate potentially negative impacts on adjacent populations and project workers.", + "type": "object", + "properties": { + "consultationMeetings": { + "title": "Public consultation meetings", + "description": "Information about public consultation meetings held during the project preparation stage.", + "type": "array", + "items": { + "$ref": "#/definitions/Meeting" + } + } + }, + "minProperties": 1 } }, "minProperties": 1 From 02a752eee17dd0afdb83cf59b6fa67307e606ecb Mon Sep 17 00:00:00 2001 From: odscjen Date: Tue, 14 Nov 2023 11:36:30 +0000 Subject: [PATCH 09/19] update examples --- docs/examples/blank.json | 18 +++++++++++++++++- docs/examples/example.json | 18 +++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/docs/examples/blank.json b/docs/examples/blank.json index ca3c419e..ea73e88c 100644 --- a/docs/examples/blank.json +++ b/docs/examples/blank.json @@ -440,5 +440,21 @@ "jobTitle": "string" } } - ] + ], + "social": { + "consultationMeetings": [ + { + "id": "string", + "address": { + "streetAddress": "string", + "locality": "string", + "region": "string", + "postalCode": "string", + "countryName": "string" + }, + "date": "date-time", + "numberOfParticipants": "integer" + } + ] + } } diff --git a/docs/examples/example.json b/docs/examples/example.json index ea20694e..fb145ef8 100644 --- a/docs/examples/example.json +++ b/docs/examples/example.json @@ -983,7 +983,23 @@ "jobTitle": "Group General Manager Transport Services" } } - ] + ], + "social": { + "consultationMeetings": [ + { + "id": "1", + "address": { + "streetAddress": "1600 Amphitheatre Pkwy", + "locality": "Mountain View", + "region": "CA", + "postalCode": "94043", + "countryName": "United States" + }, + "date": "2024-01-01T00:00:00Z", + "numberOfParticipants": "25" + } + ] + } } ] } From 7afce35873a90c1bd2e97014808572ae79347541 Mon Sep 17 00:00:00 2001 From: odscjen Date: Tue, 14 Nov 2023 11:37:20 +0000 Subject: [PATCH 10/19] fix typo --- schema/project-level/codelists/documentType.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/project-level/codelists/documentType.csv b/schema/project-level/codelists/documentType.csv index 7a425c89..9409b0d5 100644 --- a/schema/project-level/codelists/documentType.csv +++ b/schema/project-level/codelists/documentType.csv @@ -66,4 +66,4 @@ paymentCertificate,Payment certificate,A document certifying that the work speci escalationApproval,Escalation approval,Documentation of one or more approved escalations of the contract price during the project life-cycle.,OC4IDS minutes.lobbyingMeeting,Lobbying meeting minutes,"A record of the issues discussed, agreements reached and decisions taken at a lobbying meeting.",OC4IDS minutes.consultationMeeting,Consultation meeting minutes,"A record of the issues discussed, agreements reached and decisions taken at a public consultation meeting.",OC4IDS -consultationMeetingInvitation,Consultation meeting inviation,A document detailing the occurrence of a public consultation meeting relating to the project.,OC4IDS +consultationMeetingInvitation,Consultation meeting invitation,A document detailing the occurrence of a public consultation meeting relating to the project.,OC4IDS From 9d6158e1caba99a7fa832f58ffd2879ac11725bc Mon Sep 17 00:00:00 2001 From: odscjen Date: Tue, 14 Nov 2023 11:42:47 +0000 Subject: [PATCH 11/19] fix examples --- docs/examples/blank.json | 12 +++++++++++- docs/examples/example.json | 24 +++++++++++++++++------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/docs/examples/blank.json b/docs/examples/blank.json index ea73e88c..93f7c690 100644 --- a/docs/examples/blank.json +++ b/docs/examples/blank.json @@ -453,7 +453,17 @@ "countryName": "string" }, "date": "date-time", - "numberOfParticipants": "integer" + "numberOfParticipants": "integer", + "publicOfficial": { + "person": { + "name": "string" + }, + "organization": { + "id": "string", + "name": "string" + }, + "jobTitle": "string" + } } ] } diff --git a/docs/examples/example.json b/docs/examples/example.json index fb145ef8..3edb7ac8 100644 --- a/docs/examples/example.json +++ b/docs/examples/example.json @@ -990,13 +990,23 @@ "id": "1", "address": { "streetAddress": "1600 Amphitheatre Pkwy", - "locality": "Mountain View", - "region": "CA", - "postalCode": "94043", - "countryName": "United States" - }, - "date": "2024-01-01T00:00:00Z", - "numberOfParticipants": "25" + "locality": "London", + "region": "London", + "postalCode": "WC1 8HG", + "countryName": "United Kingdom" + }, + "date": "2024-01-15T00:00:00Z", + "numberOfParticipants": "25", + "publicOfficial": { + "person": { + "name": "Brett Gliddon" + }, + "organization": { + "name": "Motorways UK", + "id": "GB-GOR-XX1234" + }, + "jobTitle": "Group General Manager Transport Services" + } } ] } From 435d3d020dc9743553c57c99c39dd8e728d5a4fc Mon Sep 17 00:00:00 2001 From: Duncan Dewhurst Date: Wed, 15 Nov 2023 09:02:19 +1300 Subject: [PATCH 12/19] docs/examples/example.json: Remove consultationMeetings.publicOfficial --- docs/examples/example.json | 12 +----------- docs/reference/schema.md | 12 +----------- manage.py | 3 ++- 3 files changed, 4 insertions(+), 23 deletions(-) diff --git a/docs/examples/example.json b/docs/examples/example.json index 7583d058..6b2de1f4 100644 --- a/docs/examples/example.json +++ b/docs/examples/example.json @@ -1019,17 +1019,7 @@ "countryName": "United Kingdom" }, "date": "2024-01-15T00:00:00Z", - "numberOfParticipants": "25", - "publicOfficial": { - "person": { - "name": "Brett Gliddon" - }, - "organization": { - "name": "Motorways UK", - "id": "GB-GOR-XX1234" - }, - "jobTitle": "Group General Manager Transport Services" - } + "numberOfParticipants": "25" } ] } diff --git a/docs/reference/schema.md b/docs/reference/schema.md index 94c2c62a..35716082 100644 --- a/docs/reference/schema.md +++ b/docs/reference/schema.md @@ -562,11 +562,6 @@ Each `OrganizationReference` has the following fields: :title: lobbyingMeetings/0/publicOfficial/organization ``` -```{jsoninclude} ../../docs/examples/example.json -:jsonpointer: /projects/0/social/consultationMeetings/0/publicOfficial/organization -:title: social/consultationMeetings/0/publicOfficial/organization -``` - ```` ````` @@ -585,8 +580,8 @@ When working with data, users ought to be aware that addresses might not always This sub-schema is referenced by the following properties: * [`Location/address`](project-schema.json,/definitions/Location,address) * [`Organization/address`](project-schema.json,/definitions/Organization,address) -* [`Meeting/address`](project-schema.json,/definitions/Meeting,address) * [`Person/address`](project-schema.json,/definitions/Person,address) +* [`Meeting/address`](project-schema.json,/definitions/Meeting,address) Each `Address` has the following fields: @@ -1174,11 +1169,6 @@ Each `PublicOfficial` has the following fields: :title: lobbyingMeetings/0/publicOfficial ``` -```{jsoninclude} ../../docs/examples/example.json -:jsonpointer: /projects/0/social/consultationMeetings/0/publicOfficial -:title: social/consultationMeetings/0/publicOfficial -``` - ```` ````` diff --git a/manage.py b/manage.py index bfc7990c..a59b1604 100755 --- a/manage.py +++ b/manage.py @@ -338,7 +338,8 @@ def update_sub_schema_reference(schema): 'metrics/0/observations/0/value', 'parties/0/beneficialOwners/0', 'parties/0/people/0/address', - 'parties/0/people/0/identifier'] + 'parties/0/people/0/identifier', + 'social/consultationMeetings/0/publicOfficial'] # Add examples definition["references"] = get_definition_references(schema, defn) From 118c5bf688f05a0c29130eea2feafc64596aa38a Mon Sep 17 00:00:00 2001 From: Duncan Dewhurst Date: Wed, 15 Nov 2023 09:46:14 +1300 Subject: [PATCH 13/19] mapping/sustainability.yaml: Link public consultation meetings --- docs/cost/ids/sustainability.md | 154 ++++++++++++++++---------------- manage.py | 4 +- mapping/sustainability.yaml | 2 +- 3 files changed, 81 insertions(+), 79 deletions(-) diff --git a/docs/cost/ids/sustainability.md b/docs/cost/ids/sustainability.md index 925e9679..8506ac65 100644 --- a/docs/cost/ids/sustainability.md +++ b/docs/cost/ids/sustainability.md @@ -23,7 +23,7 @@ This page documents a mapping from the elements in the CoST IDS sustainability m ## Economic and fiscal -(Economic and fiscal-Procurement strategy)= +(economic-and-fiscal-procurement-strategy)= `````{grid} 2 @@ -56,7 +56,7 @@ OC4IDS mapping ````` -(Economic and fiscal-Life cycle cost)= +(economic-and-fiscal-life-cycle-cost)= `````{grid} 2 @@ -94,7 +94,7 @@ OC4IDS mapping ````` -(Economic and fiscal-Life cycle cost calculation methodology)= +(economic-and-fiscal-life-cycle-cost-calculation-methodology)= `````{grid} 2 @@ -126,7 +126,7 @@ OC4IDS mapping ````` -(Economic and fiscal-Funding source for preparation, implementation and operation)= +(economic-and-fiscal-funding-source-for-preparation-implementation-and-operation)= `````{grid} 2 @@ -150,7 +150,7 @@ OC4IDS mapping ````` -(Economic and fiscal-Budget for preparation, implementation and operation)= +(economic-and-fiscal-budget-for-preparation-implementation-and-operation)= `````{grid} 2 @@ -174,7 +174,7 @@ OC4IDS mapping ````` -(Economic and fiscal-Cost benefit analysis)= +(economic-and-fiscal-cost-benefit-analysis)= `````{grid} 2 @@ -206,7 +206,7 @@ OC4IDS mapping ````` -(Economic and fiscal-Value for money)= +(economic-and-fiscal-value-for-money)= `````{grid} 2 @@ -238,7 +238,7 @@ Project Level: Publish in `documents`, with `.documentType` set to 'valueForMone ````` -(Economic and fiscal-Budget projections)= +(economic-and-fiscal-budget-projections)= `````{grid} 2 @@ -262,7 +262,7 @@ OC4IDS mapping ````` -(Economic and fiscal-Budget shortfall)= +(economic-and-fiscal-budget-shortfall)= `````{grid} 2 @@ -314,7 +314,7 @@ Add a `Metric` object to the `.metrics` array, set its `.id` incrementally and s ## Environment and climate -(Environment and climate-Environmental impact category)= +(environment-and-climate-environmental-impact-category)= `````{grid} 2 @@ -360,7 +360,7 @@ Project level: ````` -(Environment and climate-Environmental measures)= +(environment-and-climate-environmental-measures)= `````{grid} 2 @@ -393,7 +393,7 @@ Project level: Add a document, set its `.documentType` to 'environmentalMeasures ````` -(Environment and climate-Environmental exceptions)= +(environment-and-climate-environmental-exceptions)= `````{grid} 2 @@ -425,7 +425,7 @@ Project Level: Publish in `documents`, with `.documentType` set to 'environmenta ````` -(Environment and climate-Protected area)= +(environment-and-climate-protected-area)= `````{grid} 2 @@ -472,7 +472,7 @@ If the project is not located in a protected area, set `.environment.protectedAr ````` -(Environment and climate-Conservation measures)= +(environment-and-climate-conservation-measures)= `````{grid} 2 @@ -529,7 +529,7 @@ If there is an accompanying document publish in `documents`, with `.documentType ````` -(Environment and climate-Climate and disaster risk assessment)= +(environment-and-climate-climate-and-disaster-risk-assessment)= `````{grid} 2 @@ -562,7 +562,7 @@ Project level: Add a document, set its `.documentType` to 'climateAndDisasterRis ````` -(Environment and climate-Climate measures)= +(environment-and-climate-climate-measures)= `````{grid} 2 @@ -620,7 +620,7 @@ If there is an accompanying document publish in `documents`, with `.documentType ````` -(Environment and climate-Forecast of greenhouse gas emissions)= +(environment-and-climate-forecast-of-greenhouse-gas-emissions)= `````{grid} 2 @@ -686,7 +686,7 @@ Project-level: ````` -(Environment and climate-Environmental certifications)= +(environment-and-climate-environmental-certifications)= `````{grid} 2 @@ -725,7 +725,7 @@ Contracting process level: Publish in `documents`, with `.documentType` set to ' ````` -(Environment and climate-Decommissioning plans)= +(environment-and-climate-decommissioning-plans)= `````{grid} 2 @@ -757,7 +757,7 @@ Project level: Publish in `documents`, with `.documentType` set to 'decommission ````` -(Environment and climate-Decommissioning cost forecast)= +(environment-and-climate-decommissioning-cost-forecast)= `````{grid} 2 @@ -815,7 +815,7 @@ Project level: ## Climate finance -(Climate finance-Climate objective)= +(climate-finance-climate-objective)= `````{grid} 2 @@ -852,7 +852,7 @@ Project level: Add the relevant code from the climateChangeGoal codelist to the ````` -(Climate finance-Financial instrument)= +(climate-finance-financial-instrument)= `````{grid} 2 @@ -892,7 +892,7 @@ Project level: For each instrument, add a `finance` object to the `budget.financ ````` -(Climate finance-Climate transformation)= +(climate-finance-climate-transformation)= `````{grid} 2 @@ -926,7 +926,7 @@ Project level: Publish in documents, with `.documentType` set to 'climateTransfo ````` -(Climate finance-Climate finance decision-maker)= +(climate-finance-climate-finance-decision-maker)= `````{grid} 2 @@ -950,7 +950,7 @@ OC4IDS mapping ````` -(Climate finance-Nationally Determined Contributions (NDC))= +(climate-finance-nationally-determined-contributions-ndc)= `````{grid} 2 @@ -990,7 +990,7 @@ See mapping for data point "Policy coherence" in Institutional extension adding ````` -(Climate finance-Paris Agreement)= +(climate-finance-paris-agreement)= `````{grid} 2 @@ -1014,7 +1014,7 @@ See mapping for data point "Policy coherence" in Institutional extension adding ````` -(Climate finance-Beneficiaries)= +(climate-finance-beneficiaries)= `````{grid} 2 @@ -1040,7 +1040,7 @@ OC4IDS mapping ````` -(Climate finance-Amount of investment)= +(climate-finance-amount-of-investment)= `````{grid} 2 @@ -1076,7 +1076,7 @@ Project level: For each financing instrument, add the value and currency to the` ````` -(Climate finance-Funding source)= +(climate-finance-funding-source)= `````{grid} 2 @@ -1122,7 +1122,7 @@ Map the organization's `.id` from the party array to `financingParty.id` in the ````` -(Climate finance-Green Climate Fund Accredited Entity)= +(climate-finance-green-climate-fund-accredited-entity)= `````{grid} 2 @@ -1158,7 +1158,7 @@ Add each accredited entity organization to the `parties` array and add 'gcfAccre ````` -(Climate finance-Accredited Entity Type)= +(climate-finance-accredited-entity-type)= `````{grid} 2 @@ -1189,7 +1189,7 @@ OC4IDS mapping ````` -(Climate finance-Project preparation costs)= +(climate-finance-project-preparation-costs)= `````{grid} 2 @@ -1213,7 +1213,7 @@ OC4IDS mapping ````` -(Climate finance-Project preparation period)= +(climate-finance-project-preparation-period)= `````{grid} 2 @@ -1237,7 +1237,7 @@ OC4IDS mapping ````` -(Climate finance-Project approval period)= +(climate-finance-project-approval-period)= `````{grid} 2 @@ -1261,7 +1261,7 @@ OC4IDS mapping ````` -(Climate finance-Ratio of co-finance)= +(climate-finance-ratio-of-co-finance)= `````{grid} 2 @@ -1334,7 +1334,7 @@ For each co-financing arrangement add a new `finance` object to the `budget.fina ````` -(Climate finance-Terms of climate finance)= +(climate-finance-terms-of-climate-finance)= `````{grid} 2 @@ -1364,7 +1364,7 @@ OC4IDS mapping ````` -(Climate finance-Carbon efficiency)= +(climate-finance-carbon-efficiency)= `````{grid} 2 @@ -1388,7 +1388,7 @@ Publish the cost in `environment.abatementCost`. If supporting documentation is ````` -(Climate finance-Non-climate co-benefits)= +(climate-finance-non-climate-co-benefits)= `````{grid} 2 @@ -1425,7 +1425,7 @@ Project level: For each impact identified add a `benefit` object to the `benefit ````` -(Climate finance-Public consultation meetings)= +(climate-finance-public-consultation-meetings)= `````{grid} 2 @@ -1440,7 +1440,7 @@ Disclose the occurrence of public meetings with communities and impacted groups :columns: 8 OC4IDS mapping ^^^ -See mapping for the Public consultation meetings data point in the Social module. +See [public consultation meetings (social module)](social-public-consultation-meetings). ```json ``` @@ -1449,7 +1449,7 @@ See mapping for the Public consultation meetings data point in the Social module ````` -(Climate finance-Disbursement records)= +(climate-finance-disbursement-records)= `````{grid} 2 @@ -1544,7 +1544,7 @@ For each actual disbursement: ````` -(Climate finance-Type of project monitoring)= +(climate-finance-type-of-project-monitoring)= `````{grid} 2 @@ -1571,7 +1571,7 @@ OC4IDS mapping ````` -(Climate finance-Performance monitoring)= +(climate-finance-performance-monitoring)= `````{grid} 2 @@ -1604,7 +1604,7 @@ For each KPI add a `Metric` object to the `metrics` array and set the object's f ````` -(Climate finance-Reporting period)= +(climate-finance-reporting-period)= `````{grid} 2 @@ -1638,7 +1638,7 @@ For each KPI metric add the sentence "To be reported XXX" where XXX is the repor ````` -(Climate finance-Oversight reports)= +(climate-finance-oversight-reports)= `````{grid} 2 @@ -1662,7 +1662,7 @@ OC4IDS mapping ````` -(Climate finance-Independent monitoring)= +(climate-finance-independent-monitoring)= `````{grid} 2 @@ -1696,7 +1696,7 @@ Project level: Add an entry to `parties` with 'independentMonitor' included in i ````` -(Climate finance-Independent evaluation)= +(climate-finance-independent-evaluation)= `````{grid} 2 @@ -1731,7 +1731,7 @@ Project level: Add a document, set its `.documentType` to 'technicalAuditReport' ````` -(Climate finance-Impact measurement)= +(climate-finance-impact-measurement)= `````{grid} 2 @@ -1764,7 +1764,7 @@ Project level: Publish in documents, with `.documentType` set to 'impactMethodol ````` -(Climate finance-Carbon footprint)= +(climate-finance-carbon-footprint)= `````{grid} 2 @@ -1830,7 +1830,7 @@ Project-level: ````` -(Climate finance-Infrastructure assets to be decommissioned)= +(climate-finance-infrastructure-assets-to-be-decommissioned)= `````{grid} 2 @@ -1854,7 +1854,7 @@ OC4IDS mapping ````` -(Climate finance-Decommission period)= +(climate-finance-decommission-period)= `````{grid} 2 @@ -1878,7 +1878,7 @@ OC4IDS mapping ````` -(Climate finance-Decommission plan)= +(climate-finance-decommission-plan)= `````{grid} 2 @@ -1902,7 +1902,7 @@ See decommissioning plan data point in environment extension ````` -(Climate finance-Carbon decommission savings)= +(climate-finance-carbon-decommission-savings)= `````{grid} 2 @@ -1969,7 +1969,7 @@ Project-level: ````` -(Climate finance-Decommission mitigation plan)= +(climate-finance-decommission-mitigation-plan)= `````{grid} 2 @@ -2008,7 +2008,7 @@ Publish in documents, with `.documentType` set to 'socialImpact' and include a s ## Social -(Social-Number of beneficiaries)= +(social-number-of-beneficiaries)= `````{grid} 2 @@ -2032,7 +2032,7 @@ OC4IDS mapping ````` -(Social-Inclusive design and implementation)= +(social-inclusive-design-and-implementation)= `````{grid} 2 @@ -2075,7 +2075,7 @@ Project-level: ````` -(Social-Indigenous land)= +(social-indigenous-land)= `````{grid} 2 @@ -2116,7 +2116,7 @@ If the project is not located or cut through indigenous land, set `.social.indig ````` -(Social-Public consultation meetings)= +(social-public-consultation-meetings)= `````{grid} 2 @@ -2182,7 +2182,7 @@ For each meeting: ````` -(Social-Land compensation budget)= +(social-land-compensation-budget)= `````{grid} 2 @@ -2213,7 +2213,7 @@ Project Level: Set `.social.landCompensationBudget` to the amount and currency o ````` -(Social-Labour obligations)= +(social-labour-obligations)= `````{grid} 2 @@ -2292,7 +2292,7 @@ Publish the signed contract that includes labor obligations: Add a document to ````` -(Social-Labour budget)= +(social-labour-budget)= `````{grid} 2 @@ -2330,7 +2330,7 @@ Contract level: Publish the amount and currency of the labor budget in `.summary ````` -(Social-Workers' accidents)= +(social-workers-accidents)= `````{grid} 2 @@ -2396,7 +2396,7 @@ Publish summary statistics on worker fatalities: ````` -(Social-Health and safety certifications)= +(social-health-and-safety-certifications)= `````{grid} 2 @@ -2435,7 +2435,7 @@ Contracting process level: Publish in `.summary.documents`, with `.documentType` ````` -(Social-Construction materials testing)= +(social-construction-materials-testing)= `````{grid} 2 @@ -2503,7 +2503,7 @@ Publish test results: For each test result, add a document, set `.documentType` ````` -(Social-Building inspections)= +(social-building-inspections)= `````{grid} 2 @@ -2535,7 +2535,7 @@ Project Level: Publish in `documents`, with `.documentType` set to 'buildingInsp ````` -(Social-Jobs generated)= +(social-jobs-generated)= `````{grid} 2 @@ -2666,7 +2666,7 @@ Publish actual jobs created: ## Institutional -(Institutional-Policy coherence)= +(institutional-policy-coherence)= `````{grid} 2 @@ -2736,7 +2736,7 @@ If further documentation of the project's policy alignment is available, add a d ````` -(Institutional-Freedom of information requests)= +(institutional-freedom-of-information-requests)= `````{grid} 2 @@ -2770,7 +2770,7 @@ For each freedom of information request, add a document, set `.documentType` to ````` -(Institutional-Answers to Freedom of information requests)= +(institutional-answers-to-freedom-of-information-requests)= `````{grid} 2 @@ -2804,7 +2804,7 @@ For each freedom of information request response, add a document, set `.document ````` -(Institutional-Lobbying transparency)= +(institutional-lobbying-transparency)= `````{grid} 2 @@ -2874,7 +2874,7 @@ For each meeting: ````` -(Institutional-Beneficial ownership)= +(institutional-beneficial-ownership)= `````{grid} 2 @@ -2921,7 +2921,7 @@ For each beneficial owner: ````` -(Institutional-Sustainability criteria)= +(institutional-sustainability-criteria)= `````{grid} 2 @@ -2964,7 +2964,7 @@ Add a `Sustainability` object to the `.summary.tender.sustainability` array and ````` -(Institutional-Anti-corruption certifications)= +(institutional-anti-corruption-certifications)= `````{grid} 2 @@ -2996,7 +2996,7 @@ Project Level: Publish in documents, with .documentType set to 'antiCorruptionCe ````` -(Institutional-Independent monitoring)= +(institutional-independent-monitoring)= `````{grid} 2 @@ -3030,7 +3030,7 @@ Project Level: Add an entry to `parties` with 'independentMonitor' included in i ````` -(Institutional-Performance monitoring)= +(institutional-performance-monitoring)= `````{grid} 2 @@ -3061,7 +3061,7 @@ Project level: Publish in `metrics`. For each KPI add a Metric object to the met ````` -(Institutional-Risk management plans)= +(institutional-risk-management-plans)= `````{grid} 2 @@ -3093,7 +3093,7 @@ Project Level: Publish in documents, with .documentType set to 'riskProvisions' ````` -(Institutional-Sustainable sub-sectors)= +(institutional-sustainable-sub-sectors)= `````{grid} 2 diff --git a/manage.py b/manage.py index a59b1604..fbbbf1b0 100755 --- a/manage.py +++ b/manage.py @@ -14,6 +14,7 @@ import mdformat import requests import yaml +from docutils import nodes from jsonschema import FormatChecker from jsonschema.validators import Draft4Validator as validator from ocdsextensionregistry import ProfileBuilder @@ -928,9 +929,10 @@ def update_sustainability_docs(): modules[module] = [] title = element.get("title", "") + target = nodes.make_id(f"{module}-{title}") modules[module].extend( [ - f"\n({module}-{title})=", + f"\n({target})=", "\n\n`````{grid} 2", f"\n\n````{{grid-item-card}} {title}", "\n:columns: 4", diff --git a/mapping/sustainability.yaml b/mapping/sustainability.yaml index 8446b273..439d268d 100644 --- a/mapping/sustainability.yaml +++ b/mapping/sustainability.yaml @@ -801,7 +801,7 @@ module: Climate finance indicator: Public participation disclosure format: Disclose the occurrence of public meetings with communities and impacted groups including the minutes, number of the participants, dates and location of these meetings (E.g. Meeting 1 \[date\] \[location\] \[number of participants\] \[Document\], Meeting 2 \[date\] \[location\] \[number of participants\], \[Document\]). - mapping: See mapping for the Public consultation meetings data point in the Social module. + mapping: See [public consultation meetings (social module)](social-public-consultation-meetings). example: '' - id: '3.20' title: Disbursement records From 029ba2b75cbaa040818a7a27fb7f4e9d82d1bb32 Mon Sep 17 00:00:00 2001 From: Duncan Dewhurst Date: Wed, 15 Nov 2023 09:52:54 +1300 Subject: [PATCH 14/19] docs/cost/ids/sustainability.md: Remove empty examples --- docs/cost/ids/sustainability.md | 60 --------------------------------- manage.py | 4 +-- 2 files changed, 1 insertion(+), 63 deletions(-) diff --git a/docs/cost/ids/sustainability.md b/docs/cost/ids/sustainability.md index 8506ac65..8fbf9c16 100644 --- a/docs/cost/ids/sustainability.md +++ b/docs/cost/ids/sustainability.md @@ -142,9 +142,6 @@ Name the funding organization(s)/sources of funding for Preparation, Implementat OC4IDS mapping ^^^ -```json - -``` ```` ````` @@ -166,9 +163,6 @@ Specify the allocated budget for preparation, implementation, operation. If no a OC4IDS mapping ^^^ -```json - -``` ```` ````` @@ -254,9 +248,6 @@ In case of multiyear project implementation, disclose information on budget proj OC4IDS mapping ^^^ -```json - -``` ```` ````` @@ -942,9 +933,6 @@ Identify who approved the climate finance investment in the country (organizatio OC4IDS mapping ^^^ -```json - -``` ```` ````` @@ -1006,9 +994,6 @@ Select from a list of international commitments and clarify how the project is a OC4IDS mapping ^^^ See mapping for data point "Policy coherence" in Institutional extension adding `parisAgreement` to the `policyAlighment.policies` array. -```json - -``` ```` ````` @@ -1032,9 +1017,6 @@ Indirect\] OC4IDS mapping ^^^ -```json - -``` ```` ````` @@ -1181,9 +1163,6 @@ international OC4IDS mapping ^^^ -```json - -``` ```` ````` @@ -1205,9 +1184,6 @@ Disclose the amounts invested in project preparation \[value, currency\] OC4IDS mapping ^^^ -```json - -``` ```` ````` @@ -1229,9 +1205,6 @@ Disclose dates for project preparation \[start date, end date\] OC4IDS mapping ^^^ -```json - -``` ```` ````` @@ -1253,9 +1226,6 @@ Disclose dates for project approval \[submission date, approval date\] OC4IDS mapping ^^^ -```json - -``` ```` ````` @@ -1356,9 +1326,6 @@ Commitment fee (per annum) OC4IDS mapping ^^^ -```json - -``` ```` ````` @@ -1380,9 +1347,6 @@ Disclose the cost per tonne of CO2 equivalent \[value, currency\]. OC4IDS mapping ^^^ Publish the cost in `environment.abatementCost`. If supporting documentation is available, publish in documents with `.documentType` set to 'abatementCostMethodology'. -```json - -``` ```` ````` @@ -1441,9 +1405,6 @@ Disclose the occurrence of public meetings with communities and impacted groups OC4IDS mapping ^^^ See [public consultation meetings (social module)](social-public-consultation-meetings). -```json - -``` ```` ````` @@ -1563,9 +1524,6 @@ mixed OC4IDS mapping ^^^ -```json - -``` ```` ````` @@ -1654,9 +1612,6 @@ CoST IDS element OC4IDS mapping ^^^ -```json - -``` ```` ````` @@ -1846,9 +1801,6 @@ Identify the asset for disposal purpose \[free text\] OC4IDS mapping ^^^ -```json - -``` ```` ````` @@ -1870,9 +1822,6 @@ Intended start and end dates of decommissioning. OC4IDS mapping ^^^ -```json - -``` ```` ````` @@ -1894,9 +1843,6 @@ Disclose the technical plan for decommissioning (E.g.: \[Doc\]). OC4IDS mapping ^^^ See decommissioning plan data point in environment extension -```json - -``` ```` ````` @@ -2024,9 +1970,6 @@ Indicate the number of direct and indirect project beneficiaries (E.g. direct: \ OC4IDS mapping ^^^ -```json - -``` ```` ````` @@ -3123,9 +3066,6 @@ Free text to add not mentioned sub-sectors OC4IDS mapping ^^^ Project Level: Add equivalent code from ProjectSector codelist to sector array. -```json - -``` ```` ````` diff --git a/manage.py b/manage.py index fbbbf1b0..8517d58d 100755 --- a/manage.py +++ b/manage.py @@ -945,9 +945,7 @@ def update_sustainability_docs(): "\nOC4IDS mapping", "\n^^^\n", element.get("mapping", ""), - "\n```json\n", - element.get("example", ""), - "\n```", + f"\n```json\n{element.get('example', '')}\n```" if element.get('example', '') != '' else '', "\n````", "\n\n`````\n\n" ] From 8ddf00d049c5a25d956cfce1cae22a4bf9b1c8c0 Mon Sep 17 00:00:00 2001 From: odscjen <95221058+odscjen@users.noreply.github.com> Date: Thu, 16 Nov 2023 09:15:44 +0000 Subject: [PATCH 15/19] Apply suggestions from code review Co-authored-by: Duncan Dewhurst --- mapping/sustainability.yaml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/mapping/sustainability.yaml b/mapping/sustainability.yaml index 439d268d..833bb914 100644 --- a/mapping/sustainability.yaml +++ b/mapping/sustainability.yaml @@ -1209,7 +1209,7 @@ For each meeting: - 1. Publish the meeting invite. Add a document, set its `.documentType` to 'consultationMeetingInvitation' and its `.url` to the URL at which the meeting invite is available. + 1. Publish the meeting invite. [Add a project document](../common.md#add-a-project-document) and set its `.documentType` to 'consultationMeetingInvitation'. 2. Publish the meeting details. Add a `Meeting` object to the `.social.consultationMeetings` array and set: @@ -1218,7 +1218,7 @@ - `.address` to the address of the meeting - `.numberOfparticipants` to the number of people that participated in the meeting - 3. Publish the meeting minutes. Add a document, set its `.documentType` to 'minutes.consultationMeeting' and its `.url` to the URL at which the meeting minutes are available. + 3. Publish the meeting minutes. [Add a project document](../common.md#add-a-project-document), set its `.documentType` to 'minutes.consultationMeeting'. example: |- { "social": { @@ -1714,7 +1714,16 @@ For each meeting: - 1. Publish the meeting details. Add a `Meeting` object to the `.lobbyingMeetings` array and set: + 1. Publish the meeting details: + 1. Add a `Meeting` object to the `.lobbyingMeetings` array and set: + - `.id` incrementally + - `.date` to the date of the meeting + - `.address` to the address of the meeting + - `.numberOfParticipants` to the number of people present at the meeting + - `.publicOfficial.name` to the name of the public official present at the meeting + - `.publicOfficial.jobTitle` to the job title of the public official present at the meeting + 1. Get the `Organization` in `.parties` that represents the public official's organization. If none exists yet, [add an organization](../common.md#add-an-organization). + 1. Set the meeting's `.publicOfficial.organization` to the `.id` and `.name` of the organization. - `.id` incrementally - `.date` to the date of the meeting @@ -1724,7 +1733,7 @@ - `.publicOfficial.organization` to the `.name` and `.id` of the organization the public official represents. These should match the organization's entry in the `parties` array ` `.publicOfficial.jobTitle`to the job title of the person named in`.name\` - 2. Publish the meeting minutes. Add a document, set its `.documentType` to 'minutes.lobbyingMeeting' and its `.url` to the URL at which the meeting minutes are available. + 2. Publish the meeting minutes. [Add a project document](../common.md#add-a-project-document) and set its `.documentType` to 'minutes.lobbyingMeeting'. example: |- { "lobbyingMeetings": [ From a3b7f905d2485fc38429aad0e552b26f5f1683a1 Mon Sep 17 00:00:00 2001 From: Duncan Dewhurst Date: Wed, 22 Nov 2023 10:55:24 +1300 Subject: [PATCH 16/19] Update manage.py Co-authored-by: James McKinney <26463+jpmckinney@users.noreply.github.com> --- manage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manage.py b/manage.py index 8517d58d..4ebc8487 100755 --- a/manage.py +++ b/manage.py @@ -945,7 +945,7 @@ def update_sustainability_docs(): "\nOC4IDS mapping", "\n^^^\n", element.get("mapping", ""), - f"\n```json\n{element.get('example', '')}\n```" if element.get('example', '') != '' else '', + f"\n```json\n{element['example']}\n```" if element.get('example') else '', "\n````", "\n\n`````\n\n" ] From 1f84cefa0aa43bc8f1233733e3479cd004826eab Mon Sep 17 00:00:00 2001 From: odscjen <95221058+odscjen@users.noreply.github.com> Date: Thu, 23 Nov 2023 11:07:27 +0000 Subject: [PATCH 17/19] Apply suggestions from code review Co-authored-by: James McKinney <26463+jpmckinney@users.noreply.github.com> --- .../project-level/codelists/documentType.csv | 2 +- schema/project-level/project-schema.json | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/schema/project-level/codelists/documentType.csv b/schema/project-level/codelists/documentType.csv index 9409b0d5..c3b725c3 100644 --- a/schema/project-level/codelists/documentType.csv +++ b/schema/project-level/codelists/documentType.csv @@ -66,4 +66,4 @@ paymentCertificate,Payment certificate,A document certifying that the work speci escalationApproval,Escalation approval,Documentation of one or more approved escalations of the contract price during the project life-cycle.,OC4IDS minutes.lobbyingMeeting,Lobbying meeting minutes,"A record of the issues discussed, agreements reached and decisions taken at a lobbying meeting.",OC4IDS minutes.consultationMeeting,Consultation meeting minutes,"A record of the issues discussed, agreements reached and decisions taken at a public consultation meeting.",OC4IDS -consultationMeetingInvitation,Consultation meeting invitation,A document detailing the occurrence of a public consultation meeting relating to the project.,OC4IDS +consultationMeetingInvitation,Consultation meeting invitation,A notice about an upcoming public consultation meeting relating to the project.,OC4IDS diff --git a/schema/project-level/project-schema.json b/schema/project-level/project-schema.json index b681c1b7..1801072e 100644 --- a/schema/project-level/project-schema.json +++ b/schema/project-level/project-schema.json @@ -299,7 +299,7 @@ }, "lobbyingMeetings": { "title": "Lobbying meetings", - "description": "Information about lobbying meetings in relation to the project. That is, meetings with public officials that are made, managed or directed with the purpose of influencing public decision-making in relation to the project, whether for private, public or collective ends, whether for compensation or without. Public decision-making is the creation and amendment of legislation or any other regulatory measures; the development, modification and implementation of public policies, strategies and programmes; and the awarding of government contracts or grants, administrative decisions or any other public spending decisions.", + "description": "Information about lobbying meetings in relation to the project. That is, meetings with public officials that are made, managed or directed with the purpose of influencing public decision-making in relation to the project, whether for private, public or collective ends, whether for compensation or without. Public decision-making is the creation and amendment of legislation or any other regulatory measures; the development, modification and implementation of public policies, strategies and programs; and the awarding of government contracts or grants, administrative decisions or any other public spending decisions.", "type": "array", "items": { "$ref": "#/definitions/Meeting" @@ -309,7 +309,7 @@ }, "social": { "title": "Social", - "description": "Information about the social impact of the project and actions the project will take to mitigate potentially negative impacts on adjacent populations and project workers.", + "description": "Information about the social impacts of the project and the actions the project will take to mitigate potentially negative impacts on adjacent populations and project workers.", "$ref": "#/definitions/Social" }, "environment": { @@ -2354,12 +2354,12 @@ }, "Meeting": { "title": "Meeting", - "description": "The details of a meeting.", + "description": "Information about a meeting.", "type": "object", "properties": { "id": { "title": "ID", - "description": "A locally unique identifier for the meeting.", + "description": "The locally unique identifier for the meeting.", "type": [ "string" ] @@ -2378,11 +2378,11 @@ "$ref": "#/definitions/Address" }, "numberOfParticipants": { - "title": "Participant count", + "title": "Number of participants", "description": "The number of people in attendance at the meeting.", "type": "integer" }, - "publicOfficial": { + "publicOffice": { "title": "Public official", "description": "A position held by a person (or advisor to a person) with decision-making powers, who is elected, appointed or employed within the executive or legislative branches of power at national, sub-national, or supra-national levels; within private bodies performing public functions; and within public international organizations domiciled or operational in the country concerned.", "$ref": "#/definitions/PublicOfficial" @@ -2400,7 +2400,7 @@ "properties": { "person": { "title": "Person.", - "description": "The person.", + "description": "The person holding the public office.", "type": "object", "properties": { "name": { @@ -2412,12 +2412,12 @@ }, "organization": { "title": "Organization", - "description": "The organization in respect of which the person is a public official.", + "description": "The organization in which the public office exists.", "$ref": "#/definitions/OrganizationReference" }, "jobTitle": { "title": "Job title", - "description": "The job title of the person with respect to the organization.", + "description": "The job title of the person holding the public office.", "type": "string" } } From 6ecc6dfd276b2ef397bb471ef14209c9e90f8954 Mon Sep 17 00:00:00 2001 From: odscjen Date: Thu, 23 Nov 2023 11:24:34 +0000 Subject: [PATCH 18/19] apply rest of review suggestions and remove duplications in sustainability.yaml --- docs/_static/i18n.csv | 40 ++++++++++++------------ docs/cost/ids/sustainability.md | 31 +++++++++--------- docs/examples/blank.json | 4 +-- docs/examples/example.json | 14 +++++++-- docs/reference/schema.md | 34 +++++++++++++------- mapping/sustainability.yaml | 31 +++++++----------- schema/project-level/project-schema.json | 10 +++--- 7 files changed, 87 insertions(+), 77 deletions(-) diff --git a/docs/_static/i18n.csv b/docs/_static/i18n.csv index 6076f9c1..67ea8fe0 100644 --- a/docs/_static/i18n.csv +++ b/docs/_static/i18n.csv @@ -416,16 +416,16 @@ lobbyingMeetings/address/locality,Locality,True, lobbyingMeetings/address/region,Region,True, lobbyingMeetings/address/postalCode,Postal code,True, lobbyingMeetings/address/countryName,Country name,True, -lobbyingMeetings/numberOfParticipants,Participant count,False, -lobbyingMeetings/publicOfficial,Public official,False, -lobbyingMeetings/publicOfficial,Public official,False, -lobbyingMeetings/publicOfficial/person,Person.,False, -lobbyingMeetings/publicOfficial/person/name,Name,True, -lobbyingMeetings/publicOfficial/organization,Organization,False, -lobbyingMeetings/publicOfficial/organization,Organization reference,False, -lobbyingMeetings/publicOfficial/organization/name,Organization name,True, -lobbyingMeetings/publicOfficial/organization/id,Organization ID,True, -lobbyingMeetings/publicOfficial/jobTitle,Job title,True, +lobbyingMeetings/numberOfParticipants,Number of participants,False, +lobbyingMeetings/publicOffice,Public office,False, +lobbyingMeetings/publicOffice,Public office,False, +lobbyingMeetings/publicOffice/person,Person.,False, +lobbyingMeetings/publicOffice/person/name,Name,True, +lobbyingMeetings/publicOffice/organization,Organization,False, +lobbyingMeetings/publicOffice/organization,Organization reference,False, +lobbyingMeetings/publicOffice/organization/name,Organization name,True, +lobbyingMeetings/publicOffice/organization/id,Organization ID,True, +lobbyingMeetings/publicOffice/jobTitle,Job title,True, social,Social,False, social,Social,False, social/consultationMeetings,Public consultation meetings,False, @@ -439,15 +439,15 @@ social/consultationMeetings/address/locality,Locality,True, social/consultationMeetings/address/region,Region,True, social/consultationMeetings/address/postalCode,Postal code,True, social/consultationMeetings/address/countryName,Country name,True, -social/consultationMeetings/numberOfParticipants,Participant count,False, -social/consultationMeetings/publicOfficial,Public official,False, -social/consultationMeetings/publicOfficial,Public official,False, -social/consultationMeetings/publicOfficial/person,Person.,False, -social/consultationMeetings/publicOfficial/person/name,Name,True, -social/consultationMeetings/publicOfficial/organization,Organization,False, -social/consultationMeetings/publicOfficial/organization,Organization reference,False, -social/consultationMeetings/publicOfficial/organization/name,Organization name,True, -social/consultationMeetings/publicOfficial/organization/id,Organization ID,True, -social/consultationMeetings/publicOfficial/jobTitle,Job title,True, +social/consultationMeetings/numberOfParticipants,Number of participants,False, +social/consultationMeetings/publicOffice,Public office,False, +social/consultationMeetings/publicOffice,Public office,False, +social/consultationMeetings/publicOffice/person,Person.,False, +social/consultationMeetings/publicOffice/person/name,Name,True, +social/consultationMeetings/publicOffice/organization,Organization,False, +social/consultationMeetings/publicOffice/organization,Organization reference,False, +social/consultationMeetings/publicOffice/organization/name,Organization name,True, +social/consultationMeetings/publicOffice/organization/id,Organization ID,True, +social/consultationMeetings/publicOffice/jobTitle,Job title,True, environment,Environment,False, environment/goals,Environmental goals,False, diff --git a/docs/cost/ids/sustainability.md b/docs/cost/ids/sustainability.md index 23cb8f1b..25f4f13e 100644 --- a/docs/cost/ids/sustainability.md +++ b/docs/cost/ids/sustainability.md @@ -828,7 +828,7 @@ Eg: :columns: 8 OC4IDS mapping ^^^ -Project level: Add the relevant code from the environmentalGoal codelist to the `environment.goals` array +Project level: Add the relevant codes from the environmentalGoal codelist to the `environment.goals` array ```json { "environment": { @@ -946,7 +946,6 @@ Project level: [Add an organization](../common.md#add-an-organization) for the d ] } ``` - ```` ````` @@ -2092,7 +2091,7 @@ Project Level: For each meeting: -1. Publish the meeting invite. Add a document, set its `.documentType` to 'consultationMeetingInvitation' and its `.url` to the URL at which the meeting invite is available. +1. Publish the meeting invite. [Add a project document](../common.md#add-a-project-document) and set its `.documentType` to 'consultationMeetingInvitation'. 2. Publish the meeting details. Add a `Meeting` object to the `.social.consultationMeetings` array and set: @@ -2101,7 +2100,7 @@ For each meeting: - `.address` to the address of the meeting - `.numberOfparticipants` to the number of people that participated in the meeting -3. Publish the meeting minutes. Add a document, set its `.documentType` to 'minutes.consultationMeeting' and its `.url` to the URL at which the meeting minutes are available. +3. Publish the meeting minutes. [Add a project document](../common.md#add-a-project-document), set its `.documentType` to 'minutes.consultationMeeting'. ```json { "social": { @@ -2780,17 +2779,17 @@ Project Level: For each meeting: -1. Publish the meeting details. Add a `Meeting` object to the `.lobbyingMeetings` array and set: - -- `.id` incrementally -- `.date` to the date of the meeting -- `.address` to the address of the meeting -- `.numberOfParticipants` to the number of people present at the meeting -- `.publicOfficial.name` to the name of the person who was representing the organization at the meeting. -- `.publicOfficial.organization` to the `.name` and `.id` of the organization the public official represents. These should match the organization's entry in the `parties` array - ` `.publicOfficial.jobTitle`to the job title of the person named in`.name\` - -2. Publish the meeting minutes. Add a document, set its `.documentType` to 'minutes.lobbyingMeeting' and its `.url` to the URL at which the meeting minutes are available. +1. Publish the meeting details: +2. Add a `Meeting` object to the `.lobbyingMeetings` array and set: + \- `.id` incrementally + \- `.date` to the date of the meeting + \- `.address` to the address of the meeting + \- `.numberOfParticipants` to the number of people present at the meeting + \- `.publicOffice.name` to the name of the person representing the public office present at the meeting + \- `.publicOffice.jobTitle` to the job title of the person representing the public office present at the meeting +3. Get the `Organization` in `.parties` that represents the public office. If none exists yet, [add an organization](../common.md#add-an-organization). +4. Set the meeting's `.publicOffice.organization` to the `.id` and `.name` of the organization. +5. Publish the meeting minutes. [Add a project document](../common.md#add-a-project-document) and set its `.documentType` to 'minutes.lobbyingMeeting'. ```json { "lobbyingMeetings": [ @@ -2805,7 +2804,7 @@ For each meeting: "countryName": "United Kingdom" }, "numberOfParticipants": 4, - "publicOfficial": { + "publicOffice": { "person": { "name": "Brett Gliddon" }, diff --git a/docs/examples/blank.json b/docs/examples/blank.json index de4ab9d9..f53facb3 100644 --- a/docs/examples/blank.json +++ b/docs/examples/blank.json @@ -452,7 +452,7 @@ }, "date": "date-time", "numberOfParticipants": "integer", - "publicOfficial": { + "PublicOffice": { "person": { "name": "string" }, @@ -477,7 +477,7 @@ }, "date": "date-time", "numberOfParticipants": "integer", - "publicOfficial": { + "publicOffice": { "person": { "name": "string" }, diff --git a/docs/examples/example.json b/docs/examples/example.json index 0516b236..95c1db3e 100644 --- a/docs/examples/example.json +++ b/docs/examples/example.json @@ -995,7 +995,7 @@ "countryName": "United Kingdom" }, "numberOfParticipants": 4, - "publicOfficial": { + "publicOffice": { "person": { "name": "Brett Gliddon" }, @@ -1019,7 +1019,17 @@ "countryName": "United Kingdom" }, "date": "2024-01-15T00:00:00Z", - "numberOfParticipants": "25" + "numberOfParticipants": "25", + "publicOffice": { + "person": { + "name": "Brett Gliddon" + }, + "organization": { + "name": "Motorways UK", + "id": "GB-GOR-XX1234" + }, + "jobTitle": "Group General Manager Transport Services" + } } ] }, diff --git a/docs/reference/schema.md b/docs/reference/schema.md index 35716082..f1a49392 100644 --- a/docs/reference/schema.md +++ b/docs/reference/schema.md @@ -489,7 +489,7 @@ This sub-schema is referenced by the following properties: * [`BudgetBreakdown/sourceParty`](project-schema.json,/definitions/BudgetBreakdown,sourceParty) * [`Transaction/payer`](project-schema.json,/definitions/Transaction,payer) * [`Transaction/payee`](project-schema.json,/definitions/Transaction,payee) -* [`PublicOfficial/organization`](project-schema.json,/definitions/PublicOfficial,organization) +* [`PublicOffice/organization`](project-schema.json,/definitions/PublicOffice,organization) Each `OrganizationReference` has the following fields: @@ -558,8 +558,13 @@ Each `OrganizationReference` has the following fields: ``` ```{jsoninclude} ../../docs/examples/example.json -:jsonpointer: /projects/0/lobbyingMeetings/0/publicOfficial/organization -:title: lobbyingMeetings/0/publicOfficial/organization +:jsonpointer: /projects/0/lobbyingMeetings/0/publicOffice/organization +:title: lobbyingMeetings/0/publicOffice/organization +``` + +```{jsoninclude} ../../docs/examples/example.json +:jsonpointer: /projects/0/social/consultationMeetings/0/publicOffice/organization +:title: social/consultationMeetings/0/publicOffice/organization ``` ```` @@ -1116,7 +1121,7 @@ Each `Meeting` has the following fields: ```{jsonschema} ../../build/current_lang/project-schema.json :pointer: /definitions/Meeting -:collapse: id,date,address,numberOfParticipants,publicOfficial +:collapse: id,date,address,numberOfParticipants,publicOffice :addtargets: ``` @@ -1138,24 +1143,24 @@ Each `Meeting` has the following fields: ````` -### PublicOfficial +### PublicOffice -`PublicOfficial` is defined as: +`PublicOffice` is defined as: -```{field-description} ../../build/current_lang/project-schema.json /definitions/PublicOfficial +```{field-description} ../../build/current_lang/project-schema.json /definitions/PublicOffice ``` This sub-schema is referenced by the following properties: -* [`Meeting/publicOfficial`](project-schema.json,/definitions/Meeting,publicOfficial) +* [`Meeting/publicOffice`](project-schema.json,/definitions/Meeting,publicOffice) -Each `PublicOfficial` has the following fields: +Each `PublicOffice` has the following fields: `````{tab-set} ````{tab-item} Schema ```{jsonschema} ../../build/current_lang/project-schema.json -:pointer: /definitions/PublicOfficial +:pointer: /definitions/PublicOffice :collapse: organization,jobTitle :addtargets: ``` @@ -1165,8 +1170,13 @@ Each `PublicOfficial` has the following fields: ````{tab-item} Examples ```{jsoninclude} ../../docs/examples/example.json -:jsonpointer: /projects/0/lobbyingMeetings/0/publicOfficial -:title: lobbyingMeetings/0/publicOfficial +:jsonpointer: /projects/0/lobbyingMeetings/0/publicOffice +:title: lobbyingMeetings/0/publicOffice +``` + +```{jsoninclude} ../../docs/examples/example.json +:jsonpointer: /projects/0/social/consultationMeetings/0/publicOffice +:title: social/consultationMeetings/0/publicOffice ``` ```` diff --git a/mapping/sustainability.yaml b/mapping/sustainability.yaml index 57ddfa26..afd2f584 100644 --- a/mapping/sustainability.yaml +++ b/mapping/sustainability.yaml @@ -1726,25 +1726,16 @@ For each meeting: 1. Publish the meeting details: - 1. Add a `Meeting` object to the `.lobbyingMeetings` array and set: - - `.id` incrementally - - `.date` to the date of the meeting - - `.address` to the address of the meeting - - `.numberOfParticipants` to the number of people present at the meeting - - `.publicOfficial.name` to the name of the public official present at the meeting - - `.publicOfficial.jobTitle` to the job title of the public official present at the meeting - 1. Get the `Organization` in `.parties` that represents the public official's organization. If none exists yet, [add an organization](../common.md#add-an-organization). - 1. Set the meeting's `.publicOfficial.organization` to the `.id` and `.name` of the organization. - - - `.id` incrementally - - `.date` to the date of the meeting - - `.address` to the address of the meeting - - `.numberOfParticipants` to the number of people present at the meeting - - `.publicOfficial.name` to the name of the person who was representing the organization at the meeting. - - `.publicOfficial.organization` to the `.name` and `.id` of the organization the public official represents. These should match the organization's entry in the `parties` array - ` `.publicOfficial.jobTitle`to the job title of the person named in`.name\` - - 2. Publish the meeting minutes. [Add a project document](../common.md#add-a-project-document) and set its `.documentType` to 'minutes.lobbyingMeeting'. + 2. Add a `Meeting` object to the `.lobbyingMeetings` array and set: + \- `.id` incrementally + \- `.date` to the date of the meeting + \- `.address` to the address of the meeting + \- `.numberOfParticipants` to the number of people present at the meeting + \- `.publicOffice.name` to the name of the person representing the public office present at the meeting + \- `.publicOffice.jobTitle` to the job title of the person representing the public office present at the meeting + 3. Get the `Organization` in `.parties` that represents the public office. If none exists yet, [add an organization](../common.md#add-an-organization). + 4. Set the meeting's `.publicOffice.organization` to the `.id` and `.name` of the organization. + 5. Publish the meeting minutes. [Add a project document](../common.md#add-a-project-document) and set its `.documentType` to 'minutes.lobbyingMeeting'. example: |- { "lobbyingMeetings": [ @@ -1759,7 +1750,7 @@ "countryName": "United Kingdom" }, "numberOfParticipants": 4, - "publicOfficial": { + "publicOffice": { "person": { "name": "Brett Gliddon" }, diff --git a/schema/project-level/project-schema.json b/schema/project-level/project-schema.json index 1801072e..6c0a5de2 100644 --- a/schema/project-level/project-schema.json +++ b/schema/project-level/project-schema.json @@ -2383,9 +2383,9 @@ "type": "integer" }, "publicOffice": { - "title": "Public official", + "title": "Public office", "description": "A position held by a person (or advisor to a person) with decision-making powers, who is elected, appointed or employed within the executive or legislative branches of power at national, sub-national, or supra-national levels; within private bodies performing public functions; and within public international organizations domiciled or operational in the country concerned.", - "$ref": "#/definitions/PublicOfficial" + "$ref": "#/definitions/PublicOffice" } }, "required": [ @@ -2393,8 +2393,8 @@ ], "minProperties": 1 }, - "PublicOfficial": { - "title": "Public official", + "PublicOffice": { + "title": "Public office", "description": "A position held by a person (or advisor to a person) with decision-making powers, who is elected, appointed or employed within the executive or legislative branches of power at national, sub-national, or supra-national levels; within private bodies performing public functions; and within public international organizations domiciled or operational in the country concerned.", "type": "object", "properties": { @@ -2424,7 +2424,7 @@ }, "Social": { "title": "Social", - "description": "Information about the social impact of the project and actions the project will take to mitigate potentially negative impacts on adjacent populations and project workers.", + "description": "Information about the social impacts of the project and the actions the project will take to mitigate potentially negative impacts on adjacent populations and project workers.", "type": "object", "properties": { "consultationMeetings": { From c6a70b997c9668689797da3aac7c3c2b5542d4dd Mon Sep 17 00:00:00 2001 From: Duncan Dewhurst Date: Fri, 24 Nov 2023 13:30:38 +1300 Subject: [PATCH 19/19] Apply suggestions from code review Co-authored-by: James McKinney <26463+jpmckinney@users.noreply.github.com> --- docs/examples/blank.json | 2 +- manage.py | 2 +- schema/project-level/project-schema.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/examples/blank.json b/docs/examples/blank.json index ac8c1861..0c9a236c 100644 --- a/docs/examples/blank.json +++ b/docs/examples/blank.json @@ -488,7 +488,7 @@ }, "date": "date-time", "numberOfParticipants": "integer", - "PublicOffice": { + "publicOffice": { "person": { "name": "string" }, diff --git a/manage.py b/manage.py index 4ebc8487..7c4528b3 100755 --- a/manage.py +++ b/manage.py @@ -340,7 +340,7 @@ def update_sub_schema_reference(schema): 'parties/0/beneficialOwners/0', 'parties/0/people/0/address', 'parties/0/people/0/identifier', - 'social/consultationMeetings/0/publicOfficial'] + 'social/consultationMeetings/0/publicOffice'] # Add examples definition["references"] = get_definition_references(schema, defn) diff --git a/schema/project-level/project-schema.json b/schema/project-level/project-schema.json index 972202a3..95b17829 100644 --- a/schema/project-level/project-schema.json +++ b/schema/project-level/project-schema.json @@ -2433,7 +2433,7 @@ "type": "object", "properties": { "person": { - "title": "Person.", + "title": "Person", "description": "The person holding the public office.", "type": "object", "properties": {