Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6aa9b03
example.json: Fix logical error in lifecyle cost
neelima-j Apr 27, 2026
4aee7ec
Update changelog.md
neelima-j Apr 27, 2026
7542f9e
Merge pull request #522 from open-contracting/#521-fix-lifecycle-cost…
duncandewhurst Apr 27, 2026
97800f3
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jul 6, 2026
c51df5f
build: Update to latest profile template
jpmckinney Jul 7, 2026
be13fe7
ci: Restore ocds-disallow-null
jpmckinney Jul 7, 2026
60e9bf4
build: Update to latest profile template
jpmckinney Jul 8, 2026
a1c3b71
chore(biome): linter.rules.recommended is true by default and depreca…
jpmckinney Jul 10, 2026
ff6358e
build: Update to latest profile template
jpmckinney Jul 10, 2026
452076f
chore: Upgrade ruff
jpmckinney Jul 23, 2026
5b36a96
chore: Remove ruff target-version
jpmckinney Jul 24, 2026
f0d5851
chore: Use python3 interpreter (python not found on macOS)
jpmckinney Aug 7, 2026
e0b5ba0
build: Update to latest profile template
jpmckinney Sep 18, 2026
143f96d
ci: Make job name consistent
jpmckinney Sep 18, 2026
d31026d
feat: Render the banner and version switcher in the theme, not with A…
jpmckinney Sep 21, 2026
11ddf9f
feat: Build the language switcher from the languages theme option
jpmckinney Sep 22, 2026
aeae552
build: Update to latest profile template
jpmckinney Sep 24, 2026
a4b3880
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 5, 2026
8afe99a
build: Update to latest profile template
jpmckinney Oct 8, 2026
5db7c25
build: Move standard_theme to uncompiled theme-requirements.txt, to t…
jpmckinney Oct 8, 2026
deb7213
build: Let the theme register itself, instead of setting its paths
jpmckinney Oct 8, 2026
623a556
build: Let the theme provide its defaults and favicon
jpmckinney Oct 8, 2026
4671f8e
ci: Allow the workflow to be dispatched manually, to rebuild against …
jpmckinney Oct 9, 2026
ecc38b0
Merge branch '0.9' into 0.9-dev
jpmckinney Oct 9, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: CI
on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]
jobs:
ci:
uses: open-contracting/.github/.github/workflows/ci-profile.yml@main
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ ci:
skip: [pip-compile]
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.20
rev: v0.16.10
hooks:
- id: ruff-check
- id: ruff-format
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.11.26
rev: 0.12.23
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
rev: v2.5.15
hooks:
- id: biome-check
3 changes: 2 additions & 1 deletion common-requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ linkify-it-py
myst-parser
ocds-babel
Sphinx
git+https://github.com/open-contracting/standard_theme.git@open_contracting#egg=standard_theme
sphinxcontrib-opendataservices
sphinxcontrib-opendataservices-jsonschema

# Profile
ocdsextensionregistry
Expand Down
46 changes: 37 additions & 9 deletions common-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ attrs==25.4.0
# via
# cattrs
# outcome
# referencing
# requests-cache
# trio
babel==2.18.0
Expand Down Expand Up @@ -40,9 +41,11 @@ docutils==0.18
# via
# myst-parser
# sphinx
# sphinxcontrib-opendataservices
# sphinxcontrib-opendataservices-jsonschema
elastic-transport==9.2.1
# via elasticsearch
elasticsearch==9.3.0
elasticsearch[requests]==9.3.0
# via ocdsindex
h11==0.16.0
# via
Expand All @@ -63,10 +66,21 @@ jinja2==3.1.6
# via
# myst-parser
# sphinx
jscc==0.5.0
# via sphinxcontrib-opendataservices-jsonschema
json-merge-patch==0.2
# via ocdsextensionregistry
# via
# jscc
# ocdsextensionregistry
jsonpointer==3.1.1
# via
# sphinxcontrib-opendataservices
# sphinxcontrib-opendataservices-jsonschema
jsonref==1.0.0.post1
# via ocdsextensionregistry
# via
# jscc
# ocdsextensionregistry
# sphinxcontrib-opendataservices-jsonschema
linkify-it-py==1.0.1
# via -r common-requirements.in
lxml==6.1.0
Expand All @@ -84,7 +98,10 @@ mdurl==0.1.2
mypy-extensions==1.1.0
# via trio-typing
myst-parser==0.18.1
# via -r common-requirements.in
# via
# -r common-requirements.in
# sphinxcontrib-opendataservices
# sphinxcontrib-opendataservices-jsonschema
ocds-babel==0.3.7
# via -r common-requirements.in
ocdsextensionregistry==0.6.5
Expand Down Expand Up @@ -116,18 +133,21 @@ python-dateutil==2.9.0.post0
# via elasticsearch
pyyaml==6.0.1
# via myst-parser
referencing==0.37.0
# via sphinxcontrib-opendataservices-jsonschema
requests==2.33.0
# via
# elasticsearch
# jscc
# ocdsextensionregistry
# requests-cache
# sphinx
requests-cache==1.1.0
# via ocdsextensionregistry
rpds-py==2026.6.3
# via referencing
selenium==4.40.0
# via -r common-requirements.in
setuptools==84.0.0
# via sphinx-intl
six==1.16.0
# via
# python-dateutil
Expand All @@ -147,6 +167,7 @@ sphinx==5.3.0
# myst-parser
# sphinx-autobuild
# sphinx-intl
# sphinxcontrib-opendataservices
sphinx-autobuild==2024.9.3
# via -r common-requirements.in
sphinx-intl==2.2.0
Expand All @@ -159,12 +180,16 @@ sphinxcontrib-htmlhelp==2.0.0
# via sphinx
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-opendataservices==0.6.0
# via -r common-requirements.in
sphinxcontrib-opendataservices-jsonschema==0.7.1
# via
# -r common-requirements.in
# sphinxcontrib-opendataservices
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@open_contracting
# via -r common-requirements.in
starlette==1.3.1
# via sphinx-autobuild
trio==0.32.0
Expand All @@ -182,15 +207,18 @@ types-urllib3==1.26.25.14
# via selenium
typing-extensions==4.15.0
# via
# anyio
# elasticsearch
# myst-parser
# referencing
# selenium
# starlette
# trio-typing
uc-micro-py==1.0.1
# via linkify-it-py
url-normalize==1.4.3
# via requests-cache
urllib3==2.7.0
urllib3[socks]==2.8.0
# via
# elastic-transport
# requests
Expand Down
Binary file removed docs/_static/favicon-16x16.ico
Binary file not shown.
10 changes: 1 addition & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from glob import glob
from pathlib import Path

