Skip to content

Commit 850534d

Browse files
committed
Merge branch 'main' into no-ocds-show-merge
Non-merge changes: - Add server_url to submit_file, to encapsulate environment variables in tests/conftest.py and tests/__init__.py - Remove mocks from test_flattentool_warnings and fix assertions to match template text - Revert these changes from accidental commit 6910617, to get tests passing: - A tests/test_util.py - A tests/test_validation_errors.py - D tests/fixtures/tenders_releases_2_releases_with_deprecated_fields.json - D tests/fixtures/release_package_schema_ref_release_schema_deprecated_fields.json Resolve conflicts: - test_functional.py: Change modal tests to new maximum length - test_view.py: - Use HTTP status codes - An invalid version has no special logic - Remove flattening JSON, changing version, releases/records table, KFI table, error sampling - Remove test_styles_500_error (handler500 was removed in 90e5bde along with test_500_error)
2 parents f79d9b7 + 7034325 commit 850534d

21 files changed

+1048
-1608
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: CI
22
on: [push, pull_request]
3+
permissions:
4+
contents: read
35
jobs:
46
build:
57
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
@@ -15,6 +17,7 @@ jobs:
1517
# Check requirements.txt contains production requirements.
1618
- run: ./manage.py --help
1719
- run: pip install -r requirements_dev.txt
20+
- run: playwright install chromium
1821
- name: Install gettext
1922
run: |
2023
sudo apt update

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ default_language_version:
55
python: python3.11
66
repos:
77
- repo: https://github.com/astral-sh/ruff-pre-commit
8-
rev: v0.6.9
8+
rev: v0.8.6
99
hooks:
1010
- id: ruff
1111
- id: ruff-format
1212
- repo: https://github.com/astral-sh/uv-pre-commit
13-
rev: 0.4.18
13+
rev: 0.5.14
1414
hooks:
1515
- id: pip-compile
1616
name: pip-compile requirements.in

.readthedocs.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
version: 2
22
build:
3-
os: ubuntu-20.04
3+
os: ubuntu-lts-latest
44
tools:
5-
python: "3.11"
5+
python: "3"
66
python:
77
install:
88
- requirements: docs/requirements.txt
99
sphinx:
10+
configuration: docs/conf.py
1011
fail_on_warning: true

cove_ocds/templates/base.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
{% get_current_language as LANGUAGE_CODE %}
66
<html lang="{{ LANGUAGE_CODE }}">
77
<head>
8+
<meta charset="utf8">
89
<meta http-equiv="X-UA-Compatible" content="IE=edge">
910
<link rel="shortcut icon" href="{% static 'favicon.ico' %}">
1011
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">

docs/conf.py

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,37 @@
11
# Configuration file for the Sphinx documentation builder.
22
#
3-
# This file only contains a selection of the most common options. For a full
4-
# list see the documentation:
3+
# For the full list of built-in configuration values, see the documentation:
54
# https://www.sphinx-doc.org/en/master/usage/configuration.html
65

7-
# -- Path setup --------------------------------------------------------------
8-
9-
# If extensions (or modules to document with autodoc) are in another directory,
10-
# add these directories to sys.path here. If the directory is relative to the
11-
# documentation root, use os.path.abspath to make it absolute, like shown here.
12-
13-
import os
146
import sys
7+
from pathlib import Path
158

16-
sys.path.insert(0, os.path.abspath(".."))
17-
9+
sys.path.insert(0, str(Path(__file__).parent.parent))
1810

1911
# -- Project information -----------------------------------------------------
12+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
2013

2114
project = "OCDS Data Review Tool"
2215
copyright = "2020, Open Contracting Partnership and Open Data Services Co-operative Limited"
2316
author = "Open Contracting Partnership and Open Data Services Co-operative Limited"
2417

25-
2618
# -- General configuration ---------------------------------------------------
19+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
2720

