Skip to content

Commit f99c351

Browse files
committed
Initial commit with scaffolding
0 parents  commit f99c351

29 files changed

+2304
-0
lines changed

.editorconfig

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 4
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
charset = utf-8
11+
end_of_line = lf
12+
13+
[*.{css,html,js,yaml,yml}]
14+
indent_size = 2
15+
16+
[Makefile]
17+
indent_style = tab

.github/CODE_OF_CONDUCT.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This project follows [Django's Code of Conduct](https://www.djangoproject.com/conduct/).

.github/SECURITY.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Please report security issues directly over email to [email protected]

.github/workflows/main.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
tests:
11+
name: Python ${{ matrix.python-version }}
12+
runs-on: ubuntu-18.04
13+
14+
strategy:
15+
matrix:
16+
python-version:
17+
- 3.5
18+
- 3.6
19+
- 3.7
20+
- 3.8
21+
- 3.9
22+
23+
steps:
24+
- uses: actions/checkout@v2
25+
- uses: actions/setup-python@v2
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
- uses: actions/cache@v2
29+
with:
30+
path: ~/.cache/pip
31+
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*.txt') }}
32+
restore-keys: |
33+
${{ runner.os }}-pip-
34+
- name: Upgrade packaging tools
35+
run: python -m pip install --upgrade pip setuptools virtualenv
36+
- name: Install dependencies
37+
run: python -m pip install --upgrade tox
38+
- name: Run tox targets for ${{ matrix.python-version }}
39+
run: |
40+
ENV_PREFIX=$(tr -C -d "0-9" <<< "${{ matrix.python-version }}")
41+
TOXENV=$(tox --listenvs | grep "^py$ENV_PREFIX" | tr '\n' ',') python -m tox

.gitignore

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
*.py[cod]
2+
3+
# C extensions
4+
*.so
5+
6+
# Packages
7+
*.egg
8+
*.egg-info
9+
dist
10+
build
11+
eggs
12+
parts
13+
bin
14+
var
15+
sdist
16+
develop-eggs
17+
.installed.cfg
18+
lib
19+
lib64
20+
.eggs
21+
22+
# Installer logs
23+
pip-log.txt
24+
25+
# Unit test / coverage reports
26+
.coverage
27+
.coverage.*
28+
.pytest_cache
29+
.tox
30+
nosetests.xml
31+
htmlcov
32+
33+
# Translations
34+
*.mo
35+
36+
# Mr Developer
37+
.mr.developer.cfg
38+
.project
39+
.pydevproject
40+
41+
# Complexity
42+
output/*.html
43+
output/*/index.html
44+
45+
# Hypothesis
46+
.cache
47+
.hypothesis

.pre-commit-config.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v3.2.0
4+
hooks:
5+
- id: check-added-large-files
6+
- id: check-case-conflict
7+
- id: check-json
8+
- id: check-merge-conflict
9+
- id: check-symlinks
10+
- id: check-toml
11+
- id: end-of-file-fixer
12+
- id: trailing-whitespace
13+
- repo: local
14+
hooks:
15+
- id: black
16+
name: black
17+
entry: .tox/py39-codestyle/bin/black
18+
language: system
19+
types: [python]
20+
- id: check-manifest
21+
name: check-manifest
22+
entry: check-manifest
23+
language: system
24+
pass_filenames: false
25+
files: ^MANIFEST\.in$
26+
- id: flake8
27+
name: flake8
28+
entry: .tox/py39-codestyle/bin/flake8 --config=setup.cfg
29+
language: system
30+
types: [python]
31+
- id: isort
32+
name: isort
33+
entry: .tox/py39-codestyle/bin/isort
34+
language: system
35+
types: [python]

HISTORY.rst

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
=======
2+
History
3+
=======
4+
5+
* Initial release.

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Adam Johnson
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

MANIFEST.in

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
global-exclude *.py[cod]
2+
graft tests
3+
prune __pycache__
4+
prune requirements
5+
include HISTORY.rst
6+
include LICENSE
7+
include README.rst
8+
exclude .editorconfig
9+
exclude .pre-commit-config.yaml
10+
include pyproject.toml
11+
exclude pytest.ini
12+
exclude tox.ini

pyproject.toml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[build-system]
2+
requires = ["setuptools >= 40.6.0", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[tool.black]
6+
target-version = ['py35']
7+
8+
[tool.isort]
9+
profile = "black"

pytest.ini

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[pytest]
2+
addopts = --ds=tests.settings
3+
django_find_project = false

requirements/compile.py

+154
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
#!/usr/bin/env python
2+
import os
3+
import subprocess
4+
import sys
5+
from pathlib import Path
6+
7+
if __name__ == "__main__":
8+
os.chdir(Path(__file__).parent)
9+
os.environ["CUSTOM_COMPILE_COMMAND"] = "requirements/compile.py"
10+
os.environ.pop("PIP_REQUIRE_VIRTUALENV")
11+
common_args = ["-m", "piptools", "compile", "--generate-hashes"] + sys.argv[1:]
12+
subprocess.run(
13+
[
14+
"python3.5",
15+
*common_args,
16+
"-P",
17+
"Django>=2.2,<2.3",
18+
"-o",
19+
"py35-django22.txt",
20+
],
21+
check=True,
22+
)
23+
subprocess.run(
24+
[
25+
"python3.6",
26+
*common_args,
27+
"-P",
28+
"Django>=2.2,<2.3",
29+
"-o",
30+
"py36-django22.txt",
31+
],
32+
check=True,
33+
)
34+
subprocess.run(
35+
[
36+
"python3.6",
37+
*common_args,
38+
"-P",
39+
"Django>=3.0a1,<3.1",
40+
"-o",
41+
"py36-django30.txt",
42+
],
43+
check=True,
44+
)
45+
subprocess.run(
46+
[
47+
"python3.6",
48+
*common_args,
49+
"-P",
50+
"Django>=3.1a1,<3.2",
51+
"-o",
52+
"py36-django31.txt",
53+
],
54+
check=True,
55+
)
56+
subprocess.run(
57+
[
58+
"python3.7",
59+
*common_args,
60+
"-P",
61+
"Django>=2.2,<2.3",
62+
"-o",
63+
"py37-django22.txt",
64+
],
65+
check=True,
66+
)
67+
subprocess.run(
68+
[
69+
"python3.7",
70+
*common_args,
71+
"-P",
72+
"Django>=3.0a1,<3.1",
73+
"-o",
74+
"py37-django30.txt",
75+
],
76+
check=True,
77+
)
78+
subprocess.run(
79+
[
80+
"python3.7",
81+
*common_args,
82+
"-P",
83+
"Django>=3.1a1,<3.2",
84+
"-o",
85+
"py37-django31.txt",
86+
],
87+
check=True,
88+
)
89+
subprocess.run(
90+
[
91+
"python3.8",
92+
*common_args,
93+
"-P",
94+
"Django>=2.2,<2.3",
95+
"-o",
96+
"py38-django22.txt",
97+
],
98+
check=True,
99+
)
100+
subprocess.run(
101+
[
102+
"python3.8",
103+
*common_args,
104+
"-P",
105+
"Django>=3.0a1,<3.1",
106+
"-o",
107+
"py38-django30.txt",
108+
],
109+
check=True,
110+
)
111+
subprocess.run(
112+
[
113+
"python3.8",
114+
*common_args,
115+
"-P",
116+
"Django>=3.1a1,<3.2",
117+
"-o",
118+
"py38-django31.txt",
119+
],
120+
check=True,
121+
)
122+
subprocess.run(
123+
[
124+
"python3.9",
125+
*common_args,
126+
"-P",
127+
"Django>=2.2,<2.3",
128+
"-o",
129+
"py39-django22.txt",
130+
],
131+
check=True,
132+
)
133+
subprocess.run(
134+
[
135+
"python3.9",
136+
*common_args,
137+
"-P",
138+
"Django>=3.0a1,<3.1",
139+
"-o",
140+
"py39-django30.txt",
141+
],
142+
check=True,
143+
)
144+
subprocess.run(
145+
[
146+
"python3.9",
147+
*common_args,
148+
"-P",
149+
"Django>=3.1a1,<3.2",
150+
"-o",
151+
"py39-django31.txt",
152+
],
153+
check=True,
154+
)

0 commit comments

Comments
 (0)