Skip to content

Commit 40b5573

Browse files
authored
Merge pull request #486 from open-contracting/0.9-dev
0.9.5: Merge the development branch onto the live branch
2 parents 7b50757 + 2915670 commit 40b5573

File tree

99 files changed

+25880
-5162
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+25880
-5162
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,13 @@ name: CI
22
on: [push, pull_request]
33
jobs:
44
build:
5-
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
6-
runs-on: ubuntu-latest
7-
steps:
8-
- uses: actions/checkout@v4
9-
with:
10-
submodules: true
11-
- uses: actions/setup-python@v5
12-
with:
13-
python-version: '3.10'
14-
cache: pip
15-
cache-dependency-path: '**/requirements*.txt'
16-
# Don't install editable projects in the current working directory.
17-
# https://pip.pypa.io/en/latest/reference/pip_install/#install-src
18-
- run: pip install --src $GITHUB_WORKSPACE/../src -r requirements.txt
19-
- if: github.repository == 'open-contracting/standard_profile_template'
20-
run: make update extract
21-
- run: make
22-
# Disable linkcheck as it is too slow for development.
23-
# - run: |
24-
# make linkcheck
25-
# find . \( -name output.json -o -name output.txt \) -exec rm -r "{}" \;
26-
- run: pytest -W error
27-
# Deploy the built documentation to the staging directory.
28-
- if: github.event_name == 'push'
29-
uses: shimataro/ssh-key-action@v2
30-
with:
31-
key: ${{ secrets.PRIVATE_KEY }}
32-
known_hosts: standard.open-contracting.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGveFGTJ9yyObNGDUCUyzyFkm6Kzh3YqIt1qB7B/KU6E
33-
- if: github.event_name == 'push'
34-
uses: bcomnes/netrc-creds@v2
35-
with:
36-
machine: standard.open-contracting.org
37-
login: manage
38-
password: ${{ secrets.ELASTICSEARCH_PASSWORD }}
39-
- if: github.event_name == 'push' && success() && github.repository != 'open-contracting/standard_profile_template'
40-
env:
41-
PATH_PREFIX: infrastructure/
42-
PRODUCTION: ${{ startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/latest' || github.ref == 'refs/heads/0.9' }}
43-
RELEASE: ${{ startsWith(github.ref, 'refs/tags') }}
44-
VERSION: "0.9"
45-
shell: bash
46-
run: curl -sS https://raw.githubusercontent.com/open-contracting/deploy/main/deploy-docs.sh | bash -
5+
uses: open-contracting/.github/.github/workflows/ci-profile.yml@main
6+
secrets:
7+
private-key: ${{ secrets.PRIVATE_KEY }}
8+
elasticsearch-password: ${{ secrets.ELASTICSEARCH_PASSWORD }}
9+
with:
10+
path-prefix: infrastructure/
11+
version: '0.9'
12+
production-refs: '["refs/heads/0.9"]'
13+
# Linkcheck is slow for development.
14+
linkcheck: false

.github/workflows/js.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
name: Lint JavaScript
22
on: [push, pull_request]
33
jobs:
4-
build:
5-
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
6-
runs-on: ubuntu-latest
7-
steps:
8-
- uses: actions/checkout@v4
9-
- uses: actions/setup-node@v4
10-
with:
11-
node-version: 18
12-
- run: npm install standard
13-
- run: npx standard docs/_static/json-example-format.js
4+
lint:
5+
uses: open-contracting/.github/.github/workflows/js.yml@main
6+
with:
7+
filenames: docs/_static/json-example-format.js

.github/workflows/lint.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
name: Lint
22
on: [push, pull_request]
3-
env:
4-
BASEDIR: https://raw.githubusercontent.com/open-contracting/standard-maintenance-scripts/main
53
jobs:
6-
build:
7-
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
8-
runs-on: ubuntu-latest
9-
steps:
10-
- uses: actions/checkout@v4
11-
- uses: actions/setup-python@v5
12-
with:
13-
python-version: '3.10'
14-
cache: pip
15-
cache-dependency-path: '**/requirements*.txt'
16-
- shell: bash
17-
run: curl -s -S --retry 3 $BASEDIR/tests/install.sh | bash -
18-
- shell: bash
19-
run: curl -s -S --retry 3 $BASEDIR/tests/script.sh | bash -
4+
lint:
5+
uses: open-contracting/.github/.github/workflows/lint.yml@main
6+
permissions:
7+
contents: write
8+
secrets:
9+
personal-access-token: ${{ secrets.PAT }}
10+
with:
11+
python-version: '3.10'

.github/workflows/shell.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
name: Lint Shell
22
on: [push, pull_request]
33
jobs:
4-
build:
5-
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
6-
runs-on: ubuntu-latest
7-
steps:
8-
- uses: actions/checkout@v4
9-
- name: Install shellcheck
10-
run: |
11-
sudo apt update
12-
sudo apt install shellcheck
13-
- run: sudo snap install shfmt
14-
- run: shellcheck $(shfmt -f .)
15-
- run: shfmt -d -i 4 -sr $(shfmt -f .)
4+
lint:
5+
uses: open-contracting/.github/.github/workflows/shell.yml@main

.github/workflows/spellcheck.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
name: Spell-check
22
on: [push, pull_request]
33
jobs:
4-
build:
5-
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
6-
runs-on: ubuntu-latest
7-
steps:
8-
- uses: actions/checkout@v4
9-
- uses: actions/setup-python@v5
10-
with:
11-
python-version: '3.10'
12-
- run: pip install codespell
13-
- run: codespell -S .git,docson,locale,country.csv,currency.csv -L fo,tne,zar .
4+
lint:
5+
uses: open-contracting/.github/.github/workflows/spellcheck.yml@main
6+
with:
7+
ignore: fo,tne,zar
8+
skip: docson,locale,country.csv,currency.csv

.pre-commit-config.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
ci:
2+
autoupdate_schedule: quarterly
3+
skip: [pip-compile]
4+
default_language_version:
5+
python: python3.10
6+
repos:
7+
- repo: https://github.com/astral-sh/ruff-pre-commit
8+
rev: v0.8.6
9+
hooks:
10+
- id: ruff
11+
- id: ruff-format
12+
- repo: https://github.com/astral-sh/uv-pre-commit
13+
rev: 0.5.14
14+
hooks:
15+
- id: pip-compile
16+
name: pip-compile common-requirements.in
17+
args: [common-requirements.in, -o, common-requirements.txt]
18+
files: ^common-requirements\.(in|txt)$

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10

0 commit comments

Comments
 (0)