28-
# Add any Sphinx extension module names here, as strings. They can be
29-
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
30-
# ones.
3121
extensions = [
3222
"sphinx.ext.autodoc",
3323
"sphinx.ext.viewcode",
3424
]
3525

36-
# Add any paths that contain templates here, relative to this directory.
3726
templates_path = ["_templates"]
38-
39-
# List of patterns, relative to source directory, that match files and
40-
# directories to ignore when looking for source files.
41-
# This pattern also affects html_static_path and html_extra_path.
4227
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
4328

44-
4529
# -- Options for HTML output -------------------------------------------------
30+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
4631

47-
# The theme to use for HTML and HTML Help pages. See the documentation for
48-
# a list of builtin themes.
49-
#
5032
html_theme = "furo"
51-
52-
# Add any paths that contain custom static files (such as style sheets) here,
53-
# relative to this directory. They are copied after the builtin static files,
54-
# so a file named "default.css" will overwrite the builtin "default.css".
5533
html_static_path = []
5634

57-
5835
# -- Extension configuration -------------------------------------------------
5936

6037
autodoc_default_options = {

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ ignore-variadic-names = true
3131

3232
[tool.ruff.lint.per-file-ignores]
3333
"docs/*" = ["D100", "INP001"]
34+
"manage.py" = ["PLC0415"]
3435
"{*/signals,*/views,*/migrations/*}.py" = ["ARG001"]
3536
"{*/admin,*/routers,*/views,*/commands/*}.py" = ["ARG002"]
3637
"{*/admin,*/forms,*/models,*/routers,*/migrations/*,tests/*}.py" = ["RUF012"]

requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
django
1+
django<5
22
django-bootstrap3
33
flattentool
44
gunicorn[setproctitle]

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ contextlib2==0.6.0.post1
3030
# via schema
3131
defusedxml==0.7.1
3232
# via odfpy
33-
django==4.2.17
33+
django==4.2.23
3434
# via
3535
# -r requirements.in
3636
# django-bootstrap3
@@ -126,7 +126,7 @@ sentry-sdk==2.8.0
126126
# via -r requirements.in
127127
setproctitle==1.3.3
128128
# via gunicorn
129-
setuptools==75.6.0
129+
setuptools==80.9.0
130130
# via
131131
# zc-lockfile
132132
# zc-zlibstorage
@@ -150,7 +150,7 @@ urllib3==2.2.2
150150
# sentry-sdk
151151
webencodings==0.5.1
152152
# via bleach
153-
werkzeug==3.0.6
153+
werkzeug==3.1.3
154154
# via -r requirements.in
155155
xmltodict==0.12.0
156156
# via flattentool

requirements_dev.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
-r requirements.txt
22
coverage
3+
cssselect
34
flattentool>=0.14.0
45
hypothesis
56
libsass
7+
playwright
68
pytest
79
pytest-django
810
pytest-localserver
9-
selenium

requirements_dev.txt

Lines changed: 14 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,14 @@ asgiref==3.8.1
44
# via
55
# -r requirements.txt
66
# django
7-
async-generator==1.10
8-
# via trio
97
attrs==23.1.0
108
# via
119
# -r requirements.txt
1210
# cattrs
1311
# hypothesis
1412
# jsonschema
15-
# outcome
1613
# referencing
1714
# requests-cache
18-
# trio
1915
backports-datetime-fromisoformat==1.0.0
2016
# via
2117
# -r requirements.txt
@@ -34,7 +30,6 @@ certifi==2024.7.4
3430
# via
3531
# -r requirements.txt
3632
# requests
37-
# selenium
3833
# sentry-sdk
3934
cffi==1.14.5
4035
# via
@@ -54,11 +49,13 @@ contextlib2==0.6.0.post1
5449
# schema
5550
coverage==7.6.1
5651
# via -r requirements_dev.in
52+
cssselect==1.3.0
53+
# via -r requirements_dev.in
5754
defusedxml==0.7.1
5855
# via
5956
# -r requirements.txt
6057
# odfpy
61-
django==4.2.17
58+
django==4.2.23
6259
# via
6360
# -r requirements.txt
6461
# django-bootstrap3
@@ -68,24 +65,21 @@ et-xmlfile==1.1.0
6865
# via
6966
# -r requirements.txt
7067
# openpyxl
71-
exceptiongroup==1.2.2
72-
# via trio-websocket
7368
flattentool==0.26.0
7469
# via
7570
# -r requirements.txt
7671
# -r requirements_dev.in
7772
# libcove
73+
greenlet==3.2.3
74+
# via playwright
7875
gunicorn==23.0.0
7976
# via -r requirements.txt
80-
h11==0.14.0
81-
# via wsproto
8277
hypothesis==6.72.4
8378
# via -r requirements_dev.in
8479
idna==3.7
8580
# via
8681
# -r requirements.txt
8782
# requests
88-
# trio
8983
ijson==3.1.4
9084
# via
9185
# -r requirements.txt
@@ -148,8 +142,6 @@ openpyxl==3.0.7
148142
# flattentool
149143
orjson==3.9.15
150144
# via -r requirements.txt
151-
outcome==1.2.0
152-
# via trio
153145
packaging==24.1
154146
# via
155147
# -r requirements.txt
@@ -164,14 +156,16 @@ platformdirs==3.8.1
164156
# via
165157
# -r requirements.txt
166158
# requests-cache
159+
playwright==1.54.0
160+
# via -r requirements_dev.in
167161
pluggy==0.13.1
168162
# via pytest
169163
pycparser==2.20
170164
# via
171165
# -r requirements.txt
172166
# cffi
173-
pysocks==1.7.1
174-
# via urllib3
167+
pyee==13.0.0
168+
# via playwright
175169
pytest==7.4.0
176170
# via
177171
# -r requirements_dev.in
@@ -219,13 +213,11 @@ schema==0.7.4
219213
# via
220214
# -r requirements.txt
221215
# flattentool
222-
selenium==4.11.2
223-
# via -r requirements_dev.in
224216
sentry-sdk==2.8.0
225217
# via -r requirements.txt
226218
setproctitle==1.3.3
227219
# via -r requirements.txt
228-
setuptools==75.6.0
220+
setuptools==80.9.0
229221
# via
230222
# -r requirements.txt
231223
# zc-lockfile
@@ -239,12 +231,8 @@ six==1.16.0
239231
# libsass
240232
# rfc3339-validator
241233
# url-normalize
242-
sniffio==1.3.0
243-
# via trio
244234
sortedcontainers==2.4.0
245-
# via
246-
# hypothesis
247-
# trio
235+
# via hypothesis
248236
sqlparse==0.5.0
249237
# via
250238
# -r requirements.txt
@@ -253,12 +241,8 @@ transaction==3.0.1
253241
# via
254242
# -r requirements.txt
255243
# zodb
256-
trio==0.22.0
257-
# via
258-
# selenium
259-
# trio-websocket
260-
trio-websocket==0.10.2
261-
# via selenium
244+
typing-extensions==4.14.1
245+
# via pyee
262246
url-normalize==1.4.3
263247
# via
264248
# -r requirements.txt
@@ -268,18 +252,15 @@ urllib3==2.2.2
268252
# -r requirements.txt
269253
# requests
270254
# requests-cache
271-
# selenium
272255
# sentry-sdk
273256
webencodings==0.5.1
274257
# via
275258
# -r requirements.txt
276259
# bleach
277-
werkzeug==3.0.6
260+
werkzeug==3.1.3
278261
# via
279262
# -r requirements.txt
280263
# pytest-localserver
281-
wsproto==1.2.0
282-
# via trio-websocket
283264
xmltodict==0.12.0
284265
# via
285266
# -r requirements.txt

0 commit comments

Comments
 (0)