Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

docs/schema/identifiers.md: Explain who can register an OCID prefix #1708

Merged
merged 4 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,27 @@ jobs:
build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
env:
PAT: ${{ secrets.PAT }}
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PAT || github.token }}
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: pip
cache-dependency-path: '**/requirements*.txt'
- id: changed-files
uses: tj-actions/changed-files@v45
- uses: pre-commit/[email protected]
continue-on-error: true
with:
extra_args: pip-compile --files ${{ steps.changed-files.outputs.all_changed_files }}
- if: ${{ env.PAT }}
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: '[github-actions] pre-commit autoupdate'
- shell: bash
run: curl -s -S --retry 3 $BASEDIR/tests/install.sh | bash -
- shell: bash
Expand Down
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ci:
autoupdate_schedule: quarterly
skip: [pip-compile]
default_language_version:
python: python3.10
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.4.18
hooks:
- id: pip-compile
name: pip-compile common-requirements.in
args: [common-requirements.in, -o, common-requirements.txt]
files: ^common-requirements\.(in|txt)$
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10
3 changes: 1 addition & 2 deletions common-requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ linkify-it-py
myst-parser
ocds-babel
Sphinx
-e git+https://github.com/open-contracting/standard_theme.git@open_contracting#egg=standard_theme
git+https://github.com/open-contracting/standard_theme.git@open_contracting#egg=standard_theme

# Profile
ocdsextensionregistry
Expand All @@ -19,5 +19,4 @@ selenium

# Development
click
pip-tools
sphinx-autobuild
87 changes: 40 additions & 47 deletions common-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile common-requirements.in
#
-e git+https://github.com/open-contracting/standard_theme.git@open_contracting#egg=standard_theme
# via -r common-requirements.in
# This file was autogenerated by uv via the following command:
# uv pip compile common-requirements.in -o common-requirements.txt
alabaster==0.7.12
# via sphinx
anyio==4.4.0
# via
# starlette
# watchfiles
async-generator==1.10
# via
# trio
Expand All @@ -23,11 +21,9 @@ babel==2.9.1
# via
# sphinx
# sphinx-intl
build==0.10.0
# via pip-tools
cattrs==23.1.2
# via requests-cache
certifi==2023.7.22
certifi==2024.7.4
# via
# elastic-transport
# requests
Expand All @@ -38,26 +34,30 @@ click==8.1.3
# via
# -r common-requirements.in
# ocdsindex
# pip-tools
# sphinx-intl
colorama==0.4.4
# uvicorn
colorama==0.4.6
# via sphinx-autobuild
docutils==0.18
# via
# myst-parser
# sphinx
elastic-transport==8.4.0
# via elasticsearch
elasticsearch[requests]==8.6.2
elasticsearch==8.6.2
# via ocdsindex
exceptiongroup==1.0.0
exceptiongroup==1.2.2
# via
# anyio
# cattrs
# pytest
h11==0.13.0
# via wsproto
# via
# uvicorn
# wsproto
idna==3.7
# via
# anyio
# requests
# trio
imagesize==1.4.1
Expand All @@ -74,8 +74,6 @@ jsonref==1.0.0.post1
# via ocdsextensionregistry
linkify-it-py==1.0.1
# via -r common-requirements.in
livereload==2.6.3
# via sphinx-autobuild
lxml==4.9.1
# via ocdsindex
markdown-it-py==2.2.0
Expand All @@ -90,31 +88,24 @@ mdurl==0.1.2
# via markdown-it-py
myst-parser==0.18.1
# via -r common-requirements.in
ocds-babel==0.3.1
ocds-babel==0.3.6
# via -r common-requirements.in
ocdsextensionregistry==0.3.8
ocdsextensionregistry==0.5.0
# via -r common-requirements.in
ocdsindex==0.2.0
# via -r common-requirements.in
outcome==1.1.0
# via trio
packaging==21.3
packaging==24.1
# via
# build
# pytest
# sphinx
pip-tools==7.3.0
# via -r common-requirements.in
platformdirs==3.9.1
# via requests-cache
pluggy==0.13.1
# via pytest
pygments==2.15.1
# via sphinx
pyparsing==2.4.7
# via packaging
pyproject-hooks==1.0.0
# via build
pysocks==1.7.1
# via urllib3
pytest==7.2.0
Expand All @@ -133,12 +124,14 @@ requests-cache==1.1.0
# via ocdsextensionregistry
selenium==4.11.2
# via -r common-requirements.in
setuptools==75.2.0
# via sphinx-intl
six==1.16.0
# via
# livereload
# url-normalize
# via url-normalize
sniffio==1.2.0
# via trio
# via
# anyio
# trio
snowballstemmer==2.1.0
# via sphinx
sortedcontainers==2.4.0
Expand All @@ -149,7 +142,7 @@ sphinx==5.3.0
# myst-parser
# sphinx-autobuild
# sphinx-intl
sphinx-autobuild==2021.3.14
sphinx-autobuild==2024.9.3
# via -r common-requirements.in
sphinx-intl==2.2.0
# via -r common-requirements.in
Expand All @@ -165,14 +158,12 @@ sphinxcontrib-qthelp==1.0.3
# via sphinx
sphinxcontrib-serializinghtml==1.1.5
# via sphinx
standard-theme @ git+https://github.com/open-contracting/standard_theme.git@07ca0e39979a244656dd6df0658f2ead428184b9#egg=standard_theme
# via -r common-requirements.in
starlette==0.40.0
# via sphinx-autobuild
tomli==2.0.1
# via
# build
# pip-tools
# pyproject-hooks
# pytest
tornado==6.4.1
# via livereload
# via pytest
trio==0.20.0
# via
# selenium
Expand All @@ -181,23 +172,25 @@ trio-websocket==0.9.2
# via selenium
typing-extensions==4.4.0
# via
# anyio
# cattrs
# myst-parser
# uvicorn
uc-micro-py==1.0.1
# via linkify-it-py
url-normalize==1.4.3
# via requests-cache
urllib3[socks]==1.26.18
urllib3==1.26.19
# via
# elastic-transport
# requests
# requests-cache
# selenium
wheel==0.38.4
# via pip-tools
uvicorn==0.30.6
# via sphinx-autobuild
watchfiles==0.24.0
# via sphinx-autobuild
websockets==13.0.1
# via sphinx-autobuild
wsproto==1.1.0
# via trio-websocket

