Skip to content

Commit 72bd345

Browse files
authored
Merge branch 'codingjoe:master' into master
2 parents 39d9bbc + 366e0ac commit 72bd345

File tree

15 files changed

+4678
-69
lines changed

15 files changed

+4678
-69
lines changed

.bandit

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

.fussyfox.yml

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

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
- package-ecosystem: npm
8+
directory: "/"
9+
schedule:
10+
interval: weekly
11+
- package-ecosystem: github-actions
12+
directory: "/"
13+
schedule:
14+
interval: daily

.github/workflows/ci.yml

Lines changed: 52 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,39 +11,72 @@ jobs:
1111
dist:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/setup-python@v2
14+
- uses: actions/setup-python@v2.2.2
1515
- run: python -m pip install --upgrade pip setuptools wheel twine readme-renderer
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v2.3.4
1717
- run: python setup.py sdist bdist_wheel
1818
- run: python -m twine check dist/*
1919

20-
standardJS:
20+
standardjs:
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: actions/checkout@v2
24-
- name: Set up Node
25-
uses: actions/setup-node@v1
26-
- name: Install Standard
27-
run: npm install -g standard
28-
- name: Run standard
29-
run: standard
23+
- uses: actions/[email protected]
24+
with:
25+
node-version: '14.x'
26+
- uses: actions/[email protected]
27+
- id: cache-npm
28+
uses: actions/[email protected]
29+
with:
30+
path: ~/.npm
31+
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
32+
restore-keys: |
33+
${{ runner.os }}-node-
34+
- name: Install Node dependencies
35+
run: npm ci
36+
- run: npm run lint:js
37+
38+
lint:
39+
runs-on: ubuntu-latest
40+
strategy:
41+
matrix:
42+
lint-command:
43+
- bandit -r . -x ./tests
44+
- black --check --diff .
45+
- flake8 .
46+
- isort --check-only --diff .
47+
- pydocstyle .
48+
steps:
49+
- uses: actions/[email protected]
50+
- uses: actions/[email protected]
51+
- uses: actions/[email protected]
52+
with:
53+
path: ~/.cache/pip
54+
key: ${{ runner.os }}-pip-${{ hashFiles('linter-requirements.txt') }}
55+
restore-keys: |
56+
${{ runner.os }}-pip-
57+
- run: python -m pip install -r linter-requirements.txt
58+
- run: ${{ matrix.lint-command }}
3059

3160
pytest:
61+
needs:
62+
- lint
63+
- standardjs
64+
- dist
3265
runs-on: ubuntu-latest
3366
strategy:
3467
matrix:
3568
python-version:
36-
- 3.6
37-
- 3.7
38-
- 3.8
39-
- 3.9
69+
- "3.7"
70+
- "3.8"
71+
- "3.9"
4072
django-version:
41-
- 2.2.*
42-
- 3.1.*
73+
- "2.2"
74+
- "3.1"
75+
- "3.2"
4376
steps:
44-
- uses: actions/checkout@v2
77+
- uses: actions/checkout@v2.3.4
4578
- name: Set up Python ${{ matrix.python-version }}
46-
uses: actions/setup-python@v2
79+
uses: actions/setup-python@v2.2.2
4780
with:
4881
python-version: ${{ matrix.python-version }}
4982

@@ -59,7 +92,7 @@ jobs:
5992
- name: Upgrade Python setuptools
6093
run: python -m pip install --upgrade pip setuptools wheel codecov
6194
- name: Install Django version ${{ matrix.django-version }}
62-
run: pip install django==${{ matrix.django-version }}
95+
run: python -m pip install django~=${{ matrix.django-version }}
6396
- name: Run tests
6497
run: PATH=$PATH:$(pwd)/bin python setup.py test
6598
- run: codecov

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ jobs:
99

1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v1
13-
- uses: actions/setup-python@v1
12+
- uses: actions/checkout@v2.3.4
13+
- uses: actions/setup-python@v2.2.2
1414
- name: Install Python dependencies
1515
run: python -m pip install --upgrade pip setuptools wheel twine
16-
- uses: actions/setup-node@v1
16+
- uses: actions/setup-node@v2.4.0
1717
- name: Install Node dependencies
18-
run: npm install --only=dev
18+
run: npm ci
1919
- name: Minify JavaScript files
2020
run: npm run-script minify
2121
- name: Build dist packages

MANIFEST.in

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
include s3file/static/s3file/js/s3file.js s3file/static/s3file/js/s3file.min.js
22
prune tests
33
prune .github
4-
exclude .fussyfox.yml
5-
exclude .travis.yml
6-
exclude .gitignore
4+
exclude .*

README.rst

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,23 @@ CORS policy
9292
You will need to allow ``POST`` from all origins. Just add the following
9393
to your CORS policy.
9494

95-
.. code:: xml
96-
97-
<CORSConfiguration>
98-
<CORSRule>
99-
<AllowedOrigin>*</AllowedOrigin>
100-
<AllowedMethod>POST</AllowedMethod>
101-
<MaxAgeSeconds>3000</MaxAgeSeconds>
102-
<AllowedHeader>*</AllowedHeader>
103-
</CORSRule>
104-
</CORSConfiguration>
95+
.. code:: json
96+
97+
[
98+
{
99+
"AllowedHeaders": [
100+
"*"
101+
],
102+
"AllowedMethods": [
103+
"POST"
104+
],
105+
"AllowedOrigins": [
106+
"*"
107+
],
108+
"ExposeHeaders": [],
109+
"MaxAgeSeconds": 3000
110+
}
111+
]
105112
106113
Progress Bar
107114
------------

linter-requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
bandit==1.7.0
2+
black==21.7b0
3+
flake8==3.9.2
4+
isort==5.9.3
5+
pydocstyle==6.1.1

0 commit comments

Comments
 (0)