Skip to content

Commit 6162b6e

Browse files
authored
Python 3.12 & Django 4.2 upgrade (#97)
* structural changes * update readme * django upgrade fixes * change workflow to use make * merge with django-see-profile * drop deprecated middlewares
1 parent ae16f98 commit 6162b6e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2034
-1559
lines changed

.editorconfig

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Defines the coding style for different editors and IDEs.
2+
# http://editorconfig.org
3+
4+
# top-most EditorConfig file
5+
root = true
6+
7+
# Rules for source code.
8+
[*]
9+
charset = utf-8
10+
end_of_line = lf
11+
insert_final_newline = true
12+
indent_size = 2
13+
indent_style = space
14+
trim_trailing_whitespace = true
15+
16+
# Rules for Python code.
17+
[*.py]
18+
indent_size = 4
19+
20+
# Rules for markdown documents.
21+
[*.md]
22+
indent_size = 4
23+
trim_trailing_whitespace = false
24+
25+
# Rules for makefile
26+
[Makefile]
27+
indent_style = tab
28+
indent_size = 4

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "pip" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"

.github/pull_request_template.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Summary
2+
- Write a quick summary of what this PR is for
3+
4+
5+
##### Related Links
6+
- Paste link to ticket or any other related sites here
7+
8+
##### Ready for QA Checklist
9+
- [ ] Code Review
10+
- [ ] Dev QA
11+
- [ ] Rebase and Squash

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.12"]
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip setuptools poetry tox-gh-actions
24+
poetry install
25+
- name: Build wheels and source tarball
26+
run: poetry build
27+
- name: publish to PyPi
28+
uses: pypa/gh-action-pypi-publish@release/v1
29+
with:
30+
user: __token__
31+
password: ${{ secrets.PYPI_API_TOKEN }}
32+
skip_existing: true

.github/workflows/validate.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Validate
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- master
8+
- main
9+
- 'release/**'
10+
pull_request:
11+
branches:
12+
- '*'
13+
workflow_dispatch:
14+
15+
jobs:
16+
validate:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
python-version: ["3.12"]
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip setuptools poetry
30+
poetry install
31+
- name: Linting
32+
run: |
33+
make lint
34+
- name: Security
35+
run: make bandit
36+
- name: Testing
37+
run: make tests

.gitignore

Lines changed: 50 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,58 @@
1-
# python compiled files
2-
*.pyc
3-
*.pyo
4-
*.egg-info
5-
6-
# back up files from VIM / Emacs
7-
*~
1+
*.py[co]
82
*.swp
3+
*.bak
94

10-
# ignore setup.py build dir
11-
build/
5+
# docs
6+
_build
127

13-
# ignore sphinx built documentation
14-
_build/
8+
# Packages
9+
*.egg
10+
*.egg-info
11+
dist
12+
build
13+
eggs
14+
parts
15+
bin
16+
var
17+
sdist
18+
develop-eggs
19+
.installed.cfg
1520

16-
# ignore tox files
17-
.tox/
21+
# Installer logs
22+
pip-log.txt
1823

19-
# ignore coverage files
24+
# Unit test / coverage reports
2025
.coverage
26+
.tox
27+
28+
.idea
29+
30+
.DS_Store
31+
32+
#Translations
33+
*.mo
34+
35+
#Mr Developer
36+
.mr.developer.cfg
37+
38+
# Configuration
39+
sdelint.cnf
40+
41+
#generated data
42+
usecases/output.csv
43+
44+
# Test files
45+
info.log
2146
htmlcov/
2247

23-
# development tools
24-
.vscode/
48+
#ides
49+
.idea
50+
.vscode
51+
52+
#custom cert bundle
53+
my_root_certs.crt
54+
55+
# symbolic links
56+
.flake8
57+
58+
conf/

.pre-commit-config.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
repos:
2+
- repo: https://github.com/Lucas-C/pre-commit-hooks
3+
rev: v1.1.13
4+
hooks:
5+
- id: forbid-crlf
6+
- id: remove-crlf
7+
- id: forbid-tabs
8+
exclude_types: [csv]
9+
- id: remove-tabs
10+
exclude_types: [csv]
11+
12+
- repo: https://github.com/pre-commit/pre-commit-hooks
13+
rev: v4.1.0
14+
hooks:
15+
- id: trailing-whitespace
16+
- id: end-of-file-fixer
17+
- id: check-merge-conflict
18+
- id: check-yaml
19+
args: [--unsafe]
20+
21+
- repo: https://github.com/pre-commit/mirrors-isort
22+
rev: v5.10.1
23+
hooks:
24+
- id: isort
25+
26+
- repo: https://github.com/ambv/black
27+
rev: 22.3.0
28+
hooks:
29+
- id: black
30+
language_version: python3.12
31+
32+
- repo: https://github.com/pycqa/flake8
33+
rev: 3.9.2
34+
hooks:
35+
- id: flake8
36+
additional_dependencies: [flake8-typing-imports==1.10.0]
37+
exclude: ^tests
38+

.travis.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.
File renamed without changes.

MANIFEST.in

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)