Skip to content

Commit

Permalink
Merge branch 'main' into v0.19.x
Browse files Browse the repository at this point in the history
  • Loading branch information
barseghyanartur committed Nov 29, 2022
2 parents 56b7fb8 + 1e0edbb commit 7f0c8b6
Show file tree
Hide file tree
Showing 57 changed files with 1,000 additions and 208 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/optional.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Optional

on: [push, pull_request]

jobs:
test:
# Service containers to run with `container-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: test
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 4
matrix:
include:
- python-version: '3.11'
requirements: django_4_0
tox_env: py311-django40

- python-version: '3.11'
requirements: django_4_1
tox_env: py311-django41

steps:
- name: Install libxml2 and libxslt
run: sudo apt-get install -y libxml2-dev libxslt-dev
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- uses: nanasess/setup-chromedriver@master
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install pip-tools
pip-compile examples/requirements/${{ matrix.requirements }}.in
pip install -r examples/requirements/${{ matrix.requirements }}.txt
pip-compile examples/requirements/test.in
pip install -r examples/requirements/test.txt
- name: Run Tests
run: tox -e ${{ matrix.tox_env }}
env:
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Run Tests

coveralls_finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true
debug: True
33 changes: 28 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: Test

on: [push, pull_request]

Expand All @@ -23,6 +23,7 @@ jobs:
- 5432:5432
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 4
matrix:
include:
Expand Down Expand Up @@ -84,18 +85,35 @@ jobs:
- python-version: 3.9
requirements: django_4_0
tox_env: py39-django40
- python-version: '3.10'
requirements: django_4_0
tox_env: py310-django40
# - python-version: '3.11'
# requirements: django_4_0
# tox_env: py311-django40

- python-version: 3.8
requirements: django_4_1
tox_env: py38-django41
- python-version: 3.9
requirements: django_4_1
tox_env: py39-django41
- python-version: '3.10'
requirements: django_4_1
tox_env: py310-django41
# - python-version: '3.11'
# requirements: django_4_1
# tox_env: py311-django41

steps:
- name: Install libxml2 and libxslt
run: sudo apt-get install -y libxml2-dev libxslt-dev
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- uses: nanasess/setup-chromedriver@master
with:
# Optional: do not specify to match Chrome's version
chromedriver-version: '102.0.5005.61'

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -110,6 +128,8 @@ jobs:
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
- name: Coveralls
id: coveralls-setup
continue-on-error: true
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
Expand All @@ -120,6 +140,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
id: coveralls-finish
continue-on-error: true
if: strategy.steps.coveralls-setup.outcome == 'success'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@ are used for versioning (schema follows below):
0.3.4 to 0.4).
- All backwards incompatible changes are mentioned in this document.

0.19.6
------
2022-11-28

- Tested against Python 3.10 and 3.11. Note that ATM, Python 3.11 tests do
pass on SQLite only due to Python 3.11 issue with postgres bindings.
- Tested against Django 4.1.
- Drop Python 3.5 support.

0.19.5
------
2022-11-20

- Enable accidentally forgotten login-required permission on the Dashboard view.

0.19.4
------
2022-08-08
Expand Down
41 changes: 41 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ build-%: prepare-required-files
stop:
docker-compose -f docker-compose.yml stop;

touch:
docker-compose -f docker-compose.yml exec backend touch manage.py

make-migrations:
docker-compose -f docker-compose.yml exec backend ./manage.py makemigrations $(APP);

Expand All @@ -72,6 +75,12 @@ migrate:
test:
docker-compose -f docker-compose.yml exec backend pytest /backend/src/$(TEST_PATH);

tox-test:
docker-compose -f docker-compose.yml exec backend tox -e $(ARGS);

tox-list:
docker-compose -f docker-compose.yml exec backend tox -l;

show-migrations:
docker-compose -f docker-compose.yml exec backend ./manage.py showmigrations

Expand All @@ -93,6 +102,33 @@ pip-install:
pip-list:
docker-compose -f docker-compose.yml exec backend pip list

pip-compile:
docker-compose -f docker-compose.yml exec backend pip install --upgrade pip && pip install pip-tools
docker-compose -f docker-compose.yml exec backend ls -al /backend/examples/requirements/
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile captcha.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile common.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile debug.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile demo.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile deployment.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile dev.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile django_2_2.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile django_3_0.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile django_3_1.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile django_3_2.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile django_4_0.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile django_4_1.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile djangocms_3_4_3.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile djangorestframework.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile docs.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile feincms_1_17.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile feincms_1_20.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile latest.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile mptt.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile recaptcha.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile style_checkers.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile test.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile testing.in

