Skip to content

Commit 4aab3ed

Browse files
committed
Simplify Simplify and clean up
Signed-off-by: Steven K <[email protected]>
1 parent 32ef7e6 commit 4aab3ed

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
pip install .[test]
9292
9393
- name: Bandit
94-
run: bandit -r datatableview -x datatableview/tests -s B303,B308,B323,B324,B703 -f json -o report.json
94+
run: bandit -c pyproject.toml -f json -o report.json .
9595

9696
- name: Show report
9797
if: ${{ success() || failure() }}
@@ -107,7 +107,7 @@ jobs:
107107
tests:
108108
name: Python ${{ matrix.python-version }} / ${{ matrix.db }} / Django ${{ matrix.django-version}}
109109
runs-on: ubuntu-latest
110-
# continue-on-error: ${{ matrix.django-version == '~=4.2.0' }}
110+
# continue-on-error: ${{ matrix.django-version == '~=5.0' }}
111111
strategy:
112112
max-parallel: 4
113113
matrix:
@@ -153,8 +153,7 @@ jobs:
153153
env:
154154
PYTHONWARNINGS: once::DeprecationWarning
155155
DB_TYPE: ${{ matrix.db }}
156-
run: export PYTHONPATH=`pwd` && coverage run demo_app/manage.py test --noinput --settings=demo_app.settings_test datatableview
157-
156+
run: export PYTHONPATH=`pwd` && coverage run
158157
- name: "Upload Coverage Results for PY:${{ matrix.python-version }} DB:${{ matrix.db}} DJ:${{ matrix.django-version }}"
159158
uses: actions/upload-artifact@v3
160159
with:
@@ -163,8 +162,7 @@ jobs:
163162
retention-days: 1
164163

165164
- name: Django Check
166-
run: |
167-
python demo_app/manage.py check
165+
run: python demo_app/manage.py check
168166

169167
coverage:
170168
name: Upload Coverage to Codecov
@@ -223,9 +221,7 @@ jobs:
223221
PYTHONWARNINGS: once::DeprecationWarning
224222
GITHUB_TOKEN: ${{ secrets.ORGANIZATIONAL_REPO_TOKEN }}
225223
run: |
226-
bumper.py --directory . --exclude=.idea,.github,demo_app \
227-
--version_files datatableview/__init__.py \
228-
--repo=pivotal-energy-solutions/django-datatable-view > out.json
224+
bumper -P
229225
echo "bumped=$(jq '.bumped' out.json)" >> $GITHUB_OUTPUT
230226
echo "bump_version=$(jq '.bump_version' out.json)" >> $GITHUB_OUTPUT
231227
echo "bump_sha=$(jq '.bump_sha' out.json)" >> $GITHUB_OUTPUT

pyproject.toml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,15 @@ exclude = '''
8989
| dist
9090
)/
9191
'''
92-
extend-exclude = '''
93-
# A regex preceded with ^/ will apply only to files and directories
94-
# in the root of the project.
95-
/static/.py # exclude a file named foo.py in the root of the project (in addition to the defaults)
96-
'''
92+
93+
[tool.bandit]
94+
targets = ['datatableview']
95+
exclude_dirs = ["datatableview/tests"]
96+
skips = ["B303", "B308", "B323", "B324", "B703"]
9797

9898
[tool.coverage.run]
9999
branch = true
100+
command_line = "demo_app/manage.py test --noinput --settings=demo_app.settings_test datatableview"
100101
omit = [
101102
"*/demo_app/**",
102103
"*/migrations/*",
@@ -109,4 +110,10 @@ precision = 1
109110
skip_covered = true
110111
skip_empty = true
111112
ignore_errors = true
112-
sort = "cover"
113+
sort = "cover"
114+
115+
[tool.bumper]
116+
exclude = [".idea", ".github", "demo_app"]
117+
version_files = ["datatableview/__init__.py"]
118+
repo = "pivotal-energy-solutions/django-datatable-view"
119+
report = "out.json"

0 commit comments

Comments
 (0)