Skip to content

Commit

Permalink
Merge branch '1.2-dev' into 1046-strict-schema
Browse files Browse the repository at this point in the history
  • Loading branch information
duncandewhurst committed Oct 23, 2024
2 parents c1865ac + b6fbbbc commit 6948447
Show file tree
Hide file tree
Showing 80 changed files with 9,563 additions and 7,027 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: npm install standard [email protected]
- run: npx standard docs/_static/script.js
- uses: biomejs/setup-biome@v2
- run: biome ci --indent-style=space --line-width=119 docs/_static/script.js
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
7 changes: 3 additions & 4 deletions .github/workflows/shell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install shellcheck
run: |
- run: |
sudo apt update
sudo apt install shellcheck
- run: sudo snap install shfmt
sudo apt install devscripts shellcheck shfmt
- run: checkbashisms $(shfmt -f .)
- run: shellcheck $(shfmt -f .)
- run: shfmt -d -i 4 -sr $(shfmt -f .)
2 changes: 1 addition & 1 deletion .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
with:
python-version: '3.10'
- run: pip install codespell
- run: codespell -S .git,docson,locale,examples,country.csv,currency.csv,language.csv,mediaType.csv -L fo,zar .
- run: codespell -S .git,docson,locale,examples,country.csv,currency.csv,language.csv,mediaType.csv -L fo,sme,zar,SME .
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
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
- 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
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,15 @@ Install [OCDS Kit](https://pypi.org/project/ocdskit/)
Update the examples in `docs/examples/merging`:

```shell
cat docs/examples/merging/updates/{tender*,award*}.json | ocdskit --pretty compile --published-date 2016-03-05T13:02:00Z --uri https://standard.open-contracting.org/examples/records/ocds-213czf-000-00002-merge.json --package --linked-releases > docs/examples/merging/updates/merged.json
cat docs/examples/merging/updates/{tender*,award*}.json | ocdskit --pretty compile --published-date 2016-03-05T13:02:00Z --uri https://standard.open-contracting.org/examples/records/ocds-213czf-000-00002-merge.json --package --linked-releases --versioned > docs/examples/merging/updates/versioned.json
```

```shell
cat docs/examples/merging/deletions/field-tender*.json | ocdskit --pretty compile --package --versioned --schema schema/release-schema.json --published-date 2013-07-30T09:00:10.000Z > docs/examples/merging/deletions/field-record.json
cat docs/examples/merging/deletions/object-tender*.json | ocdskit --pretty compile --package --versioned --schema schema/release-schema.json > docs/examples/merging/deletions/object-record.json
cat docs/examples/merging/deletions/array_award*.json | ocdskit --pretty compile --package --versioned --schema schema/release-schema.json > docs/examples/merging/deletions/array-record.json
cat docs/examples/merging/deletions/field_tender*.json | ocdskit --pretty compile --package --versioned --schema schema/release-schema.json --published-date 2013-07-30T09:00:10.000Z > docs/examples/merging/deletions/field_record.json
cat docs/examples/merging/deletions/object_tender*.json | ocdskit --pretty compile --package --versioned --schema schema/release-schema.json > docs/examples/merging/deletions/object_record.json
cat docs/examples/merging/deletions/array_award*.json | ocdskit --pretty compile --package --versioned --schema schema/release-schema.json > docs/examples/merging/deletions/array_record.json
```

Update the examples in `docs/examples/change_history`:

```shell
cat docs/examples/change_history/{tender}.json | ocdskit --pretty compile --published-date 2010-03-15T09:30:00Z --uri https://standard.open-contracting.org/examples/records/ocds-213czf-000-00001.json --package --versioned --schema schema/release-schema.json > docs/examples/change_history/records/tender.json
cat docs/examples/change_history/tender.json | ocdskit --pretty compile --published-date 2010-03-15T09:30:00Z --uri https://standard.open-contracting.org/examples/records/ocds-213czf-000-00001.json --package --versioned --schema schema/release-schema.json > docs/examples/change_history/records/tender.json
cat docs/examples/change_history/{tender,tenderUpdate}.json | ocdskit --pretty compile --published-date 2010-03-20T09:45:00Z --uri https://standard.open-contracting.org/examples/records/ocds-213czf-000-00001.json --package --versioned --schema schema/release-schema.json > docs/examples/change_history/records/tenderUpdate.json
cat docs/examples/change_history/{tender,tenderUpdate,award}.json | ocdskit --pretty compile --published-date 2010-05-10T09:30:00Z --uri https://standard.open-contracting.org/examples/records/ocds-213czf-000-00001.json --package --versioned --schema schema/release-schema.json > docs/examples/change_history/records/award.json
cat docs/examples/change_history/{tender,tenderUpdate,award,contract}.json | ocdskit --pretty compile --published-date 2010-06-10T10:30:00Z --uri https://standard.open-contracting.org/examples/records/ocds-213czf-000-00001.json --package --versioned --schema schema/release-schema.json > docs/examples/change_history/records/contract.json
Expand Down
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
97 changes: 45 additions & 52 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,33 +34,37 @@ 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
idna==2.10
# via
# uvicorn
# wsproto
idna==3.7
# via
# anyio
# requests
# trio
imagesize==1.4.1
# via sphinx
iniconfig==1.1.1
# via pytest
jinja2==3.1.3
jinja2==3.1.4
# via
# myst-parser
# sphinx
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 @@ -123,7 +114,7 @@ pytz==2021.1
# via babel
pyyaml==6.0.1
# via myst-parser
requests==2.31.0
requests==2.32.2
# via
# elasticsearch
# ocdsextensionregistry
Expand All @@ -133,12 +124,14 @@ requests-cache==1.1.0
# via ocdsextensionregistry
selenium==4.11.2
# via -r common-requirements.in
six==1.15.0
# via
# livereload
# url-normalize
setuptools==75.2.0
# via sphinx-intl
six==1.16.0
# 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,9 +142,9 @@ 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.1.0
sphinx-intl==2.2.0
# via -r common-requirements.in
sphinxcontrib-applehelp==1.0.2
# via sphinx
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.3.3
# 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
Binary file removed docs/_static/png/framework_agreement/model.png
Binary file not shown.
Loading

0 comments on commit 6948447

Please sign in to comment.