Skip to content

Commit 1c2e2f5

Browse files
committed
Fix old Poetry config, use new dev container, run formatting
1 parent 700ceee commit 1c2e2f5

170 files changed

Lines changed: 199277 additions & 45444 deletions

File tree

Some content is hidden

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

.devcontainer/docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: '3.7'
21
services:
32
web:
43
volumes:

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ OHOS_ROSETTA_CLIENT_BASE_URL=
1313
FEATURE_GEO_LAT=
1414
FEATURE_GEO_LON=
1515
FEATURE_GEO_ZOOM=
16+
PLATFORMSH_CLI_TOKEN=

.eslintrc.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,9 @@ module.exports = {
2222
sourceType: "module",
2323
},
2424
rules: {},
25-
ignorePatterns: ["templates/static/scripts/**/*.js", ".*.js", "*.config.js"],
25+
ignorePatterns: [
26+
"templates/static/scripts/**/*.js",
27+
".*.js",
28+
"*.config.js",
29+
],
2630
};

.github/workflows/_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
run: poetry run coverage run manage.py test etna
7777
- name: Check for missing migrations
7878
run: poetry run python manage.py makemigrations --check --noinput
79-
79+
8080
prettier:
8181
name: Prettier format
8282
runs-on: ubuntu-latest

.github/workflows/check-migrations.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Check Migrations
33
on:
44
pull_request:
55
paths:
6-
- 'etna/*/migrations/**'
6+
- "etna/*/migrations/**"
77

88
jobs:
99
check-migrations:
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Python
1818
uses: actions/setup-python@v2
1919
with:
20-
python-version: '3.10'
20+
python-version: "3.10"
2121

2222
- name: Check migrations
23-
run: python .github/scripts/check_migrations.py
23+
run: python .github/scripts/check_migrations.py

.github/workflows/create-release-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Create pull request
3636
run: gh pr create -B ${{ steps.extract_branch.outputs.BRANCH }} -H "release/v${{ steps.version-tag.outputs.CALVER }}" --title "Version ${{ steps.version-tag.outputs.CALVER }}" --body "Created by Github action https://github.com/nationalarchives/ds-wagtail/actions/runs/${{ github.run_id }}" --no-maintainer-edit
3737
env:
38-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3939
# - name: Merge the pull request
4040
# run: gh pr merge "release/v${{ steps.version-tag.outputs.CALVER }}" --admin --merge
4141
# env:

.github/workflows/platformsh-cd-ohos.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ on:
77
- ohos
88
paths:
99
# Host config
10-
- '.plaform/**'
11-
- '.platform.app.yaml'
12-
- 'gunicorn.conf.py'
10+
- ".plaform/**"
11+
- ".platform.app.yaml"
12+
- "gunicorn.conf.py"
1313
# Python config
14-
- 'poetry.lock'
15-
- 'pyproject.toml'
14+
- "poetry.lock"
15+
- "pyproject.toml"
1616
# NPM config
17-
- 'package.json'
18-
- 'package-lock.json'
19-
- 'webpack.config.js'
17+
- "package.json"
18+
- "package-lock.json"
19+
- "webpack.config.js"
2020
# App changes
21-
- 'config/**'
22-
- 'sass/**'
23-
- 'scripts/**'
24-
- 'templates/**'
25-
- 'etna/**'
21+
- "config/**"
22+
- "sass/**"
23+
- "scripts/**"
24+
- "templates/**"
25+
- "etna/**"
2626

2727
jobs:
2828
ci:

.github/workflows/remove-untagged.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ jobs:
2626
// const deleteResponse = await github.request("DELETE /orgs/${{ github.repository_owner }}/packages/container/${{ vars.DOCKER_IMAGE_NAME }}/versions/" + version.id, { });
2727
// console.log("status " + deleteResponse.status)
2828
}
29-
}
29+
}

.platform.app.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ name: app
77
# in multiple versions. Check the Python documentation
88
# (https://docs.platform.sh/languages/python.html#supported-versions)
99
# to find the supported versions for the 'python' type.
10-
type: 'python:3.12'
10+
type: "python:3.12"
1111