import standard_theme
from docutils.nodes import make_id
from ocds_babel.translate import translate
from sphinx.locale import get_translation
Expand Down Expand Up @@ -41,8 +40,6 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "standard_theme" # 'pydata_sphinx_theme'
html_theme_path = [standard_theme.get_html_theme_path()]
html_favicon = "_static/favicon-16x16.ico"
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"]
Expand All @@ -59,7 +56,7 @@
gettext_compact = False
# `DOMAIN_PREFIX` from `config.mk`.
gettext_domain_prefix = f"{profile_identifier}-" if profile_identifier else ""
locale_dirs = ["locale/", os.path.join(standard_theme.get_html_theme_path(), "locale")]
locale_dirs = ["locale/"]
# We use single quotes for codes, which docutils will change to double quotes.
# https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/docutils/utils/smartquotes.py
smartquotes = False
Expand All @@ -78,13 +75,8 @@
"analytics_id": "YEWDOOEQ",
"display_version": True,
"root_url": f"/{profile_identifier}" if profile_identifier else "",
# Relative to the version's directory, so that one value serves the live and staging copies.
"versions_url": "../versions.json",
"languages": {"en": "English", "es": "Español"},
"short_project": "OC4IDS",
"copyright": copyright,
"license_name": "Apache License 2.0",
"license_url": f"{repository_url}/blob/HEAD/LICENSE",
"repository_url": repository_url,
}
html_short_title = f"{html_theme_options['short_project']} v{release}"
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
"date": "2024-05-01T00:00:00Z",
"lifeCycleCosting": {
"value": {
"amount": 10000000,
"amount": 60000000,
"currency": "USD"
}
},
Expand All @@ -245,7 +245,7 @@
{
"id": "1",
"value": {
"amount": 50000000,
"amount": 5000000,
"currency": "USD"
},
"classification": {
Expand Down
6 changes: 6 additions & 0 deletions docs/reference/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [X.X.X] - YYYY-MM-DD

### Documentation

* [#287](https://github.com/open-contracting/infrastructure/pull/522) - correct `costMeasurements` so that the sum of cost groups is less than `lifeCycleCosting` in example file.

## [0.9.5] - 2025-04-02

### Documentation
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
-r common-requirements.txt
-r theme-requirements.txt

# Add your own requirements below.

sphinxcontrib-opencontracting==0.0.8
sphinxcontrib-opendataservices-jsonschema==0.7.1
sphinxcontrib-opendataservices==0.5.0
sphinx-design

# Build
Expand Down
2 changes: 1 addition & 1 deletion script/update
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ 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/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
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 include/common.mk include/prologue.mk script/diff script/update tests/conftest.py tests/test_common.py theme-requirements.txt; do
curl -sS -o $f https://raw.githubusercontent.com/open-contracting/standard_profile_template/refs/heads/latest/$f
done

Expand Down
2 changes: 1 addition & 1 deletion tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_search(browser, server, lang, regex):
# This seems to be an issue in Selenium and/or ChromeDriver.
@pytest.mark.filterwarnings("ignore:unclosed <socket.socket fd=:ResourceWarning")
def test_language_switcher(browser, server):
if "localhost" in server:
if "localhost" in server or len(languages) < 2:
pytest.skip()

browser.get(f"{server}en/")
Expand Down
2 changes: 2 additions & 0 deletions theme-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Not compiled, so that the theme tracks the branch instead of a commit.
git+https://github.com/open-contracting/standard_theme.git@open_contracting#egg=standard_theme
Loading