Skip to content

Commit fafc178

Browse files
authored
Merge branch 'master' into master
2 parents 7778c20 + 1fd2c4f commit fafc178

File tree

179 files changed

+2412
-1305
lines changed

Some content is hidden

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

179 files changed

+2412
-1305
lines changed

.coveragerc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[run]
2+
branch = True
3+
source = silk

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
if: github.repository == 'jazzband/django-silk'
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: 3.8
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install -U pip
26+
python -m pip install -U setuptools twine wheel
27+
28+
- name: Build package
29+
run: |
30+
python setup.py --version
31+
python setup.py sdist --format=gztar bdist_wheel
32+
twine check dist/*
33+
34+
- name: Upload packages to Jazzband
35+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
36+
uses: pypa/gh-action-pypi-publish@master
37+
with:
38+
user: jazzband
39+
password: ${{ secrets.JAZZBAND_RELEASE_KEY }}
40+
repository_url: https://jazzband.co/projects/django-silk/upload

.github/workflows/test.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
name: build (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }})
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
13+
django-version: ['3.2', '4.0', '4.1', 'main']
14+
postgres-version: ['11', '12']
15+
mariadb-version: ['10.3', '10.4']
16+
exclude:
17+
# only test Django dev with PostgreSQL 12 and MariaDB 10.4
18+
- django-version: '3.2'
19+
postgres-version: '12'
20+
- django-version: '3.2'
21+
mariadb-version: '10.4'
22+
23+
- django-version: '4.0'
24+
postgres-version: '12'
25+
- django-version: '4.0'
26+
mariadb-version: '10.4'
27+
28+
- django-version: '4.1'
29+
postgres-version: '12'
30+
- django-version: '4.1'
31+
mariadb-version: '10.4'
32+
33+
- django-version: 'main'
34+
postgres-version: '11'
35+
- django-version: 'main'
36+
mariadb-version: '10.3'
37+
38+
services:
39+
postgres:
40+
image: postgres:${{ matrix.postgres-version }}
41+
env:
42+
POSTGRES_USER: postgres
43+
POSTGRES_PASSWORD: postgres
44+
POSTGRES_DB: postgres
45+
ports:
46+
- 5432:5432
47+
options: >-
48+
--health-cmd pg_isready
49+
--health-interval 10s
50+
--health-timeout 5s
51+
--health-retries 5
52+
53+
mariadb:
54+
image: mariadb:${{ matrix.mariadb-version }}
55+
env:
56+
MYSQL_ROOT_PASSWORD: mysql
57+
MYSQL_DATABASE: mysql
58+
options: >-
59+
--health-cmd "mysqladmin ping"
60+
--health-interval 10s
61+
--health-timeout 5s
62+
--health-retries 5
63+
ports:
64+
- 3306:3306
65+
66+
steps:
67+
- uses: actions/checkout@v2
68+
69+
- name: Set up Python ${{ matrix.python-version }}
70+
uses: actions/setup-python@v2
71+
with:
72+
python-version: ${{ matrix.python-version }}
73+
74+
- name: Get pip cache dir
75+
id: pip-cache
76+
run: |
77+
echo "::set-output name=dir::$(pip cache dir)"
78+
79+
- name: Cache
80+
uses: actions/cache@v2
81+
with:
82+
path: ${{ steps.pip-cache.outputs.dir }}
83+
key:
84+
${{ matrix.python-version }}-v1-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/tox.ini') }}
85+
restore-keys: |
86+
${{ matrix.python-version }}-v1-
87+
88+
- name: Install dependencies
89+
run: |
90+
python -m pip install --upgrade pip
91+
python -m pip install --upgrade tox tox-gh-actions
92+
93+
- name: Tox tests
94+
run: |
95+
tox -v
96+
env:
97+
DJANGO: ${{ matrix.django-version }}
98+
99+
- name: Upload coverage
100+
uses: codecov/codecov-action@v1
101+
with:
102+
name: Python ${{ matrix.python-version }}

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ var/
2020
*.egg-info/
2121
.installed.cfg
2222
*.egg
23+
.eggs
2324

2425
# Installer logs
2526
pip-log.txt
@@ -58,7 +59,8 @@ dist
5859
*db.sqlite*
5960
/django_silky/media
6061
*.prof
61-
project/media/*
62+
project/media/
63+
project/tmp/
6264
.vscode/
6365

6466
# Vagrant
@@ -117,3 +119,6 @@ fabric.properties
117119

118120
# Virtual env
119121
.venv*
122+
123+
package-lock.json
124+
*.db

.pre-commit-config.yaml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: 'v4.3.0'
4+
hooks:
5+
- id: check-merge-conflict
6+
- repo: https://github.com/hadialqattan/pycln
7+
rev: v2.1.1
8+
hooks:
9+
- id: pycln
10+
args: ['--all']
11+
- repo: https://github.com/asottile/yesqa
12+
rev: v1.4.0
13+
hooks:
14+
- id: yesqa
15+
- repo: https://github.com/pycqa/isort
16+
rev: '5.10.1'
17+
hooks:
18+
- id: isort
19+
args: ['--profile', 'black']
20+
- repo: https://github.com/pre-commit/pre-commit-hooks
21+
rev: 'v4.3.0'
22+
hooks:
23+
- id: end-of-file-fixer
24+
exclude: >-
25+
^docs/[^/]*\.svg$
26+
- id: requirements-txt-fixer
27+
- id: trailing-whitespace
28+
types: [python]
29+
- id: file-contents-sorter
30+
files: |
31+
CONTRIBUTORS.txt|
32+
docs/spelling_wordlist.txt|
33+
.gitignore|
34+
.gitattributes
35+
- id: check-case-conflict
36+
- id: check-json
37+
- id: check-xml
38+
- id: check-toml
39+
- id: check-xml
40+
- id: check-yaml
41+
- id: debug-statements
42+
- id: check-added-large-files
43+
- id: check-symlinks
44+
- id: debug-statements
45+
- id: detect-aws-credentials
46+
args: ['--allow-missing-credentials']
47+
- id: detect-private-key
48+
exclude: ^examples|(?:tests/ssl)/
49+
- repo: https://github.com/asottile/pyupgrade
50+
rev: 'v3.1.0'
51+
hooks:
52+
- id: pyupgrade
53+
args: ['--py37-plus', '--keep-mock']
54+
- repo: https://github.com/adamchainz/django-upgrade
55+
rev: '1.10.0'
56+
hooks:
57+
- id: django-upgrade
58+
args: [--target-version, '3.2']
59+
- repo: https://github.com/pre-commit/mirrors-autopep8
60+
rev: 'v1.7.0'
61+
hooks:
62+
- id: autopep8
63+
- repo: https://github.com/PyCQA/flake8
64+
rev: '5.0.4'
65+
hooks:
66+
- id: flake8
67+
exclude: '^docs/'
68+
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
69+
rev: v1.0.1
70+
hooks:
71+
- id: rst-linter
72+
files: >-
73+
^[^/]+[.]rst$

.travis.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)