diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 12301490..5e4251f2 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,3 +4,5 @@ updates: directory: "/" schedule: interval: "daily" + cooldown: + default-days: 7 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 149dafa1..eed44d62 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,10 @@ name: CI on: [push, pull_request] jobs: - build: + ci: uses: open-contracting/.github/.github/workflows/ci-profile.yml@main + permissions: + contents: read secrets: private-key: ${{ secrets.PRIVATE_KEY }} elasticsearch-password: ${{ secrets.ELASTICSEARCH_PASSWORD }} diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml index 565d0330..ab79551b 100644 --- a/.github/workflows/js.yml +++ b/.github/workflows/js.yml @@ -1,7 +1,7 @@ name: Lint JavaScript on: [push, pull_request] jobs: - lint: + js: uses: open-contracting/.github/.github/workflows/js.yml@main - with: - filenames: docs/_static/json-example-format.js + permissions: + contents: read diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 600ad9d5..e37180e8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,8 +4,6 @@ jobs: lint: uses: open-contracting/.github/.github/workflows/lint.yml@main permissions: - contents: write - secrets: - personal-access-token: ${{ secrets.PAT }} + contents: read with: - python-version: '3.10' + ocds-disallow-null: true diff --git a/.github/workflows/shell.yml b/.github/workflows/shell.yml index dfdb0acf..db657bed 100644 --- a/.github/workflows/shell.yml +++ b/.github/workflows/shell.yml @@ -1,5 +1,7 @@ name: Lint Shell on: [push, pull_request] jobs: - lint: + shell: uses: open-contracting/.github/.github/workflows/shell.yml@main + permissions: + contents: read diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index ebac9567..7e98c567 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -1,8 +1,10 @@ name: Spell-check on: [push, pull_request] jobs: - lint: + spellcheck: uses: open-contracting/.github/.github/workflows/spellcheck.yml@main + permissions: + contents: read with: ignore: fo,tne,zar skip: docson,locale,country.csv,currency.csv diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6286a031..fa2a642f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,18 +1,20 @@ 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.8.6 + rev: v0.15.20 hooks: - - id: ruff + - id: ruff-check - id: ruff-format - repo: https://github.com/astral-sh/uv-pre-commit - rev: 0.5.14 + rev: 0.11.26 hooks: - id: pip-compile name: pip-compile common-requirements.in args: [common-requirements.in, -o, common-requirements.txt] files: ^common-requirements\.(in|txt)$ + - repo: https://github.com/biomejs/pre-commit + rev: v2.5.2 + hooks: + - id: biome-check diff --git a/.python-version b/.python-version index c8cfe395..e4fba218 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.10 +3.12 diff --git a/.tx/config b/.tx/config deleted file mode 100644 index 541ddbca..00000000 --- a/.tx/config +++ /dev/null @@ -1,282 +0,0 @@ -[main] -host = https://www.transifex.com - -[o:open-contracting-partnership-1:p:oc4ids-09:r:404] -file_filter = docs/locale//LC_MESSAGES/404.po -source_file = build/locale/404.pot -type = PO -minimum_perc = 0 -resource_name = 404 -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:about] -file_filter = docs/locale//LC_MESSAGES/about.po -source_file = build/locale/about.pot -type = PO -minimum_perc = 0 -resource_name = about -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:cost--common] -file_filter = docs/locale//LC_MESSAGES/cost/common.po -source_file = build/locale/cost/common.pot -type = PO -minimum_perc = 0 -resource_name = cost--common -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:cost--ids--core] -file_filter = docs/locale//LC_MESSAGES/cost/ids/core.po -source_file = build/locale/cost/ids/core.pot -type = PO -minimum_perc = 0 -resource_name = cost--ids--core -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:cost--ids--index] -file_filter = docs/locale//LC_MESSAGES/cost/ids/index.po -source_file = build/locale/cost/ids/index.pot -type = PO -minimum_perc = 0 -resource_name = cost--ids--index -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:cost--ids--sustainability] -file_filter = docs/locale//LC_MESSAGES/cost/ids/sustainability.po -source_file = build/locale/cost/ids/sustainability.pot -type = PO -minimum_perc = 0 -resource_name = cost--ids--sustainability -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:cost--index] -file_filter = docs/locale//LC_MESSAGES/cost/index.po -source_file = build/locale/cost/index.pot -type = PO -minimum_perc = 0 -resource_name = cost--index -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:cost--ocds] -file_filter = docs/locale//LC_MESSAGES/cost/ocds.po -source_file = build/locale/cost/ocds.pot -type = PO -minimum_perc = 0 -resource_name = cost--ocds -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:guidance--data_user_guide] -file_filter = docs/locale//LC_MESSAGES/guidance/data_user_guide.po -source_file = build/locale/guidance/data_user_guide.pot -type = PO -minimum_perc = 0 -resource_name = guidance--data_user_guide -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:guidance--evaluating] -file_filter = docs/locale//LC_MESSAGES/guidance/evaluating.po -source_file = build/locale/guidance/evaluating.pot -type = PO -minimum_perc = 0 -resource_name = guidance--evaluating -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:guidance--example] -file_filter = docs/locale//LC_MESSAGES/guidance/example.po -source_file = build/locale/guidance/example.pot -type = PO -minimum_perc = 0 -resource_name = guidance--example -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:guidance--identifiers] -file_filter = docs/locale//LC_MESSAGES/guidance/identifiers.po -source_file = build/locale/guidance/identifiers.pot -type = PO -minimum_perc = 0 -resource_name = guidance--identifiers -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:guidance--implementation] -file_filter = docs/locale//LC_MESSAGES/guidance/implementation.po -source_file = build/locale/guidance/implementation.pot -type = PO -minimum_perc = 0 -resource_name = guidance--implementation -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:guidance--index] -file_filter = docs/locale//LC_MESSAGES/guidance/index.po -source_file = build/locale/guidance/index.pot -type = PO -minimum_perc = 0 -resource_name = guidance--index -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:guidance--language] -file_filter = docs/locale//LC_MESSAGES/guidance/language.po -source_file = build/locale/guidance/language.pot -type = PO -minimum_perc = 0 -resource_name = guidance--language -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:guidance--publishing] -file_filter = docs/locale//LC_MESSAGES/guidance/publishing.po -source_file = build/locale/guidance/publishing.pot -type = PO -minimum_perc = 0 -resource_name = guidance--publishing -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:guidance--using] -file_filter = docs/locale//LC_MESSAGES/guidance/using.po -source_file = build/locale/guidance/using.pot -type = PO -minimum_perc = 0 -resource_name = guidance--using -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:index] -file_filter = docs/locale//LC_MESSAGES/index.po -source_file = build/locale/index.pot -type = PO -minimum_perc = 0 -resource_name = index -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:infrastructure-codelists] -file_filter = docs/locale//LC_MESSAGES/infrastructure-codelists.po -source_file = build/locale/infrastructure-codelists.pot -type = PO -minimum_perc = 0 -resource_name = infrastructure-codelists -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:infrastructure-mappings] -file_filter = docs/locale//LC_MESSAGES/infrastructure-mappings.po -source_file = build/locale/infrastructure-mappings.pot -type = PO -minimum_perc = 0 -resource_name = infrastructure-mappings -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:infrastructure-schema] -file_filter = docs/locale//LC_MESSAGES/infrastructure-schema.po -source_file = build/locale/infrastructure-schema.pot -type = PO -minimum_perc = 0 -resource_name = infrastructure-schema -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:projects--index] -file_filter = docs/locale//LC_MESSAGES/projects/index.po -source_file = build/locale/projects/index.pot -type = PO -minimum_perc = 0 -resource_name = projects--index -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:reference--browser] -file_filter = docs/locale//LC_MESSAGES/reference/browser.po -source_file = build/locale/reference/browser.pot -type = PO -minimum_perc = 0 -resource_name = reference--browser -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:reference--changelog] -file_filter = docs/locale//LC_MESSAGES/reference/changelog.po -source_file = build/locale/reference/changelog.pot -type = PO -minimum_perc = 0 -resource_name = reference--changelog -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:reference--codelists] -file_filter = docs/locale//LC_MESSAGES/reference/codelists.po -source_file = build/locale/reference/codelists.pot -type = PO -minimum_perc = 0 -resource_name = reference--codelists -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:reference--index] -file_filter = docs/locale//LC_MESSAGES/reference/index.po -source_file = build/locale/reference/index.pot -type = PO -minimum_perc = 0 -resource_name = reference--index -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:reference--package] -file_filter = docs/locale//LC_MESSAGES/reference/package.po -source_file = build/locale/reference/package.pot -type = PO -minimum_perc = 0 -resource_name = reference--package -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:reference--prefixes] -file_filter = docs/locale//LC_MESSAGES/reference/prefixes.po -source_file = build/locale/reference/prefixes.pot -type = PO -minimum_perc = 0 -resource_name = reference--prefixes -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:reference--schema] -file_filter = docs/locale//LC_MESSAGES/reference/schema.po -source_file = build/locale/reference/schema.pot -type = PO -minimum_perc = 0 -resource_name = reference--schema -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:sphinx] -file_filter = docs/locale//LC_MESSAGES/sphinx.po -source_file = build/locale/sphinx.pot -type = PO -minimum_perc = 0 -resource_name = sphinx -replace_edited_strings = false -keep_translations = false - -[o:open-contracting-partnership-1:p:oc4ids-09:r:support] -file_filter = docs/locale//LC_MESSAGES/support.po -source_file = build/locale/support.pot -type = PO -minimum_perc = 0 -resource_name = support -replace_edited_strings = false -keep_translations = false - diff --git a/biome.json b/biome.json new file mode 100644 index 00000000..4c0f7722 --- /dev/null +++ b/biome.json @@ -0,0 +1,16 @@ +{ + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true, + "defaultBranch": "main" + }, + "formatter": { + "indentStyle": "space", + "lineWidth": 119, + "includes": ["**", "!docs/examples/**/*.json", "!schema/**/*.json"] + }, + "files": { + "includes": ["**", "!docs/_static/docson", "!docs/_templates", "!docs/_static/renderjson.*"] + } +} diff --git a/common-requirements.txt b/common-requirements.txt index 62a2917b..cc4e2acc 100644 --- a/common-requirements.txt +++ b/common-requirements.txt @@ -4,26 +4,24 @@ alabaster==0.7.12 # via sphinx anyio==4.4.0 # via + # elasticsearch # starlette # watchfiles async-generator==1.10 - # via - # trio - # trio-websocket -attrs==23.1.0 + # via trio-typing +attrs==25.4.0 # via # cattrs # outcome - # pytest # requests-cache # trio -babel==2.9.1 +babel==2.18.0 # via # sphinx # sphinx-intl cattrs==23.1.2 # via requests-cache -certifi==2024.7.4 +certifi==2026.1.4 # via # elastic-transport # requests @@ -42,26 +40,23 @@ docutils==0.18 # via # myst-parser # sphinx -elastic-transport==8.4.0 +elastic-transport==9.2.1 # via elasticsearch -elasticsearch==8.6.2 +elasticsearch==9.3.0 # via ocdsindex -exceptiongroup==1.2.2 - # via - # anyio - # cattrs - # pytest -h11==0.13.0 +h11==0.16.0 # via # uvicorn # wsproto -idna==3.7 +idna==3.15 # via # anyio # requests # trio imagesize==1.4.1 # via sphinx +importlib-metadata==8.7.1 + # via trio-typing iniconfig==1.1.1 # via pytest jinja2==3.1.6 @@ -74,7 +69,7 @@ jsonref==1.0.0.post1 # via ocdsextensionregistry linkify-it-py==1.0.1 # via -r common-requirements.in -lxml==4.9.1 +lxml==6.1.0 # via ocdsindex markdown-it-py==2.2.0 # via @@ -86,35 +81,42 @@ mdit-py-plugins==0.3.1 # via myst-parser mdurl==0.1.2 # via markdown-it-py +mypy-extensions==1.1.0 + # via trio-typing myst-parser==0.18.1 # via -r common-requirements.in -ocds-babel==0.3.6 +ocds-babel==0.3.7 # via -r common-requirements.in ocdsextensionregistry==0.6.5 # via -r common-requirements.in -ocdsindex==0.2.0 +ocdsindex==0.4.1 # via -r common-requirements.in -outcome==1.1.0 - # via trio +outcome==1.3.0.post0 + # via + # trio + # trio-websocket packaging==24.1 # via # pytest # sphinx + # trio-typing platformdirs==3.9.1 # via requests-cache -pluggy==0.13.1 +pluggy==1.6.0 # via pytest -pygments==2.15.1 - # via sphinx +pygments==2.20.0 + # via + # pytest + # sphinx pysocks==1.7.1 # via urllib3 -pytest==7.2.0 +pytest==9.0.3 # via -r common-requirements.in -pytz==2021.1 - # via babel +python-dateutil==2.9.0.post0 + # via elasticsearch pyyaml==6.0.1 # via myst-parser -requests==2.32.2 +requests==2.33.0 # via # elasticsearch # ocdsextensionregistry @@ -122,15 +124,19 @@ requests==2.32.2 # sphinx requests-cache==1.1.0 # via ocdsextensionregistry -selenium==4.11.2 +selenium==4.40.0 # via -r common-requirements.in -setuptools==75.2.0 +setuptools==84.0.0 # via sphinx-intl six==1.16.0 - # via url-normalize -sniffio==1.2.0 + # via + # python-dateutil + # url-normalize +sniffio==1.3.1 # via # anyio + # elastic-transport + # elasticsearch # trio snowballstemmer==2.1.0 # via sphinx @@ -158,29 +164,34 @@ 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@d56505d69fceeb43535a3387172b2024eead536e#egg=standard_theme +standard-theme @ git+https://github.com/open-contracting/standard_theme.git@c1594b82ed4f9d75b85b3cd0dfb86b3a0d9ef965#egg=standard_theme # via -r common-requirements.in -starlette==0.40.0 +starlette==1.3.1 # via sphinx-autobuild -tomli==2.0.1 - # via pytest -trio==0.20.0 +trio==0.32.0 # via # selenium + # trio-typing # trio-websocket -trio-websocket==0.9.2 +trio-typing==0.10.0 + # via selenium +trio-websocket==0.12.2 + # via selenium +types-certifi==2021.10.8.3 # via selenium -typing-extensions==4.4.0 +types-urllib3==1.26.25.14 + # via selenium +typing-extensions==4.15.0 # via - # anyio - # cattrs + # elasticsearch # myst-parser - # uvicorn + # selenium + # trio-typing uc-micro-py==1.0.1 # via linkify-it-py url-normalize==1.4.3 # via requests-cache -urllib3==1.26.19 +urllib3==2.7.0 # via # elastic-transport # requests @@ -188,9 +199,13 @@ urllib3==1.26.19 # selenium uvicorn==0.30.6 # via sphinx-autobuild -watchfiles==0.24.0 +watchfiles==1.1.1 # via sphinx-autobuild +websocket-client==1.9.0 + # via selenium websockets==13.0.1 # via sphinx-autobuild wsproto==1.1.0 # via trio-websocket +zipp==3.23.0 + # via importlib-metadata diff --git a/crowdin.yml b/crowdin.yml new file mode 100644 index 00000000..9cfdbe4f --- /dev/null +++ b/crowdin.yml @@ -0,0 +1,166 @@ +{ + "project_id": 825758, + "preserve_hierarchy": true, + "files": [ + { + "source": "/build/locale/404.pot", + "dest": "404.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/404.po" + }, + { + "source": "/build/locale/about.pot", + "dest": "about.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/about.po" + }, + { + "source": "/build/locale/cost/common.pot", + "dest": "cost/common.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/cost/common.po" + }, + { + "source": "/build/locale/cost/ids/core.pot", + "dest": "cost/ids/core.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/cost/ids/core.po" + }, + { + "source": "/build/locale/cost/ids/index.pot", + "dest": "cost/ids/index.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/cost/ids/index.po" + }, + { + "source": "/build/locale/cost/ids/sustainability.pot", + "dest": "cost/ids/sustainability.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/cost/ids/sustainability.po" + }, + { + "source": "/build/locale/cost/index.pot", + "dest": "cost/index.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/cost/index.po" + }, + { + "source": "/build/locale/cost/ocds.pot", + "dest": "cost/ocds.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/cost/ocds.po" + }, + { + "source": "/build/locale/guidance/data_user_guide.pot", + "dest": "guidance/data_user_guide.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/guidance/data_user_guide.po" + }, + { + "source": "/build/locale/guidance/evaluating.pot", + "dest": "guidance/evaluating.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/guidance/evaluating.po" + }, + { + "source": "/build/locale/guidance/example.pot", + "dest": "guidance/example.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/guidance/example.po" + }, + { + "source": "/build/locale/guidance/identifiers.pot", + "dest": "guidance/identifiers.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/guidance/identifiers.po" + }, + { + "source": "/build/locale/guidance/implementation.pot", + "dest": "guidance/implementation.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/guidance/implementation.po" + }, + { + "source": "/build/locale/guidance/index.pot", + "dest": "guidance/index.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/guidance/index.po" + }, + { + "source": "/build/locale/guidance/language.pot", + "dest": "guidance/language.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/guidance/language.po" + }, + { + "source": "/build/locale/guidance/publishing.pot", + "dest": "guidance/publishing.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/guidance/publishing.po" + }, + { + "source": "/build/locale/guidance/using.pot", + "dest": "guidance/using.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/guidance/using.po" + }, + { + "source": "/build/locale/index.pot", + "dest": "index.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/index.po" + }, + { + "source": "/build/locale/infrastructure-codelists.pot", + "dest": "infrastructure-codelists.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/infrastructure-codelists.po" + }, + { + "source": "/build/locale/infrastructure-mappings.pot", + "dest": "infrastructure-mappings.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/infrastructure-mappings.po" + }, + { + "source": "/build/locale/infrastructure-schema.pot", + "dest": "infrastructure-schema.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/infrastructure-schema.po" + }, + { + "source": "/build/locale/infrastructure-theme.pot", + "dest": "infrastructure-theme.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/infrastructure-theme.po" + }, + { + "source": "/build/locale/projects/index.pot", + "dest": "projects/index.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/projects/index.po" + }, + { + "source": "/build/locale/reference/browser.pot", + "dest": "reference/browser.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/reference/browser.po" + }, + { + "source": "/build/locale/reference/changelog.pot", + "dest": "reference/changelog.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/reference/changelog.po" + }, + { + "source": "/build/locale/reference/codelists.pot", + "dest": "reference/codelists.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/reference/codelists.po" + }, + { + "source": "/build/locale/reference/index.pot", + "dest": "reference/index.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/reference/index.po" + }, + { + "source": "/build/locale/reference/package.pot", + "dest": "reference/package.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/reference/package.po" + }, + { + "source": "/build/locale/reference/prefixes.pot", + "dest": "reference/prefixes.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/reference/prefixes.po" + }, + { + "source": "/build/locale/reference/schema.pot", + "dest": "reference/schema.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/reference/schema.po" + }, + { + "source": "/build/locale/sphinx.pot", + "dest": "sphinx.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/sphinx.po" + }, + { + "source": "/build/locale/support.pot", + "dest": "support.pot", + "translation": "/docs/locale/%two_letters_code%/LC_MESSAGES/support.po" + } + ] +} \ No newline at end of file diff --git a/docs/_static/basic.css b/docs/_static/custom.css similarity index 50% rename from docs/_static/basic.css rename to docs/_static/custom.css index 03d59ce4..d20e7951 100644 --- a/docs/_static/basic.css +++ b/docs/_static/custom.css @@ -13,10 +13,21 @@ text-decoration-style: dotted; } -h1, h2, .rst-content .toctree-wrapper p.caption, h3, h4, h5, h6, legend, .wy-menu-vertical a, .oc-custom-select, #rtd-search-form input, .wy-side-nav-search > a{ - font-family: 'Montserrat',"Helvetica Neue",Helvetica,Arial,sans-serif; +h1, +h2, +.rst-content .toctree-wrapper p.caption, +h3, +h4, +h5, +h6, +legend, +.wy-menu-vertical a, +.oc-custom-select, +#rtd-search-form input, +.wy-side-nav-search > a { + font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif; } .wy-menu-vertical a { - font-size: 95% + font-size: 95%; } diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 9d6b5e89..017e66e4 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -1,5 +1,3 @@ -{% set css_files = css_files + ["_static/renderjson.css", "https://fonts.googleapis.com/css?family=Montserrat", "_static/basic.css"] %} -{% set script_files = script_files + ["_static/renderjson.js", "_static/json-example-format.js"] %} {% extends "!layout.html" %} {% block developed_by %} diff --git a/docs/conf.py b/docs/conf.py index c0760b3a..73972714 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,11 +1,8 @@ # Configuration file for the Sphinx documentation builder. # -# This file only contains a selection of the most common options. For a full -# list see the documentation: +# For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html -# -- Path setup -------------------------------------------------------------- - import csv import os from glob import glob @@ -17,6 +14,7 @@ from sphinx.locale import get_translation # -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information project = "Open Contracting for Infrastructure Data Standards Toolkit" copyright = "Open Contracting Partnership" @@ -25,12 +23,9 @@ version = "0.9" release = "0.9.5" - # -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. extensions = [ "myst_parser", "sphinxcontrib.jsonschema", @@ -39,28 +34,18 @@ "sphinx_design", ] -# Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "**/docson/[!p]**", "**/docson/package*.json"] - # -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# html_theme = "standard_theme" # 'pydata_sphinx_theme' html_theme_path = [standard_theme.get_html_theme_path()] html_favicon = "_static/favicon-16x16.ico" - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static", "examples", "../mapping/sustainability.yaml"] +html_css_files = ["renderjson.css", "https://fonts.googleapis.com/css?family=Montserrat", "custom.css"] +html_js_files = ["renderjson.js", "json-example-format.js"] # -- Local configuration ----------------------------------------------------- @@ -99,7 +84,7 @@ "license_url": f"{repository_url}/blob/HEAD/LICENSE", "repository_url": repository_url, } -html_short_title = f'{html_theme_options["short_project"]} v{release}' +html_short_title = f"{html_theme_options['short_project']} v{release}" def setup(app): diff --git a/docs/guidance/language.md b/docs/guidance/language.md index 1281ab43..d43d3071 100644 --- a/docs/guidance/language.md +++ b/docs/guidance/language.md @@ -53,7 +53,7 @@ flatten-tool flatten -s https://standard.open-contracting.org/infrastructure/0.9 ## Publishing in multiple languages -To publish data in multiple languages, follow the above guidance and publish a separate [project package](../../reference/package.md) for each language. You need to ensure that the values of `id` fields are consistent across packages, so that users can find the translations of objects. +To publish data in multiple languages, follow the above guidance and publish a separate [project package](../reference/package.md) for each language. You need to ensure that the values of `id` fields are consistent across packages, so that users can find the translations of objects. ## Internationalization lookup table diff --git a/docs/locale/es/LC_MESSAGES/404.po b/docs/locale/es/LC_MESSAGES/404.po index e4b009c2..25b1800d 100644 --- a/docs/locale/es/LC_MESSAGES/404.po +++ b/docs/locale/es/LC_MESSAGES/404.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Open Contracting for Infrastructure Data Standards Toolkit 0.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-18 09:20+1300\n" +"POT-Creation-Date: 2025-03-21 16:50+1300\n" "PO-Revision-Date: 2019-03-21 15:12+0000\n" "Last-Translator: Juan Pane , 2021\n" "Language-Team: Spanish (https://app.transifex.com/open-contracting-partnership-1/teams/112299/es/)\n" diff --git a/docs/locale/es/LC_MESSAGES/about.po b/docs/locale/es/LC_MESSAGES/about.po index 4c9ba6e8..3d211bae 100644 --- a/docs/locale/es/LC_MESSAGES/about.po +++ b/docs/locale/es/LC_MESSAGES/about.po @@ -15,7 +15,7 @@ msgid "" msgstr "" "Project-Id-Version: Open Contracting for Infrastructure Data Standards Toolkit 0.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-18 09:20+1300\n" +"POT-Creation-Date: 2025-03-21 16:50+1300\n" "PO-Revision-Date: 2019-03-21 15:12+0000\n" "Last-Translator: Francis C. Bennaton, 2024\n" "Language-Team: Spanish (https://app.transifex.com/open-contracting-partnership-1/teams/112299/es/)\n" diff --git a/docs/locale/es/LC_MESSAGES/cost/ids/sustainability.po b/docs/locale/es/LC_MESSAGES/cost/ids/sustainability.po index b8334bf7..8a7bc156 100644 --- a/docs/locale/es/LC_MESSAGES/cost/ids/sustainability.po +++ b/docs/locale/es/LC_MESSAGES/cost/ids/sustainability.po @@ -5,8 +5,8 @@ # # Translators: # Francis C. Bennaton, 2024 -# Duncan Dewhurst , 2025 # Evelyn Dinora Hernandez Martinez , 2025 +# Duncan Dewhurst , 2025 # #, fuzzy msgid "" @@ -15,7 +15,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2025-03-21 16:50+1300\n" "PO-Revision-Date: 2023-12-14 22:18+0000\n" -"Last-Translator: Evelyn Dinora Hernandez Martinez , 2025\n" +"Last-Translator: Duncan Dewhurst , 2025\n" "Language-Team: Spanish (https://app.transifex.com/open-contracting-partnership-1/teams/112299/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -3246,8 +3246,7 @@ msgstr "" "Para cada período de informe, agregue un objeto " "[`Observation`](../../reference/schema.md#observation) a la matiz de la " "métrica [`.observations`](project-" -"schema.json,/definitions/Metric,observations) de la métrica ) y establezca " -"su:" +"schema.json,/definitions/Metric,observations) de la métrica y establezca su:" #: ../../docs/cost/ids/sustainability.md:2775 #: ../../docs/cost/ids/sustainability.md:2787 diff --git a/docs/locale/es/LC_MESSAGES/cost/index.po b/docs/locale/es/LC_MESSAGES/cost/index.po index 7739481a..627cb4ca 100644 --- a/docs/locale/es/LC_MESSAGES/cost/index.po +++ b/docs/locale/es/LC_MESSAGES/cost/index.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: Open Contracting for Infrastructure Data Standards Toolkit 0.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-18 09:20+1300\n" +"POT-Creation-Date: 2025-03-21 16:50+1300\n" "PO-Revision-Date: 2019-03-21 15:12+0000\n" "Last-Translator: Evelyn Dinora Hernandez Martinez , 2025\n" "Language-Team: Spanish (https://app.transifex.com/open-contracting-partnership-1/teams/112299/es/)\n" diff --git a/docs/locale/es/LC_MESSAGES/guidance/data_user_guide.po b/docs/locale/es/LC_MESSAGES/guidance/data_user_guide.po index b850597b..cc36feb3 100644 --- a/docs/locale/es/LC_MESSAGES/guidance/data_user_guide.po +++ b/docs/locale/es/LC_MESSAGES/guidance/data_user_guide.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Open Contracting for Infrastructure Data Standards Toolkit 0.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-18 09:20+1300\n" +"POT-Creation-Date: 2025-03-21 16:50+1300\n" "PO-Revision-Date: 2020-05-13 23:48+0000\n" "Last-Translator: Evelyn Dinora Hernandez Martinez , 2025\n" "Language-Team: Spanish (https://app.transifex.com/open-contracting-partnership-1/teams/112299/es/)\n" diff --git a/docs/locale/es/LC_MESSAGES/guidance/index.po b/docs/locale/es/LC_MESSAGES/guidance/index.po index 293715b9..fcfdb922 100644 --- a/docs/locale/es/LC_MESSAGES/guidance/index.po +++ b/docs/locale/es/LC_MESSAGES/guidance/index.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Open Contracting for Infrastructure Data Standards Toolkit 0.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-18 09:20+1300\n" +"POT-Creation-Date: 2025-03-21 16:50+1300\n" "PO-Revision-Date: 2019-03-21 15:13+0000\n" "Last-Translator: Romina Fernandez , 2019\n" "Language-Team: Spanish (https://app.transifex.com/open-contracting-partnership-1/teams/112299/es/)\n" diff --git a/docs/locale/es/LC_MESSAGES/guidance/language.po b/docs/locale/es/LC_MESSAGES/guidance/language.po index 3e7529c6..fee0eefb 100644 --- a/docs/locale/es/LC_MESSAGES/guidance/language.po +++ b/docs/locale/es/LC_MESSAGES/guidance/language.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Open Contracting for Infrastructure Data Standards Toolkit 0.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-03-21 16:50+1300\n" +"POT-Creation-Date: 2025-09-02 20:56-0400\n" "PO-Revision-Date: 2023-12-14 22:18+0000\n" "Last-Translator: Evelyn Dinora Hernandez Martinez , 2025\n" "Language-Team: Spanish (https://app.transifex.com/open-contracting-partnership-1/teams/112299/es/)\n" @@ -141,12 +141,12 @@ msgstr "Publicando en múltiples idiomas" #: ../../docs/guidance/language.md:56 msgid "" "To publish data in multiple languages, follow the above guidance and publish" -" a separate [project package](../../reference/package.md) for each language." -" You need to ensure that the values of `id` fields are consistent across " +" a separate [project package](../reference/package.md) for each language. " +"You need to ensure that the values of `id` fields are consistent across " "packages, so that users can find the translations of objects." msgstr "" "Para publicar datos en varios idiomas, siga la guía de arriba y publique un " -"[project package](../../reference/package.md) separado para cada idioma. " +"[project package](../reference/package.md) separado para cada idioma. " "Tiene que asegurar que los valores de los campos del `id` sean consistentes " "entre los paquetes, para que los usuarios puedan encontrar las traducciones " "de los objetos. " diff --git a/docs/locale/es/LC_MESSAGES/guidance/using.po b/docs/locale/es/LC_MESSAGES/guidance/using.po index 45be18a1..894277ef 100644 --- a/docs/locale/es/LC_MESSAGES/guidance/using.po +++ b/docs/locale/es/LC_MESSAGES/guidance/using.po @@ -15,7 +15,7 @@ msgid "" msgstr "" "Project-Id-Version: Open Contracting for Infrastructure Data Standards Toolkit 0.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-18 09:20+1300\n" +"POT-Creation-Date: 2025-03-21 16:50+1300\n" "PO-Revision-Date: 2019-03-21 15:13+0000\n" "Last-Translator: Francis C. Bennaton, 2024\n" "Language-Team: Spanish (https://app.transifex.com/open-contracting-partnership-1/teams/112299/es/)\n" diff --git a/docs/locale/es/LC_MESSAGES/index.po b/docs/locale/es/LC_MESSAGES/index.po index f7b56489..41acc572 100644 --- a/docs/locale/es/LC_MESSAGES/index.po +++ b/docs/locale/es/LC_MESSAGES/index.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Open Contracting for Infrastructure Data Standards Toolkit 0.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-18 09:20+1300\n" +"POT-Creation-Date: 2025-03-21 16:50+1300\n" "PO-Revision-Date: 2019-03-21 15:12+0000\n" "Last-Translator: Evelyn Dinora Hernandez Martinez , 2025\n" "Language-Team: Spanish (https://app.transifex.com/open-contracting-partnership-1/teams/112299/es/)\n" diff --git a/docs/locale/es/LC_MESSAGES/infrastructure-schema.po b/docs/locale/es/LC_MESSAGES/infrastructure-schema.po index bbe94d40..014457e2 100644 --- a/docs/locale/es/LC_MESSAGES/infrastructure-schema.po +++ b/docs/locale/es/LC_MESSAGES/infrastructure-schema.po @@ -18,14 +18,14 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2025-03-25 15:32+1300\n" +"POT-Creation-Date: 2025-09-02 20:56-0400\n" "PO-Revision-Date: 2020-06-25 01:03+0000\n" "Last-Translator: Evelyn Dinora Hernandez Martinez , 2025\n" "Language-Team: Spanish (https://app.transifex.com/open-contracting-partnership-1/teams/112299/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.9.1\n" +"Generated-By: Babel 2.17.0\n" "Language: es\n" "Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" @@ -2280,6 +2280,7 @@ msgstr "" #. /definitions/Organization/properties/id/description #: schema/project-level/project-schema.json:1 +#, python-brace-format msgid "" "The ID used for cross-referencing to this party from other sections of the " "release. This field may be built with the following structure " @@ -3238,6 +3239,7 @@ msgstr "El nombre completo de la persona." #. /definitions/Person/properties/identifier/description #: schema/project-level/project-schema.json:1 +#, python-brace-format msgid "" "An official identifier for the person. The scheme should follow the pattern " "{JURISDICTION}-{TYPE}, where JURISDICTION is a three-letter, uppercase ISO " diff --git a/docs/locale/es/LC_MESSAGES/reference/browser.po b/docs/locale/es/LC_MESSAGES/reference/browser.po index 3255d7d3..84510efd 100644 --- a/docs/locale/es/LC_MESSAGES/reference/browser.po +++ b/docs/locale/es/LC_MESSAGES/reference/browser.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Open Contracting for Infrastructure Data Standards Toolkit 0.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-15 11:03+1300\n" +"POT-Creation-Date: 2025-03-21 16:50+1300\n" "PO-Revision-Date: 2019-03-21 15:13+0000\n" "Last-Translator: Cecilia Casco , 2021\n" "Language-Team: Spanish (https://app.transifex.com/open-contracting-partnership-1/teams/112299/es/)\n" diff --git a/docs/locale/es/LC_MESSAGES/reference/changelog.po b/docs/locale/es/LC_MESSAGES/reference/changelog.po index e33efd6e..c3e6f4b8 100644 --- a/docs/locale/es/LC_MESSAGES/reference/changelog.po +++ b/docs/locale/es/LC_MESSAGES/reference/changelog.po @@ -18,7 +18,7 @@ msgid "" msgstr "" "Project-Id-Version: Open Contracting for Infrastructure Data Standards Toolkit 0.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-03-21 16:50+1300\n" +"POT-Creation-Date: 2025-09-02 20:53-0400\n" "PO-Revision-Date: 2020-05-13 23:49+0000\n" "Last-Translator: Evelyn Dinora Hernandez Martinez , 2025\n" "Language-Team: Spanish (https://app.transifex.com/open-contracting-partnership-1/teams/112299/es/)\n" diff --git a/docs/locale/es/LC_MESSAGES/reference/prefixes.po b/docs/locale/es/LC_MESSAGES/reference/prefixes.po index 5aa27cef..38c239e1 100644 --- a/docs/locale/es/LC_MESSAGES/reference/prefixes.po +++ b/docs/locale/es/LC_MESSAGES/reference/prefixes.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Open Contracting for Infrastructure Data Standards Toolkit 0.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-15 11:03+1300\n" +"POT-Creation-Date: 2025-03-21 16:50+1300\n" "PO-Revision-Date: 2023-12-14 22:18+0000\n" "Last-Translator: Francis C. Bennaton, 2024\n" "Language-Team: Spanish (https://app.transifex.com/open-contracting-partnership-1/teams/112299/es/)\n" diff --git a/docs/locale/es/LC_MESSAGES/sphinx.po b/docs/locale/es/LC_MESSAGES/sphinx.po index 448eb666..80816641 100644 --- a/docs/locale/es/LC_MESSAGES/sphinx.po +++ b/docs/locale/es/LC_MESSAGES/sphinx.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Open Contracting for Infrastructure Data Standards Toolkit 0.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-15 11:03+1300\n" +"POT-Creation-Date: 2025-09-02 20:53-0400\n" "PO-Revision-Date: 2020-05-13 23:47+0000\n" "Last-Translator: Romina Fernandez , 2020\n" "Language-Team: Spanish (https://app.transifex.com/open-contracting-partnership-1/teams/112299/es/)\n" @@ -21,6 +21,6 @@ msgstr "" "Language: es\n" "Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" -#: ../../docs/_templates/layout.html:15 +#: ../../docs/_templates/layout.html:13 msgid "Data Review Tool" msgstr "Herramienta de Revisión de Datos" diff --git a/docs/locale/es/LC_MESSAGES/support.po b/docs/locale/es/LC_MESSAGES/support.po index 254e8ee9..bef1ee10 100644 --- a/docs/locale/es/LC_MESSAGES/support.po +++ b/docs/locale/es/LC_MESSAGES/support.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: Open Contracting for Infrastructure Data Standards Toolkit 0.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-15 11:03+1300\n" +"POT-Creation-Date: 2025-03-21 16:50+1300\n" "PO-Revision-Date: 2019-03-21 15:12+0000\n" "Last-Translator: Evelyn Dinora Hernandez Martinez , 2025\n" "Language-Team: Spanish (https://app.transifex.com/open-contracting-partnership-1/teams/112299/es/)\n" diff --git a/include/common.mk b/include/common.mk index 63cb5b5c..12a9c619 100644 --- a/include/common.mk +++ b/include/common.mk @@ -63,37 +63,6 @@ docs/locale: $(TRANSLATIONS:.%=docs/locale/%) pocount: find $(LOCALE_DIR) -name LC_MESSAGES -exec pocount --incomplete --short "{}" + -### Transifex - -.PHONY: clean_txconfig -clean_txconfig: - rm -f .tx/config - sphinx-intl create-txconfig - -.PHONY: update_txconfig -update_txconfig: - sphinx-intl update-txconfig-resources --transifex-organization-name $(TRANSIFEX_ORGANIZATION) --transifex-project-name $(TRANSIFEX_PROJECT) --pot-dir $(POT_DIR) --locale-dir $(LOCALE_DIR) - -# Builds and pushes the .pot files (`source_file` in .tx/config) to Transifex. -.PHONY: push -push: extract - tx push -s - -force_push.%: extract - tx push -f -s -t -l $* - -# Also pushes the translation .po files (`file_filter` in .tx/config) to Transifex. -.PHONY: force_push -force_push: extract - tx push -f -s -t -l $(COMMA_SEPARATED_TRANSLATIONS) - -pull.%: FORCE - tx pull -f -l $* - -.PHONY: pull -pull: - tx pull -f -l $(COMMA_SEPARATED_TRANSLATIONS) - ### Current language # Create a symlink for the language, so that file paths in `jsonschema` directives resolve. diff --git a/include/config.mk b/include/config.mk index 69c5432b..e88a3036 100644 --- a/include/config.mk +++ b/include/config.mk @@ -19,10 +19,6 @@ DIST_FILES= POT_DIR=$(BUILD_DIR)/locale # The prefix, if any, to the schema and codelists domains. DOMAIN_PREFIX=infrastructure- -# The Transifex project name. -TRANSIFEX_PROJECT=oc4ids-09 -# The Transifex organization name. -TRANSIFEX_ORGANIZATION=open-contracting-partnership-1 # Any additional extract targets. EXTRACT_TARGETS=extract_mappings # Extra arguments for sphinx-autobuild. diff --git a/manage.py b/manage.py index 82faaace..497b084b 100755 --- a/manage.py +++ b/manage.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import csv import json import re @@ -468,12 +468,12 @@ def _compare(actual, infra_list, ocds_list, prefix, suffix): # An editor might've added an infrastructure codelist or copied an OCDS codelist, without updating this script. added = actual - infra_list - ocds_list if added: - sys.exit(f'{prefix} has unexpected {", ".join(added)}: add to infra_{suffix} or ocds_{suffix}?') + sys.exit(f"{prefix} has unexpected {', '.join(added)}: add to infra_{suffix} or ocds_{suffix}?") # An editor might've removed an infrastructure codelist, without updating this script. removed = infra_list - actual if removed: - sys.exit(f'{prefix} is missing {", ".join(removed)}: remove from infra_{suffix}?') + sys.exit(f"{prefix} is missing {', '.join(removed)}: remove from infra_{suffix}?") ocds_base_url = "https://standard.open-contracting.org/1.1/en/" @@ -714,10 +714,8 @@ def _compare(actual, infra_list, ocds_list, prefix, suffix): "Organization", { # Refer to project instead of contracting process, link to infrastructure codelist instead of PPP codelist. - ("properties", "roles", "description"): lambda s: ( - s.replace("contracting process", "project").replace( - "profiles/ppp/latest/en/", "infrastructure/{{version}}/{{lang}}/" - ) + ("properties", "roles", "description"): lambda s: s.replace("contracting process", "project").replace( + "profiles/ppp/latest/en/", "infrastructure/{{version}}/{{lang}}/" ), }, ) @@ -778,8 +776,8 @@ def _compare(actual, infra_list, ocds_list, prefix, suffix): "Document", { # Link to infrastructure codelist instead of PPP codelist. - ("properties", "documentType", "description"): lambda s: ( - s.replace("profiles/ppp/latest/en/", "infrastructure/{{version}}/{{lang}}/") + ("properties", "documentType", "description"): lambda s: s.replace( + "profiles/ppp/latest/en/", "infrastructure/{{version}}/{{lang}}/" ), }, ) @@ -799,8 +797,8 @@ def _compare(actual, infra_list, ocds_list, prefix, suffix): _copy_element( "Metric", { - ("properties", "id", "description"): lambda s: ( - s.replace("contracting process", "contracting process or project") + ("properties", "id", "description"): lambda s: s.replace( + "contracting process", "contracting process or project" ), }, ) @@ -844,11 +842,9 @@ def _compare(actual, infra_list, ocds_list, prefix, suffix): "MilestoneReference", { # Remove reference to release, add reference to project. - ("properties", "id", "description"): lambda s: ( - s.replace( - " described elsewhere in a release about this contracting process.", - " in this project or contracting process's `.milestones`.", - ) + ("properties", "id", "description"): lambda s: s.replace( + " described elsewhere in a release about this contracting process.", + " in this project or contracting process's `.milestones`.", ), }, ) @@ -1000,7 +996,7 @@ def _link(name, fields, text): f"{identifier} ({title}): OC4IDS is invalid: " f"{e.message} ({'/'.join(e.absolute_schema_path)})" ) - except json.decoder.JSONDecodeError as e: + except json.JSONDecodeError as e: click.echo(f"{identifier} ({title}): JSON is invalid: {e}: {example}") if additional_fields: diff --git a/pyproject.toml b/pyproject.toml index 8cd10b2a..66170be1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,12 +4,11 @@ version = "0.0.0" [tool.ruff] line-length = 119 -target-version = "py310" [tool.ruff.lint] select = ["ALL"] ignore = [ - "ANN", "C901", "COM812", "D203", "D212", "D415", "EM", "ISC001", "PERF203", "PLR091", "Q000", + "ANN", "C901", "COM812", "CPY001", "D203", "D212", "D415", "EM", "ISC001", "PERF203", "PLR091", "Q000", "D1", "D205", "PTH", "D200", # https://github.com/astral-sh/ruff/issues/6269 @@ -33,3 +32,6 @@ ignore-variadic-names = true "D301", # click escapes "TRY003", # errors ] + +[tool.uv.pip] +exclude-newer = "1 week" diff --git a/script/diff b/script/diff index 85fb10c9..18f5fbdc 100755 --- a/script/diff +++ b/script/diff @@ -3,14 +3,12 @@ # No -e, because diff uses exit status 1 when differences are found. set -u -curl -sS https://raw.githubusercontent.com/open-contracting/standard_profile_template/latest/docs/conf.py | diff -u - docs/conf.py - -for f in .github/workflows/ci.yml .github/workflows/spellcheck.yml include/config.mk; do - curl -sS https://raw.githubusercontent.com/open-contracting/standard_profile_template/latest/$f | diff -u - $f +for f in biome.json .github/workflows/ci.yml .github/workflows/lint.yml .github/workflows/spellcheck.yml docs/conf.py include/config.mk; do + curl -sS https://raw.githubusercontent.com/open-contracting/standard_profile_template/refs/heads/latest/$f | diff -u - $f done if [ -d util ] || [ -d schema/project-level ]; then - curl -sS https://raw.githubusercontent.com/open-contracting/standard_profile_template/latest/.gitignore | diff -u - .gitignore + curl -sS https://raw.githubusercontent.com/open-contracting/standard_profile_template/refs/heads/latest/.gitignore | diff -u - .gitignore else - curl -sS https://raw.githubusercontent.com/open-contracting/standard_profile_template/latest/manage.py | diff -u - manage.py + curl -sS https://raw.githubusercontent.com/open-contracting/standard_profile_template/refs/heads/latest/manage.py | diff -u - manage.py fi diff --git a/script/update b/script/update index a1ec03c3..ede828d3 100755 --- a/script/update +++ b/script/update @@ -5,12 +5,12 @@ set -eu main() { mkdir -p script include tests - for f in .pre-commit-config.yaml .python-version Makefile common-requirements.in common-requirements.txt pyproject.toml .github/dependabot.yml .github/workflows/lint.yml .github/workflows/shell.yml docs/_static/favicon-16x16.ico include/common.mk include/prologue.mk script/diff script/update tests/conftest.py tests/test_common.py; do - curl -sS -o $f https://raw.githubusercontent.com/open-contracting/standard_profile_template/latest/$f + for f in .pre-commit-config.yaml .python-version Makefile common-requirements.in common-requirements.txt pyproject.toml .github/dependabot.yml .github/workflows/js.yml .github/workflows/shell.yml docs/_static/favicon-16x16.ico include/common.mk include/prologue.mk script/diff script/update tests/conftest.py tests/test_common.py; do + curl -sS -o $f https://raw.githubusercontent.com/open-contracting/standard_profile_template/refs/heads/latest/$f done if [ ! -d schema/project-level ]; then - curl -sS -o .gitignore https://raw.githubusercontent.com/open-contracting/standard_profile_template/latest/.gitignore + curl -sS -o .gitignore https://raw.githubusercontent.com/open-contracting/standard_profile_template/refs/heads/latest/.gitignore fi chmod +x script/* diff --git a/tests/conftest.py b/tests/conftest.py index f5a6035f..2a393883 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -11,7 +11,6 @@ def browser(request): options = Options() options.add_argument("--headless") - options.add_argument("--no-sandbox") browser = webdriver.Chrome(options=options) browser.implicitly_wait(3)