Skip to content

Commit

Permalink
Py 312 pytoml (#263)
Browse files Browse the repository at this point in the history
* Remove Travis configuration, CHANGELOG, and requirements files

This commit completely removes the Travis configuration file (.travis.yml), the change log (CHANGELOG.md), and several requirements files (requirements.txt, requirements-docs.txt, and requirements_dev.txt). This is part of a wider effort to remove unnecessary or outdated files and clean up the repository. The deletion of these files results in a cleaner project structure and the reduction of future maintenance or updates for those files which are no longer needed.

* Update Bandit and Bumper configurations

---------

Signed-off-by: Steven K <steven@pointcircle.com>
  • Loading branch information
rh0dium committed Dec 28, 2023
1 parent 7a0102b commit 4679e62
Show file tree
Hide file tree
Showing 15 changed files with 155 additions and 606 deletions.
13 changes: 0 additions & 13 deletions .coveragerc

This file was deleted.

85 changes: 32 additions & 53 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is used for DatatableView

name: Djagno Datatable View Tests
name: Django Datatable View Tests

on:
push:
Expand All @@ -23,20 +23,17 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
cache: 'pip'
cache-dependency-path: |
setup.py
requirements*.txt

- name: Install dependencies
run: |
python setup.py install
python -m pip install --upgrade pip
pip install -r requirements.txt --user
pip install -r requirements_dev.txt --user
pip install .
pip install .[test]
- name: outdated
run: pip list --outdated --not-required --exclude=django --user | grep . && echo "There are outdated packages" && exit 1 || echo "All packages up to date"
run: pip list --outdated --not-required --user | grep . && echo "There are outdated packages" && exit 1 || echo "All packages up to date"

black:
name: Black
Expand All @@ -45,17 +42,14 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
cache: 'pip'
cache-dependency-path: |
setup.py
requirements*.txt

- name: Install dependencies
run: |
python setup.py install
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements_dev.txt
pip install .
pip install .[test]
- name: Black
run: black --check .
Expand All @@ -67,17 +61,14 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
cache: 'pip'
cache-dependency-path: |
setup.py
requirements*.txt

- name: Install dependencies
run: |
python setup.py install
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements_dev.txt
pip install .
pip install .[test]
pre-commit install
- name: Pre-Commit
Expand All @@ -90,19 +81,16 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
cache: 'pip'
cache-dependency-path: |
setup.py
requirements*.txt

- name: Install dependencies
run: |
python setup.py install
pip install bandit
pip install .
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 -r -f json -o report.json .

- name: Show report
if: ${{ success() || failure() }}
Expand All @@ -118,13 +106,13 @@ 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:
db: [ sqlite, mariadb ]
django-version: ["~=4.2.0" ]
python-version: [ "3.10" ]
django-version: ["~=4.2.0", "~=5.0"]
python-version: [ "3.12" ]

services:
mariadb:
Expand Down Expand Up @@ -152,27 +140,19 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
setup.py
requirements*.txt

- name: Install dependencies
run: |
python setup.py install
python -m pip install --upgrade pip
pip install -r requirements.txt --retries 3
pip install -r requirements_dev.txt --retries 3
pip install .
pip install .[test]
pip uninstall -y Django
pip install Django${{ matrix.django-version }}
- name: Run ${{ matrix.db }} Django ${{ matrix.django-version }} Tests
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 @@ -181,8 +161,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 All @@ -192,10 +171,12 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"

- name: Install dependencies
run: pip install -q coverage
run: |
pip install .
pip install .[test]
- uses: actions/download-artifact@v3
with:
Expand All @@ -204,7 +185,7 @@ jobs:
- name: Combine Report Coverage
run: |
coverage combine coverage-*/.coverage
coverage report --precision=1 --sort=cover --skip-covered --skip-empty
coverage report
coverage xml
- name: Upload coverage to Codecov
Expand All @@ -229,7 +210,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
- name: Install dependencies
run: |
pip install git+https://${{ secrets.ORGANIZATIONAL_REPO_TOKEN }}@github.com/pivotal-energy-solutions/tensor-infrastructure@master#egg=infrastructure
Expand All @@ -239,9 +220,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
2 changes: 1 addition & 1 deletion .idea/django-datatable-view.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 4679e62

Please sign in to comment.