Merge branch 'master' into auto-generate-contributors

This commit is contained in:
Bruno Alla 2020-08-14 08:13:53 +01:00
commit 191cc719e8
5 changed files with 44 additions and 9 deletions

View File

@ -0,0 +1,36 @@
# Run pre-commit autoupdate every day at midnight
# and create a pull request if any changes
name: Pre-commit auto-update
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch: # to trigger manually
jobs:
auto-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2.1.1
with:
python-version: 3.8
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit autoupdate
working-directory: "{{cookiecutter.project_slug}}"
run: pre-commit autoupdate
- name: Create Pull Request
uses: peter-evans/create-pull-request@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update/pre-commit-autoupdate
title: Auto-update pre-commit hooks
commit-message: Auto-update pre-commit hooks
body: Update versions of tools in pre-commit configs to latest version
labels: update

View File

@ -5,7 +5,7 @@ binaryornot==0.4.4
# Code quality
# ------------------------------------------------------------------------------
black==19.10b0
isort==4.3.21
isort==5.4.0
flake8==3.8.3
flake8-isort==4.0.0

View File

@ -4,7 +4,7 @@ fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: master
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
@ -16,7 +16,7 @@ repos:
- id: black
- repo: https://github.com/timothycrosley/isort
rev: 4.3.21
rev: 5.3.2
hooks:
- id: isort

View File

@ -235,13 +235,12 @@ ANYMAIL = {}
# ------------------------------------------------------------------------------
# https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_ENABLED
COMPRESS_ENABLED = env.bool("COMPRESS_ENABLED", default=True)
{%- if cookiecutter.cloud_provider == 'None' %}
# https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_STORAGE
{%- if cookiecutter.cloud_provider == 'AWS' %}
COMPRESS_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
{%- elif cookiecutter.cloud_provider == 'GCP' %}
COMPRESS_STORAGE = "storages.backends.gcloud.GoogleCloudStorage"
{%- elif cookiecutter.cloud_provider == 'None' %}
COMPRESS_STORAGE = "compressor.storage.GzipCompressorFileStorage"
{%- elif cookiecutter.cloud_provider in ('AWS', 'GCP') and cookiecutter.use_whitenoise == 'n' %}
# https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_STORAGE
COMPRESS_STORAGE = STATICFILES_STORAGE
{%- endif %}
# https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_URL
COMPRESS_URL = STATIC_URL{% if cookiecutter.use_whitenoise == 'y' or cookiecutter.cloud_provider == 'None' %} # noqa F405{% endif %}

View File

@ -1 +1 @@
python-3.8.3
python-3.8.5