1212
dependencies:
1313
python3:
14-
poetry: '1.8.1'
14+
poetry: "1.8.1"
1515

1616
variables:
1717
env:
18-
DJANGO_SETTINGS_MODULE: 'config.settings.platform'
18+
DJANGO_SETTINGS_MODULE: "config.settings.platform"
1919
# pip
2020
POETRY_VIRTUALENVS_IN_PROJECT: true
2121
POETRY_VIRTUALENVS_CREATE: true
@@ -30,14 +30,14 @@ disk: 4096
3030
# to the application in the PLATFORM_RELATIONSHIPS variable. The right-hand
3131
# side is in the form <service name>:<endpoint name>.
3232
relationships:
33-
db: 'db:postgresql'
34-
redis: "redis:redis"
33+
db: "db:postgresql"
34+
redis: "redis:redis"
3535

3636
hooks:
3737
build: |
3838
# Add platform CLI
3939
curl -sS https://platform.sh/cli/installer | php
40-
40+
4141
# Download the latest version of pip
4242
python3.12 -m pip install --upgrade pip
4343
@@ -49,7 +49,7 @@ hooks:
4949
export NVM_DIR="$PLATFORM_APP_DIR/.nvm"
5050
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
5151
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
52-
52+
5353
nvm install
5454
npm install
5555
mkdir -p templates/static/assets
@@ -72,11 +72,11 @@ web:
7272
allow: false
7373
rules:
7474
'^/favicon\.ico$':
75-
allow: false
75+
allow: false
7676
"/static":
7777
# Allow liberal controls to allow CORS for admin font assets
7878
headers:
79-
Access-Control-Allow-Origin: '*'
79+
Access-Control-Allow-Origin: "*"
8080
root: static
8181
expires: 1y
8282
allow: true
@@ -111,7 +111,7 @@ crons:
111111
# Take snapshot at 5am every morning
112112
# https://docs.platform.sh/administration/snapshot-and-restore.html#automated-snapshots
113113
snapshot:
114-
spec: '0 5 * * *'
114+
spec: "0 5 * * *"
115115
cmd: |
116116
if [ "$PLATFORM_BRANCH" = main ]; then
117117
platform backup:create --yes --no-wait
@@ -120,8 +120,8 @@ crons:
120120
# Renew cert by forcing a redeploy at 4 am (UTC) on the 1st and 15th of every month.
121121
# https://docs.platform.sh/configuration/routes/https.html#automatic-ssl-certificate-renewal
122122
renewcert:
123-
spec: '0 4 1,15 * *'
123+
spec: "0 4 1,15 * *"
124124
cmd: |
125125
if [ "$PLATFORM_BRANCH" = main ]; then
126126
platform redeploy --yes --no-wait
127-
fi
127+
fi

.platform/routes.yaml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
# Each route describes how an incoming URL is going to be processed by Platform.sh.
22

33
"https://{default}/":
4-
type: upstream
5-
upstream: "app:http"
6-
cache:
7-
enabled: false
8-
default_ttl: 300
9-
cookies:
10-
- sessionid
11-
- csrftoken
12-
- messages
13-
- csrftoken
14-
- cookies_policy
15-
- dontShowCookieNotice
16-
- beta_banner_dismissed
17-
headers:
18-
- Accept
19-
- Vary
4+
type: upstream
5+
upstream: "app:http"
6+
cache:
7+
enabled: false
8+
default_ttl: 300
9+
cookies:
10+
- sessionid
11+
- csrftoken
12+
- messages
13+
- csrftoken
14+
- cookies_policy
15+
- dontShowCookieNotice
16+
- beta_banner_dismissed
17+
headers:
18+
- Accept
19+
- Vary
2020

2121
# Redirect www routes to preseve links to old plaform.sh domain
2222
"https://www.{default}/":
23-
type: redirect
24-
to: "https://{default}/"
23+
type: redirect
24+
to: "https://{default}/"

0 commit comments

Comments
 (0)