Skip to content

Commit

Permalink
Merge pull request #1796 from watchdogpolska/dev_ext
Browse files Browse the repository at this point in the history
v1.5.19
  • Loading branch information
PiotrIw authored Aug 21, 2024
2 parents 9663416 + 2d5fd36 commit e36f9ff
Show file tree
Hide file tree
Showing 20 changed files with 249 additions and 217 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Collect statics
run: docker-compose run web python manage.py collectstatic --noinput
run: docker compose run web python manage.py collectstatic --noinput
- name: Build and run frontend
run: docker-compose up gulp
run: docker compose up gulp
- name: Regenerate frontend
run: make wait_web regenerate_frontend
- name: Show git status
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
lfs: true
- name: Build application
run: docker-compose build web
run: docker compose build web
env:
PYTHON_VERSION: ${{ matrix.python }}
DJANGO_VERSION: ${{ matrix.django }}
Expand All @@ -35,7 +35,7 @@ jobs:
- name: Show settings
run: make settings
- name: Show installed dependencies
run: docker-compose run web pip list
run: docker compose run web pip list
- name: Build test
run: make test
# - name: Send coverage report
Expand All @@ -44,7 +44,7 @@ jobs:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
- name: Show MySQL logs
run: docker-compose logs db
run: docker compose logs db
if: failure()
- name: Show docker process
run: docker ps
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ default_language_version:
minimum_pre_commit_version: "1.20.0"
repos:
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.19.0
rev: 1.20.0
hooks:
- id: django-upgrade
args: [--target-version, "4.2"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
rev: v3.17.0
hooks:
- id: pyupgrade
args:
Expand All @@ -28,7 +28,7 @@ repos:
- --skip-glob
- "**/migrations/*.py"
- repo: https://github.com/sirosen/check-jsonschema
rev: 0.29.0
rev: 0.29.1
hooks:
- id: check-github-workflows
- id: check-readthedocs
Expand All @@ -39,15 +39,15 @@ repos:
args: [-c, .yamllint.yml]
# exclude: (feder/letters/logs/cassettes/.*|docker-compose.yml)
- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black
args:
- --config
- ./pyproject.toml
exclude: '.*/[^/]+/migrations/[^/]+\.py'
- repo: https://github.com/PyCQA/flake8
rev: 7.1.0
rev: 7.1.1
hooks:
- id: flake8
args:
Expand Down
36 changes: 18 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,40 @@ TEST?=feder
.PHONY: docs

clean:
docker-compose down
docker compose down

regenerate_frontend:
docker-compose run web python manage.py collectstatic --noinput
docker-compose up gulp
docker compose run web python manage.py collectstatic --noinput
docker compose up gulp

makemessages:
docker-compose run web python manage.py makemessages --ignore=htmlcov --all
docker compose run web python manage.py makemessages --ignore=htmlcov --all

gulp: regenerate_frontend

build:
docker-compose build web
docker compose build web

start: wait_mysql
docker-compose up
docker compose up --remove-orphans

test:
docker-compose run web coverage run manage.py test --keepdb --verbosity=2 ${TEST}
docker compose run web coverage run manage.py test --keepdb --verbosity=2 ${TEST}

coverage_html:
docker-compose run web coverage html
docker compose run web coverage html

coverage_send:
docker-compose run -e GITHUB_ACTIONS -e GITHUB_REF -e GITHUB_SHA -e GITHUB_HEAD_REF -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -e GITHUB_TOKEN -e COVERALLS_REPO_TOKEN web coveralls
docker compose run -e GITHUB_ACTIONS -e GITHUB_REF -e GITHUB_SHA -e GITHUB_HEAD_REF -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -e GITHUB_TOKEN -e COVERALLS_REPO_TOKEN web coveralls

wait_web: wait_mysql

wait_mysql:
docker-compose up -d db
docker-compose run web bash -c 'wait-for-it -t 30 db:3306' || (docker-compose logs db; exit -1)
docker compose up -d db
docker compose run web bash -c 'wait-for-it -t 30 db:3306' || (docker compose logs db; exit -1)

migrate:
docker-compose run web python manage.py migrate
docker compose run web python manage.py migrate

lint: # lint currently staged files
pre-commit run
Expand All @@ -45,19 +45,19 @@ lint-all: # lint all files in repository
pre-commit run --all-files

check: wait_mysql
docker-compose run web python manage.py makemigrations --check
docker compose run web python manage.py makemigrations --check

migrations: wait_mysql
docker-compose run web python manage.py makemigrations
docker compose run web python manage.py makemigrations

settings:
docker-compose run web python manage.py diffsettings
docker compose run web python manage.py diffsettings

docs:
docker-compose run web sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
docker compose run web sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html

importterc:
docker-compose run web sh -c 'curl http://cdn.files.jawne.info.pl/public_html/2017/12/03_05_43_05/TERC_Urzedowy_2017-12-03.xml --output /tmp/TERC.xml && python manage.py load_terc --input /tmp/TERC.xml'
docker compose run web sh -c 'curl http://cdn.files.jawne.info.pl/public_html/2017/12/03_05_43_05/TERC_Urzedowy_2017-12-03.xml --output /tmp/TERC.xml && python manage.py load_terc --input /tmp/TERC.xml'

createsuperuser: # polyfill for django <3. On django 3+ you can use the `DJANGO_SUPERUSER_PASSWORD` env variable.
docker-compose run web python manage.py createsuperuserwithpassword --username root --email [email protected] --password root --noinput
docker compose run web python manage.py createsuperuserwithpassword --username root --email [email protected] --password root --noinput
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
# yamllint disable-line-length
version: "2.1"
# This is application’s services configuration for development purposes only.

services:
Expand Down
2 changes: 1 addition & 1 deletion feder/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# PEP 396: The __version__ attribute's value SHOULD be a string.
__version__ = "1.5.18"
__version__ = "1.5.19"


# Compatibility to eg. django-rest-framework
Expand Down
Binary file modified feder/letters/locale/pl/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit e36f9ff

Please sign in to comment.