Skip to content

Commit

Permalink
chore: Run script/update
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Jan 29, 2025
1 parent 4e10416 commit adc8b11
Show file tree
Hide file tree
Showing 15 changed files with 166 additions and 127 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
24 changes: 8 additions & 16 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
name: Lint
on: [push, pull_request]
env:
BASEDIR: https://raw.githubusercontent.com/open-contracting/standard-maintenance-scripts/main
jobs:
build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: pip
cache-dependency-path: '**/requirements*.txt'
- shell: bash
run: curl -s -S --retry 3 $BASEDIR/tests/install.sh | bash -
- shell: bash
run: curl -s -S --retry 3 $BASEDIR/tests/script.sh | bash -
lint:
uses: open-contracting/.github/.github/workflows/lint.yml@main
permissions:
contents: write
secrets:
personal-access-token: ${{ secrets.PAT }}
with:
python-version: '3.10'
14 changes: 2 additions & 12 deletions .github/workflows/shell.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
name: Lint Shell
on: [push, pull_request]
jobs:
build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install shellcheck
run: |
sudo apt update
sudo apt install shellcheck
- run: sudo snap install shfmt
- run: shellcheck $(shfmt -f .)
- run: shfmt -d -i 4 -sr $(shfmt -f .)
lint:
uses: open-contracting/.github/.github/workflows/shell.yml@main
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
/*.pdf
/build
/cache.sqlite
/chromedriver
/chromedriver_linux64.zip
/chromedriver_mac64.zip
/chromedriver_win32.zip
/docs/_static/patched
/src
*.pyc
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.8.6
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.5.14
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
1 change: 0 additions & 1 deletion common-requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ selenium

# Development
click
pip-tools
sphinx-autobuild
122 changes: 61 additions & 61 deletions common-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,42 @@
# 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
# trio-websocket
attrs==20.3.0
attrs==23.1.0
# via
# cattrs
# outcome
# pytest
# requests-cache
# trio
babel==2.9.1
# via
# sphinx
# sphinx-intl
build==0.10.0
# via pip-tools
certifi==2022.12.7
cattrs==23.1.2
# via requests-cache
certifi==2024.7.4
# via
# elastic-transport
# requests
# urllib3
cffi==1.15.0
# via cryptography
# selenium
charset-normalizer==3.1.0
# via requests
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
cryptography==41.0.1
# via
# pyopenssl
# urllib3
docutils==0.18
# via
# myst-parser
Expand All @@ -46,15 +46,20 @@ elastic-transport==8.4.0
# via elasticsearch
elasticsearch==8.6.2
# via ocdsindex
exceptiongroup==1.0.0
# via pytest
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
# urllib3
imagesize==1.4.1
# via sphinx
iniconfig==1.1.1
Expand All @@ -69,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 @@ -85,61 +88,50 @@ 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.1.12
ocdsextensionregistry==0.6.5
# 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==25.0
# via pip-tools
pip-tools==6.13.0
# via -r common-requirements.in
platformdirs==3.9.1
# via requests-cache
pluggy==0.13.1
# via pytest
pycparser==2.21
# via cffi
pygments==2.13.0
pygments==2.15.1
# via sphinx
pyopenssl==22.0.0
# via urllib3
pyparsing==2.4.7
# via packaging
pyproject-hooks==1.0.0
# via build
pysocks==1.7.1
# via urllib3
pytest==7.2.0
# via -r common-requirements.in
pytz==2021.1
# via babel
pyyaml==5.4.1
pyyaml==6.0.1
# via myst-parser
requests==2.31.0
requests==2.32.2
# via
# elasticsearch
# ocdsextensionregistry
# requests-cache
# sphinx
requests-cache==0.5.2
requests-cache==1.1.0
# via ocdsextensionregistry
selenium==4.1.3
selenium==4.11.2
# via -r common-requirements.in
setuptools==75.8.0
# via
# pip-tools
# sphinx-intl
six==1.15.0
# via livereload
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 @@ -150,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 @@ -166,31 +158,39 @@ 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@5de343d1d8e342b5f2a42c6132db37aebe382e36#egg=standard_theme
# via -r common-requirements.in
starlette==0.40.0
# via sphinx-autobuild
tomli==2.0.1
# via
# build
# pyproject-hooks
# pytest
tornado==6.3.2
# via livereload
# via pytest
trio==0.20.0
# via
# selenium
# trio-websocket
trio-websocket==0.9.2
# via selenium
typing-extensions==4.4.0
# via myst-parser
# via
# anyio
# cattrs
# myst-parser
# uvicorn
uc-micro-py==1.0.1
# via linkify-it-py
urllib3==1.26.5
url-normalize==1.4.3
# via requests-cache
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
10 changes: 5 additions & 5 deletions include/common.mk
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# See https://github.com/datamade/data-making-guidelines

# See http://clarkgrubb.com/makefile-style-guide#phony-target-arg
# See https://clarkgrubb.com/makefile-style-guide#phony-target-arg
FORCE:

# http://blog.jgc.org/2007/06/escaping-comma-and-space-in-gnu-make.html
# https://blog.jgc.org/2007/06/escaping-comma-and-space-in-gnu-make.html
COMMA := ,
SPACE :=
SPACE +=
COMMA_SEPARATED_TRANSLATIONS=$(subst $(SPACE),$(COMMA),$(TRANSLATIONS:.%=%))

# See http://clarkgrubb.com/makefile-style-guide#phony-targets
# See https://clarkgrubb.com/makefile-style-guide#phony-targets
.PHONY: clean
clean:
rm -rf $(BUILD_DIR)
Expand Down Expand Up @@ -45,7 +45,7 @@ extract_schema: $(POT_DIR)

# The codelist CSV files and JSON Schema files must be present for the `csv-table-no-translate` and `jsonschema`
# directives to succeed, but the contents of the files have no effect on the generated .pot files.
# See http://www.sphinx-doc.org/en/stable/builders.html#sphinx.builders.gettext.MessageCatalogBuilder
# See https://www.sphinx-doc.org/en/master/usage/builders/index.html#sphinx.builders.gettext.MessageCatalogBuilder
.PHONY: extract_markdown
extract_markdown: current_lang.en
sphinx-build -nW --keep-going -q -b gettext $(DOCS_DIR) $(POT_DIR)
Expand Down Expand Up @@ -110,7 +110,7 @@ clean_current_lang:
### Build

# Build the source documentation.
# See http://www.sphinx-doc.org/en/stable/builders.html#sphinx.builders.html.DirectoryHTMLBuilder
# See https://www.sphinx-doc.org/en/master/usage/builders/index.html#sphinx.builders.html.DirectoryHTMLBuilder
.PHONY: build_source
build_source: current_lang.en
sphinx-build -nW --keep-going -q -b dirhtml $(DOCS_DIR) $(BUILD_DIR)/en
Expand Down
2 changes: 1 addition & 1 deletion include/prologue.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# See http://clarkgrubb.com/makefile-style-guide#prologue
# See https://clarkgrubb.com/makefile-style-guide#prologue
MAKEFLAGS += --warn-undefined-variables
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
Expand Down
Loading

0 comments on commit adc8b11

Please sign in to comment.