# The following packages are considered to be unsafe in a requirements file:
# pip
# setuptools
5 changes: 1 addition & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))

import csv
import json
import os
Expand Down
2 changes: 1 addition & 1 deletion docs/history/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ Per the [normative and non-normative content and changes policy](../governance/n
* Identifiers
* [#1094](https://github.com/open-contracting/standard/pull/1094) Add guidance on populating `parties.id` for parties without an organization identifier.
* [#1643](https://github.com/open-contracting/standard/pull/1643) Update identifier section in release reference.
* [#1655](https://github.com/open-contracting/standard/pull/1655) Rewrite identifiers reference and examples for clarity.
* [#1655](https://github.com/open-contracting/standard/pull/1655), [#1708](https://github.com/open-contracting/standard/pull/1708) Rewrite identifiers reference and examples for clarity.
* Documents
* [#1189](https://github.com/open-contracting/standard/pull/1189) Add recommendations about publishing and referencing documents in the document reference section.
* [#1664](https://github.com/open-contracting/standard/pull/1664) Recommend linking to alternative representations using `documents`.
Expand Down
8 changes: 8 additions & 0 deletions docs/schema/identifiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ The only purpose of the OCID prefix is to turn *locally* unique identifiers into

To ensure that your `ocid`s do not conflict with those of another publisher, you must [register an OCID prefix](../guidance/build.md#register-an-ocid-prefix).

```{admonition} Who can register an OCID prefix?
:class: hint
In principle, anyone can register an OCID prefix. In practice, it is primarily governments and public institutions, as well as businesses and civil society organizations.
There can be multiple government publishers in a jurisdiction. For example, if the national government centralizes data about contracting processes, then it might be the only government to publish in that jurisdiction, using a single OCID prefix. On the other hand, if subnational governments have the authority to procure, control procurement systems, and/or collect procurement data, then they might also publish, using their own OCID prefixes.
```

Only the publisher that registered an OCID prefix is authorized to assign new `ocid`s with that OCID prefix, or to delegate this responsibility.

```{note}
Expand Down
Loading