black:
docker-compose -f docker-compose.yml exec backend black .

Expand All @@ -105,3 +141,8 @@ bash:
prepare-required-files:
mkdir -p examples/logs examples/db examples/media examples/media/static examples/media/fobi_plugins/content_image
mkdir -p examples/media/fobi_plugins/file

release:
python setup.py register
python setup.py sdist bdist_wheel
twine upload dist/* --verbose
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ handling the submitted form data).

Prerequisites
=============
- Django 2.2, 3.0, 3.1, 3.2 and 4.0.
- Python 3.6, 3.7, 3.8 and 3.9.
- Django 2.2, 3.0, 3.1, 3.2, 4.0 and 4.1.
- Python 3.6, 3.7, 3.8, 3.9, 3.10 and 3.11.

Key concepts
============
Expand Down
17 changes: 4 additions & 13 deletions docker/backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/python:3.9
FROM docker.io/python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED 1

Expand All @@ -12,25 +12,16 @@ RUN apt-get update && \
nano \
chromium \
graphviz \
libpq-dev

RUN add-apt-repository ppa:deadsnakes/ppa --yes

#RUN apt-get update && \
# RUN apt-get install -y --no-install-recommends \
# python3.6-dev \
# python3.7-dev \
# python3.8-dev

#RUN apt-get install -y firefox
libpq-dev \
python3.9

RUN pip install pip --upgrade
RUN pip install virtualenv

RUN mkdir /backend
WORKDIR /backend
ADD examples/requirements/ /backend/requirements/
RUN pip install -r /backend/requirements/django_3_2.in
RUN pip install -r /backend/requirements/django_4_1.in
#RUN python -c "import geckodriver_autoinstaller; print(geckodriver_autoinstaller.install())"
RUN python -c "from chromedriver_py import binary_path; print(binary_path)"
COPY . /backend/
Expand Down
2 changes: 2 additions & 0 deletions examples/requirements/captcha.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ pillow==8.2.0
# via django-simple-captcha
pytz==2021.1
# via django
six==1.16.0
# via django-simple-captcha
sqlparse==0.4.1
# via django
1 change: 1 addition & 0 deletions examples/requirements/common.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ bleach>=2.1.2
decorator>=4.0.4
docopt>=0.4.0
docutils>=0.12
importlib-metadata<5.0.0
Jinja2>=2.8
mailchimp>=2.0.9
markdown
Expand Down
1 change: 1 addition & 0 deletions examples/requirements/demo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ six==1.16.0
# via
# -r common.in
# bleach
# django-simple-captcha
# feincms
# python-dateutil
# tox
Expand Down
3 changes: 2 additions & 1 deletion examples/requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ pluggy==0.13.1
# tox
pre-commit==2.13.0
# via -r django_3_2.txt
psycopg2-binary==2.9.1
psycopg2-binary==2.8.6
# via -r django_3_2.txt
ptyprocess==0.7.0
# via
Expand Down Expand Up @@ -300,6 +300,7 @@ six==1.16.0
# via
# -r django_3_2.txt
# bleach
# django-simple-captcha
# feincms
# python-dateutil
# tox
Expand Down
1 change: 1 addition & 0 deletions examples/requirements/django_2_2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ six==1.16.0
# via
# -r common.in
# bleach
# django-simple-captcha
# feincms
# python-dateutil
# tox
Expand Down
1 change: 1 addition & 0 deletions examples/requirements/django_3_0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ six==1.16.0
# via
# -r common.in
# bleach
# django-simple-captcha
# feincms
# python-dateutil
# tox
Expand Down
1 change: 1 addition & 0 deletions examples/requirements/django_3_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ six==1.16.0
# via
# -r common.in
# bleach
# django-simple-captcha
# feincms
# python-dateutil
# tox
Expand Down
1 change: 1 addition & 0 deletions examples/requirements/django_3_2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ six==1.16.0
# via
# -r common.in
# bleach
# django-simple-captcha
# feincms
# python-dateutil
# tox
Expand Down
15 changes: 15 additions & 0 deletions examples/requirements/django_4_1.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-r common.in
-r test.in
-r style_checkers.in
-r feincms_1_20.in

Django>=4.1,<4.2
django-admin-tools>=0.8.0
django-autoslug>=1.9.6
django-ckeditor>=5.8.0
django-debug-toolbar>=2.1
django-formtools>=2.2
django-registration>=3.1.1
django-simple-captcha>=0.5.12
djangorestframework>=3.10
easy-thumbnails>=2.7.0
Loading

0 comments on commit 7f0c8b6

Please sign in to comment.