Skip to content

Commit

Permalink
Simplify Simplify and clean up
Browse files Browse the repository at this point in the history
Signed-off-by: Steven K <[email protected]>
  • Loading branch information
rh0dium committed Dec 28, 2023
1 parent 32ef7e6 commit 4aab3ed
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
pip install .[test]
- name: Bandit
run: bandit -r datatableview -x datatableview/tests -s B303,B308,B323,B324,B703 -f json -o report.json
run: bandit -c pyproject.toml -f json -o report.json .

- name: Show report
if: ${{ success() || failure() }}
Expand All @@ -107,7 +107,7 @@ jobs:
tests:
name: Python ${{ matrix.python-version }} / ${{ matrix.db }} / Django ${{ matrix.django-version}}
runs-on: ubuntu-latest
# continue-on-error: ${{ matrix.django-version == '~=4.2.0' }}
# continue-on-error: ${{ matrix.django-version == '~=5.0' }}
strategy:
max-parallel: 4
matrix:
Expand Down Expand Up @@ -153,8 +153,7 @@ jobs:
env:
PYTHONWARNINGS: once::DeprecationWarning
DB_TYPE: ${{ matrix.db }}
run: export PYTHONPATH=`pwd` && coverage run demo_app/manage.py test --noinput --settings=demo_app.settings_test datatableview

run: export PYTHONPATH=`pwd` && coverage run
- name: "Upload Coverage Results for PY:${{ matrix.python-version }} DB:${{ matrix.db}} DJ:${{ matrix.django-version }}"
uses: actions/upload-artifact@v3
with:
Expand All @@ -163,8 +162,7 @@ jobs:
retention-days: 1

- name: Django Check
run: |
python demo_app/manage.py check
run: python demo_app/manage.py check

coverage:
name: Upload Coverage to Codecov
Expand Down Expand Up @@ -223,9 +221,7 @@ jobs:
PYTHONWARNINGS: once::DeprecationWarning
GITHUB_TOKEN: ${{ secrets.ORGANIZATIONAL_REPO_TOKEN }}
run: |
bumper.py --directory . --exclude=.idea,.github,demo_app \
--version_files datatableview/__init__.py \
--repo=pivotal-energy-solutions/django-datatable-view > out.json
bumper -P
echo "bumped=$(jq '.bumped' out.json)" >> $GITHUB_OUTPUT
echo "bump_version=$(jq '.bump_version' out.json)" >> $GITHUB_OUTPUT
echo "bump_sha=$(jq '.bump_sha' out.json)" >> $GITHUB_OUTPUT
19 changes: 13 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,15 @@ exclude = '''
| dist
)/
'''
extend-exclude = '''
# A regex preceded with ^/ will apply only to files and directories
# in the root of the project.
/static/.py # exclude a file named foo.py in the root of the project (in addition to the defaults)
'''

[tool.bandit]
targets = ['datatableview']
exclude_dirs = ["datatableview/tests"]
skips = ["B303", "B308", "B323", "B324", "B703"]

[tool.coverage.run]
branch = true
command_line = "demo_app/manage.py test --noinput --settings=demo_app.settings_test datatableview"
omit = [
"*/demo_app/**",
"*/migrations/*",
Expand All @@ -109,4 +110,10 @@ precision = 1
skip_covered = true
skip_empty = true
ignore_errors = true
sort = "cover"
sort = "cover"

[tool.bumper]
exclude = [".idea", ".github", "demo_app"]
version_files = ["datatableview/__init__.py"]
repo = "pivotal-energy-solutions/django-datatable-view"
report = "out.json"

0 comments on commit 4aab3ed

Please sign in to comment.