Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp tooling #286

Merged
merged 16 commits into from
Apr 25, 2024
Merged
13 changes: 0 additions & 13 deletions .flake8

This file was deleted.

2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Format code with ruff
169ea6d286d639d1670acbe6c07609b0dffa7f62
41 changes: 22 additions & 19 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,38 @@ jobs:
strategy:
matrix:
versions:
- { "djangoVersion": "3.2.23", "pythonVersion": "3.9" }
- { "djangoVersion": "3.2.23", "pythonVersion": "3.10" }
- { "djangoVersion": "4.2.7", "pythonVersion": "3.9" }
- { "djangoVersion": "4.2.7", "pythonVersion": "3.10" }
- { "djangoVersion": "4.2.7", "pythonVersion": "3.11" }
- { "djangoVersion": "4.2.7", "pythonVersion": "3.12" }
- { "djangoVersion": "3.2.25", "pythonVersion": "3.10" }
- { "djangoVersion": "4.2.11", "pythonVersion": "3.10" }
- { "djangoVersion": "4.2.11", "pythonVersion": "3.11" }
- { "djangoVersion": "4.2.11", "pythonVersion": "3.12" }
- { "djangoVersion": "5.0.4", "pythonVersion": "3.10" }
- { "djangoVersion": "5.0.4", "pythonVersion": "3.11" }
- { "djangoVersion": "5.0.4", "pythonVersion": "3.12" }
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python 🐍
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.versions.pythonVersion }}
- name: Install xmlsec1 📦
run: sudo apt-get install xmlsec1
- name: Install dependencies 📦
run: python -m pip install -r requirements_test.txt && python -m pip install -e .
run: |
python -m pip install poetry
poetry install --with dev
- name: Install Django ${{ matrix.versions.djangoVersion }} 📦
run: python -m pip install Django==${{ matrix.versions.djangoVersion }}
run: pip install Django==${{ matrix.versions.djangoVersion }}
- name: Check types, syntax and duckstrings 🦆
run: |
mypy .
flake8 .
interrogate --quiet --fail-under=95 .
poetry run mypy --explicit-package-bases .
poetry run ruff check .
poetry run interrogate --ignore-init-module --quiet --fail-under=95 .
- name: Test Django ${{ matrix.versions.djangoVersion }} with coverage 🧪
run: coverage run --source=django_saml2_auth -m pytest . && coverage lcov -o coverage.lcov
run: poetry run coverage run --source=django_saml2_auth -m pytest . && poetry run coverage lcov -o coverage.lcov
- name: Submit coverage report to Coveralls 📈
if: ${{ success() }}
uses: coverallsapp/github-action@1.1.3
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage.lcov
Expand All @@ -54,17 +57,17 @@ jobs:
- name: Generate CycloneDX SBOM artifacts 📃
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: |
cyclonedx-bom -r --format json -i requirements.txt -o cyclonedx-django-saml2-auth-${{ github.ref_name }}.json
cyclonedx-bom -r --format json -i requirements_test.txt -o cyclonedx-django-saml2-auth-test-${{ github.ref_name }}.json
poetry run cyclonedx-bom -r --format json -i requirements.txt -o cyclonedx-django-saml2-auth-${{ github.ref_name }}.json
poetry run cyclonedx-bom -r --format json -i requirements_test.txt -o cyclonedx-django-saml2-auth-test-${{ github.ref_name }}.json
- name: Upload CycloneDX SBOM artifact for requirements.txt 💾
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cyclonedx-django-saml2-auth-${{ github.ref_name }}.json
path: cyclonedx-django-saml2-auth-${{ github.ref_name }}.json
- name: Upload CycloneDX SBOM artifact for requirements_test.txt 💾
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cyclonedx-django-saml2-auth-test-${{ github.ref_name }}.json
path: cyclonedx-django-saml2-auth-test-${{ github.ref_name }}.json
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ For IdP-initiated SSO, the user will be created if it doesn't exist. Still, for
- Original Author: Fang Li ([@fangli](https://github.com/fangli))
- Maintainer: Mostafa Moradian ([@mostafa](https://github.com/mostafa))
- Version support matrix:
| **Python** | **Django** | **django-saml2-auth** | **End of Support<br/>(django-saml2-auth)** | **End of extended support<br/>(Django)** |
| ----------------------------- | ---------- | --------------------- | ------------------------------------------ | ---------------------------------------- |
| 3.9.x, 3.10.x | 3.2.x | >=3.4.0 | | April 2024 |
| 3.9.x, 3.10.x, 3.11.x, 3.12.x | 4.2.x | >=3.4.0 | | April 2026 |
| **Python** | **Django** | **django-saml2-auth** | **End of extended support<br/>(Django)** |
| ---------------------- | ---------- | --------------------- | ---------------------------------------- |
| 3.10.x | 3.2.x | >=3.4.0 | April 2024 |
| 3.10.x, 3.11.x, 3.12.x | 4.2.x | >=3.4.0 | April 2026 |
| 3.10.x, 3.11.x, 3.12.x | 5.0.x | >3.12.0 | April 2026 |

- Release logs are available [here](https://github.com/grafana/django-saml2-auth/releases).

Expand Down
1 change: 0 additions & 1 deletion django_saml2_auth/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Custom exception class for handling extra arguments."""


from typing import Any, Dict, Optional


Expand Down
Loading