Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,25 @@ jobs:
env DJANGO_ENV=production python manage.py collectstatic --noinput -v2
- name: Run checks and tests
env:
PYTHONWARNINGS: error,ignore::DeprecationWarning:django.utils.version,ignore::DeprecationWarning:django.http.request,ignore::DeprecationWarning:willow.image,ignore::DeprecationWarning:l18n.translation,ignore:::wagtail.core.signals,ignore:::wagtail.documents.models,ignore:::wagtail.admin.signals,ignore:::wagtail.core.models,ignore:::wagtailtrans.urls.translations,ignore:::wagtailtrans.wagtail_hooks
DATABASE_URL: postgresql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres
# https://github.com/open-contracting/digitalbuying/issues/2
PYTHONWARNINGS: ignore
DATABASE_URL: mysql://root:root@127.0.0.1:${{ job.services.mysql.ports[3306] }}/mysql
shell: bash
run: |
./manage.py migrate
./manage.py makemigrations --check --dry-run
./manage.py makemigrations --check --dry-run base case_studies guidelines modules navigation sponsors streams
./manage.py check --fail-level WARNING
coverage run --source ictcg manage.py test
coverage run --source ictcg,base,case_studies,guidelines,modules,navigation,sponsors,streams manage.py test
- uses: coverallsapp/github-action@v2
services:
postgres:
image: postgres:15
mysql:
image: mysql:8.0
env:
POSTGRES_PASSWORD: postgres
MYSQL_ROOT_PASSWORD: root
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=5
ports:
- 5432/tcp
- 3306/tcp
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ repos:
rev: v16.12.0
hooks:
- id: stylelint
additional_dependencies:
- stylelint@16.12.0
- stylelint-config-standard@36.0.1
- stylelint-config-standard-scss@14.0.0
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Setup

.. code:: bash

createdb digitalbuyingguide
mysql -u root -e "create database digitalbuying"
npm install
pip install -r requirements.txt
./manage.py migrate
Expand Down
6 changes: 6 additions & 0 deletions case_studies/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class ModulesConfig(AppConfig):
name = "case_studies"
default_auto_field = "django.db.models.AutoField"
10 changes: 1 addition & 9 deletions ictcg/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@
# https://docs.wagtail.org/en/stable/reference/contrib/legacy_richtext.html
"wagtail.contrib.legacy.richtext",
"wagtail.core",
# https://docs.wagtail.org/en/v2.14.2/reference/contrib/postgres_search.html#postgres-search
"wagtail.contrib.postgres_search",
# https://docs.wagtail.org/en/stable/reference/contrib/settings.html
"wagtail.contrib.settings",
# https://docs.wagtail.org/en/v5.2.7/reference/contrib/modeladmin/index.html
Expand Down Expand Up @@ -129,7 +127,7 @@
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases

DATABASES = {
"default": dj_database_url.config(default="postgresql:///digitalbuyingguide?application_name=digitalbuyingguide"),
"default": dj_database_url.config(default="mysql://root@127.0.0.1/digitalbuying"),
}


Expand Down Expand Up @@ -287,12 +285,6 @@
# https://docs.wagtail.org/en/stable/releases/3.0.html#other-features
BASE_URL = "https://digitalbuying.open-contracting.org"

WAGTAILSEARCH_BACKENDS = {
"default": {
"BACKEND": "wagtail.contrib.postgres_search.backend",
},
}

# https://wagtailtrans.readthedocs.io/en/latest/settings.html
WAGTAILTRANS_HIDE_TRANSLATION_TREES = True

Expand Down
1 change: 1 addition & 0 deletions modules/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@

class ModulesConfig(AppConfig):
name = "modules"
default_auto_field = "django.db.models.AutoField"
6 changes: 6 additions & 0 deletions navigation/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class ModulesConfig(AppConfig):
name = "navigation"
default_auto_field = "django.db.models.AutoField"
4 changes: 2 additions & 2 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ dj-database-url
django
django-modelcluster
django-taggit
psycopg2
mysqlclient
redis[hiredis]
sentry-sdk
wagtail==2.11.9
wagtail<2.16
git+https://github.com/carrotandcompany/wagtailtrans@master#egg=wagtailtrans
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ charset-normalizer==3.4.1
# via requests
dj-database-url==0.5.0
# via -r requirements.in
django==3.1.14
django==3.2.25
# via
# -r requirements.in
# django-filter
Expand Down Expand Up @@ -48,12 +48,12 @@ idna==3.10
# via requests
l18n==2021.3
# via wagtail
mysqlclient==2.2.7
# via -r requirements.in
openpyxl==3.1.5
# via tablib
pillow==9.5.0
# via wagtail
psycopg2==2.9.10
# via -r requirements.in
pytz==2024.2
# via
# django
Expand All @@ -75,13 +75,13 @@ sqlparse==0.5.3
# via django
tablib==3.6.1
# via wagtail
unidecode==1.3.8
telepath==0.3.1
# via wagtail
urllib3==1.26.20
# via
# requests
# sentry-sdk
wagtail==2.11.9
wagtail==2.15.6
# via
# -r requirements.in
# wagtailtrans
Expand Down
1 change: 0 additions & 1 deletion requirements_dev.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
-r requirements.txt
coverage
psycopg2-binary
12 changes: 5 additions & 7 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ coverage==7.6.10
# via -r requirements_dev.in
dj-database-url==0.5.0
# via -r requirements.txt
django==3.1.14
django==3.2.25
# via
# -r requirements.txt
# django-filter
Expand Down Expand Up @@ -75,6 +75,8 @@ l18n==2021.3
# via
# -r requirements.txt
# wagtail
mysqlclient==2.2.7
# via -r requirements.txt
openpyxl==3.1.5
# via
# -r requirements.txt
Expand All @@ -83,10 +85,6 @@ pillow==9.5.0
# via
# -r requirements.txt
# wagtail
psycopg2==2.9.10
# via -r requirements.txt
psycopg2-binary==2.9.10
# via -r requirements_dev.in
pytz==2024.2
# via
# -r requirements.txt
Expand Down Expand Up @@ -118,7 +116,7 @@ tablib==3.6.1
# via
# -r requirements.txt
# wagtail
unidecode==1.3.8
telepath==0.3.1
# via
# -r requirements.txt
# wagtail
Expand All @@ -127,7 +125,7 @@ urllib3==1.26.20
# -r requirements.txt
# requests
# sentry-sdk
wagtail==2.11.9
wagtail==2.15.6
# via
# -r requirements.txt
# wagtailtrans
Expand Down
1 change: 1 addition & 0 deletions sponsors/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@

class SponsorsConfig(AppConfig):
name = "sponsors"
default_auto_field = "django.db.models.AutoField"