Skip to content

Commit

Permalink
Merge branch '1.2-dev' into 1343-unit-description
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Jun 28, 2024
2 parents a03a772 + 9be1ae0 commit 3ca114e
Show file tree
Hide file tree
Showing 12 changed files with 11,414 additions and 4,421 deletions.
41 changes: 41 additions & 0 deletions docs/examples/release_schema_reference/release_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,47 @@
"projectID": "SP001",
"uri": "https://openspending.org/uk-barnet-budget/entries/6801ad388f3a38b7740dde20108c58b35984ee91"
},
"project": {
"id": "oc4ids-bu3kcz-0000",
"title": "Central Junction Cycle Lane Construction",
"description": "Design, construction and supervision of a new cycle lane for the Central Junction.",
"totalValue": {
"amount": 1100000,
"currency": "GBP"
},
"uri": "http://example.com/projects/oc4ids-bu3kcz-0000.json",
"sector": {
"id": "transport.road",
"description": "Road transport, including roads, highways, streets, tunnels and bridges.",
"scheme": "oc4idsProjectSector"
},
"additionalClassifications": [
{
"id": "03.04.05",
"description": "Cycle lanes for road transport.",
"scheme": "GB-EXAMPLE"
}
],
"locations": [
{
"description": "Barnet, London, UK",
"geometry": {
"type": "Point",
"coordinates": [
51.605,
0.2076
]
},
"gazetteer": {
"scheme": "GEONAMES",
"identifier": [
"2656295"
]
},
"uri": "https://www.geonames.org/2656295/barnet.html"
}
]
},
"documents": [
{
"datePublished": "2009-01-05T00:00:00Z",
Expand Down
2 changes: 1 addition & 1 deletion docs/guidance/map/linked_standards.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The [Open Contracting for Infrastructure Data Standards](https://standard.open-c

A joint effort by the [Infrastructure Transparency Initiative](https://infrastructuretransparency.org) (CoST) and the Open Contracting Partnership, it builds on best practice in open data and openness of public infrastructure procurement globally.

The [Project](https://extensions.open-contracting.org/en/extensions/project/master/) extension describes how to connect OCDS and OC4IDS datasets.
OC4IDS datasets ought to be linked from OCDS datasets using the `planning.project` object, by referencing the OC4IDS project identifier in the `planning.project.id` field.

## Open Fiscal Data Package

Expand Down
6 changes: 3 additions & 3 deletions docs/guidance/map/translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ You can publish the values of these fields in any language:
- `description`, in any location
- `finalStatusDetails`, in any location
- `legalName`, in any location
- `locality`, in any location
- `name`, in any location
- `rationale`, in any location
- `region`, in any location
- `streetAddress`, in any location
- `title`, in any location
- `parties/address/locality`
- `parties/address/region`
- `parties/address/streetAddress`
- `planning/budget/project`
- `tender/awardCriteriaDetails`
- `tender/procurementMethodDetails`
Expand Down
12 changes: 10 additions & 2 deletions docs/history/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ Per the [normative and non-normative content and changes policy](../governance/n

* Add new codelists:
* [#1372](https://github.com/open-contracting/standard/pull/1372) `country`
* [#1684](https://github.com/open-contracting/standard/pull/1684) `geometryType`
* [#1316](https://github.com/open-contracting/standard/pull/1316) `language`
* [#1326](https://github.com/open-contracting/standard/pull/1326) `linkRelationType`
* [#1684](https://github.com/open-contracting/standard/pull/1684) `locationGazetteer`
* [#1308](https://github.com/open-contracting/standard/pull/1308) `mediaType`
* [#1459](https://github.com/open-contracting/standard/pull/1459) `partyScale`
* [#1654](https://github.com/open-contracting/standard/pull/1654) `permission`
Expand All @@ -87,14 +89,16 @@ Per the [normative and non-normative content and changes policy](../governance/n
* [#1210](https://github.com/open-contracting/standard/pull/1210) Add codes from the legal basis extension:
* 'CELEX'
* 'LEXML'
* [#1218](https://github.com/open-contracting/standard/pull/1218) [#1679](https://github.com/open-contracting/standard/pull/1679) Add codes from the organization classification extension:
* [#1218](https://github.com/open-contracting/standard/pull/1218) [#1679](https://github.com/open-contracting/standard/pull/1679) [#1692](https://github.com/open-contracting/standard/pull/1692) Add codes from the organization classification extension:
* 'COFOG'
* 'TED_CA_TYPE'
* 'TED_CE_ACTIVITY'
* 'eu-buyer-contracting-type'
* 'eu-main-activity'
* 'eu-buyer-legal-type'
* [#1452](https://github.com/open-contracting/standard/pull/1452) Add 'proClass'.
* [#1637](https://github.com/open-contracting/standard/pull/1637) Add 'sdg' and 'sdgTarget'.
* [#1684](https://github.com/open-contracting/standard/pull/1684) Add 'oc4idsProjectSector' from project extension.

* `documentType.csv`:
* Add codes:
Expand Down Expand Up @@ -185,9 +189,10 @@ Per the [normative and non-normative content and changes policy](../governance/n

* Clarify core concepts:
* [#1216](https://github.com/open-contracting/standard/pull/1216) Define contracting process and planning process in the schema description. Update definition of release, record and ocid. Update references to contracting process so that it takes take the planning process into account.
* [#1513](https://github.com/open-contracting/standard/pull/1513) Update fields' use of "contracting process" and "contracting (or planning) process" to reflect the new definition. Align `planning.budget.project` and `planning.budget.projectID`.
* [#1513](https://github.com/open-contracting/standard/pull/1513) Update fields' use of "contracting process" and "contracting (or planning) process" to reflect the new definition.
* [#1443](https://github.com/open-contracting/standard/pull/1443) `date`
* [#1182](https://github.com/open-contracting/standard/pull/1182) `buyer`
* [#1684](https://github.com/open-contracting/standard/pull/1684) `planning.budget.project` and `planning.budget.projectID`
* [#1163](https://github.com/open-contracting/standard/pull/1163) `tender.procuringEntity`
* [#1395](https://github.com/open-contracting/standard/pull/1417) `tender.procurementMethod`
* [#1442](https://github.com/open-contracting/standard/pull/1442) `tender.submissionMethodDetails`
Expand All @@ -201,7 +206,9 @@ Per the [normative and non-normative content and changes policy](../governance/n
* [#1459](https://github.com/open-contracting/standard/pull/1459) `parties.details.scale`
* [#1335](https://github.com/open-contracting/standard/pull/1335) `planning.id`
* [#1642](https://github.com/open-contracting/standard/pull/1642) `planning.finalStatus`, `planning.finalStatusDetails` and `planning.finalStatusDate`
* [#1684](https://github.com/open-contracting/standard/pull/1684) `planning.project`
* [#1324](https://github.com/open-contracting/standard/pull/1324) `tender.datePublished`
* [#1684](https://github.com/open-contracting/standard/pull/1684) `tender.deliveryLocations` and `tender.deliveryAddresses`
* [#1296](https://github.com/open-contracting/standard/pull/1296) [#1674](https://github.com/open-contracting/standard/pull/1674) `tender.exclusionGrounds`
* [#1669](https://github.com/open-contracting/standard/pull/1669) `tender.expressionOfInterestDeadline`
* [#1490](https://github.com/open-contracting/standard/pull/1490) `tender.identifiers`
Expand All @@ -222,6 +229,7 @@ Per the [normative and non-normative content and changes policy](../governance/n
* [#1372](https://github.com/open-contracting/standard/pull/1372) `Address.country`
* [#1380](https://github.com/open-contracting/standard/pull/1380) [#1440](https://github.com/open-contracting/standard/pull/1440) `Document.languages`
* [#1439](https://github.com/open-contracting/standard/pull/1439) `Document.relatedItems`
* [#1684](https://github.com/open-contracting/standard/pull/1684) `Item.deliveryLocations` and `Item.deliveryAddresses`
* [#1689](https://github.com/open-contracting/standard/pull/1689) `Item.immediateContainer`
* [#1455](https://github.com/open-contracting/standard/pull/1455) `Milestone.dueAfterDate`
* [#1434](https://github.com/open-contracting/standard/pull/1434) `Milestone.value`
Expand Down
35 changes: 33 additions & 2 deletions docs/schema/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ The planning section is used in a planning process. This includes information ab

```{jsonschema} ../../build/current_lang/release-schema.json
:pointer: /definitions/Planning
:collapse: budget,documents,milestones
:collapse: budget,project,documents,milestones
```

```{extensionlist} The following extensions are available for planning
Expand Down Expand Up @@ -168,6 +168,26 @@ Apart from documents, the majority of planning information is held within the bu
:list: budget
```

#### Project

````{admonition} Example
:class: hint
```{jsoninclude} ../examples/release_schema_reference/release_package.json
:jsonpointer: /releases/0/planning/project
:title: project
```
````

```{jsonschema} ../../build/current_lang/release-schema.json
:pointer: /definitions/Project
:collapse: totalValue,additionalClassifications,locations
```

```{extensionlist} The following extensions are available for project
:list:
```

### Tender

The tender section includes details of the announcement that an organization intends to source some particular goods, services or works and to establish one or more contract(s) for these.
Expand Down Expand Up @@ -681,7 +701,18 @@ As well as providing this machine-readable link between processes, publishers ma

### Location

The [Location](https://extensions.open-contracting.org/en/extensions/location/v1.1.4/) extension can be used to provide location information.
````{admonition} Example
:class: hint
```{jsoninclude} ../examples/release_schema_reference/release_package.json
:jsonpointer: /releases/0/planning/project/locations/0
:title: location
```
````

```{jsonschema} ../../build/current_lang/release-schema.json
:pointer: /definitions/Location
```

### Link

Expand Down
12 changes: 8 additions & 4 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ def pre_commit():
"""
nonmultilingual = {
# Identifiers.
'amendsReleaseID', 'id', 'identifier', 'ocid', 'relatedItems', 'releaseID',
'amendsReleaseID', 'id', 'identifier', 'identifiers', 'ocid', 'relatedItems', 'releaseID',
# Missing format properties. https://github.com/open-contracting/standard/issues/881
'email',
# Published-defined formats.
Expand All @@ -536,14 +536,16 @@ def pre_commit():
jsonref_release_schema = json_load('release-schema.json', jsonref, merge_props=True)

counts = defaultdict(list)
nonstring = ('boolean', 'integer', 'number', 'object')
for field in get_schema_fields(jsonref_release_schema):
name = field.path_components[-1]
# Skip definitions (output dereferenced properties only). Skip deprecated fields.
if field.definition_pointer_components or field.deprecated:
continue
multilingual = (
# If a field can be a non-string, it is not multilingual.
not any(t in field.schema['type'] for t in ('boolean', 'integer', 'number', 'object'))
not any(t in field.schema['type'] for t in nonstring)
and ('array' not in field.schema['type'] or not any(t in field.schema['items']['type'] for t in nonstring))
# If a field's value is constrained to a codelist or format, it is not multilingual.
and not any(prop in field.schema for prop in ('codelist', 'format'))
# If an array can contain non-strings, it is not multilingual.
Expand All @@ -553,14 +555,16 @@ def pre_commit():
)
field.sep = '/'
if name in counts and bool(counts[name]) ^ multilingual:
if multilingual:
if not multilingual and field.schema['type'] == 'object':
click.secho(f'{field.path} is an object. {" & ".join(counts[name])} is/are multilingual.', fg='yellow')
elif multilingual:
raise Exception(f'{name} is multilingual at {field.path}, but not elsewhere')
else:
raise Exception(f'{name} is multilingual at {" & ".join(counts[name])}, but not at {field.path}')
if multilingual:
counts[name].append(field.path)
else:
counts[name] = []
counts[name] = counts[name]

bulletlist = [
'% STARTLIST',
Expand Down
4 changes: 3 additions & 1 deletion schema/codelists/classificationScheme.csv
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ sdg,Sustainable Development Goals,"The Sustainable Development Goals are a colle
sdgTarget,Sustainable Development Goal Targets,The Sustainable Development Goal Targets are specific targets for each Sustainable Development Goal.,https://unstats.un.org/sdgs/indicators/indicators-list/,tender
TED_CA_TYPE,EU Type of contracting authority (TED schema),The types of contracting authority within the domain of public procurement according to the legislation of the European Parliament. This scheme's codes match those in TED schema.,https://simap.ted.europa.eu/documents/10184/99173/EN_F01.pdf,organization
TED_CE_ACTIVITY,EU Main activity of contracting entity (TED schema),The main activity of the contracting entity within the domain of public procurement according to the legislation of the European Parliament. This scheme's codes match those in TED schema.,https://simap.ted.europa.eu/documents/10184/99173/EN_F04.pdf,organization
eu-buyer-contracting-type,EU Buyer contracting entity type,Whether or not the buyer is a contracting entity within the domain of public procurement according to the legislation of the European Parliament.,https://docs.ted.europa.eu/eforms/latest/reference/code-lists/buyer-contracting-type.html,organization
eu-buyer-contracting-type,EU Buyer contracting entity type (eForms),Whether or not the buyer is a contracting entity within the domain of public procurement according to the legislation of the European Parliament.,https://docs.ted.europa.eu/eforms/latest/reference/code-lists/buyer-contracting-type.html,organization
eu-main-activity,EU Main activity authority list (eForms),The main activity of the contracting entity within the domain of public procurement according to the legislation of the European Parliament. This scheme's codes match those in eForms.,https://op.europa.eu/en/web/eu-vocabularies/concept-scheme/-/resource?uri=http://publications.europa.eu/resource/authority/main-activity,organization
eu-buyer-legal-type,EU Buyer legal type (eForms),The type of the procuring authority within the domain of public procurement according to the legislation of the European Parliament. This scheme's codes match those in eForms.,https://op.europa.eu/en/web/eu-vocabularies/concept-scheme/-/resource?uri=http://publications.europa.eu/resource/authority/buyer-legal-type,organization
oc4idsProjectSector,OC4IDS Project Sector,Open Contracting for Infrastructure Data Standards Toolkit projectSector codelist,https://standard.open-contracting.org/infrastructure/latest/en/reference/codelists/#projectsector,project
7 changes: 7 additions & 0 deletions schema/codelists/geometryType.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Code,Title,Description,Source
Point,Point,The `coordinates` field is a single position.,https://tools.ietf.org/html/rfc7946#section-3.1
MultiPoint,MultiPoint,The `coordinates` field is an array of positions.,https://tools.ietf.org/html/rfc7946#section-3.1
LineString,LineString,The `coordinates` field is an array of two or more positions.,https://tools.ietf.org/html/rfc7946#section-3.1
MultiLineString,MultiLineString,The `coordinates` field is an array of LineString coordinate arrays.,https://tools.ietf.org/html/rfc7946#section-3.1
Polygon,Polygon,The `coordinates` field is an array of linear ring coordinate arrays.,https://tools.ietf.org/html/rfc7946#section-3.1
MultiPolygon,MultiPolygon,The `coordinates` field is an array of Polygon coordinate arrays.,https://tools.ietf.org/html/rfc7946#section-3.1
7 changes: 7 additions & 0 deletions schema/codelists/locationGazetteer.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Category,Code,Title,Description,Source,URI Pattern
Sub-National,NUTS,EU Nomenclature of Territorial Units for Statistics,The Nomenclature of Territorial Units for Statistics (NUTS) was established by Eurostat in order to provide a single uniform breakdown of territorial units for the production of regional statistics for the European Union.,https://ec.europa.eu/eurostat/web/nuts/linked-open-data,http://data.europa.eu/nuts/code/
National,ISO2,ISO 3166-1 alpha-2,ISO 3166-1 alpha-2 assigns two-letter codes to countries.,https://www.iso.org/iso-3166-country-codes.html,
Universal,GEONAMES,GeoNames,GeoNames assigns numerical identifiers to geographical names.,https://www.geonames.org/,https://www.geonames.org/
Universal,OSMN,OpenStreetMap node,An OpenStreetMap node defines a point in space.,,https://www.openstreetmap.org/node/
Universal,OSMW,OpenStreetMap way,"An OpenStreetMap way defines linear features and area boundaries, as an ordered list of nodes.",https://wiki.openstreetmap.org/wiki/Way,https://www.openstreetmap.org/way/
Universal,OSMR,OpenStreetMap relation,"An OpenStreetMap relation combines nodes, ways, and/or other relations.",https://wiki.openstreetmap.org/wiki/Relation,https://www.openstreetmap.org/relation/
Loading

0 comments on commit 3ca114e

Please sign in to comment.