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

CLE-3128 django42 upgrade fixes #56

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
55e9cfc
Added migrations for django-oauth-toolkit 1.4.1
Aug 27, 2024
f0bc442
Removed support for python 3.7 and 3.8
Aug 27, 2024
2de1863
Moved to django-oauth-toolkit 1.5.0 and got the migrations to work - …
Aug 29, 2024
99eb4cc
Moved to django-oauth-toolkit 2.4.0
Aug 29, 2024
3c9c46b
Added migrations check to pre-commit config.
Aug 30, 2024
3f4340e
install poetry so that lint can check for missing migrations
Aug 30, 2024
65e95c4
install poetry environment
Aug 30, 2024
326d92c
* Updated packages to latest to get python 3.12 working locally when …
Aug 30, 2024
096f3c5
* drop support for django 2.2
Aug 30, 2024
03d6c3b
*update action versions so that the latest node.js is used.
Aug 30, 2024
ee35d58
more action version updates.
Aug 30, 2024
ba72df1
Added CHANGELOG.md and updated requirements in README.md
Aug 30, 2024
4f87b52
set version to 0.9.0-alpha
Aug 30, 2024
85be8d7
- Change line length to 88 to match Platform's setup
Aug 30, 2024
0705e09
- More updates and fixes to github workflow
Aug 30, 2024
c38551b
- More updates and fixes to github workflow
Aug 30, 2024
d5ddd28
- fix lint action
Aug 30, 2024
a0b1662
Updated CHANGELOG.md with all changes from github releases https://gi…
Sep 2, 2024
2ace97f
publish all files to test.pypi.org
Sep 2, 2024
d0a033c
Added some text to README.md regarding updating the migrations from o…
Sep 2, 2024
45a57d4
Added information to README.md on publishing the package wheel files …
Sep 2, 2024
e4ff469
We only depend on the drf framework and django the rest are needed by…
Sep 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[bumpversion]
current_version = 0.9.0-alpha
commit = False
tag = False

[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file:Makefile]
search = django-integrations-framework-{current_version}.tar.gz
replace = django-integrations-framework-{new_version}.tar.gz

[bumpversion:file:.github/workflows/release.yml]
search = uses: d1618033/gh-action-python-publish-using-poetry@{current_version}
replace = uses: d1618033/gh-action-python-publish-using-poetry@{new_version}
23 changes: 23 additions & 0 deletions .github/actions/lint/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "Linting"
description: "Run linting on the code base "
inputs:
python-version:
description: 'The version of python'
required: true
runs:
using: "composite"
steps:
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: "${{ inputs.python-version }}"

- name: "Install Poetry"
shell: bash
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
poetry env use ${{ inputs.python-version }}
poetry install
- name: Run pre-commit
uses: pre-commit/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ inputs:
runs:
using: "composite"
steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
21 changes: 8 additions & 13 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@ on: [push]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10.0
uses: actions/setup-python@v4
- uses: actions/checkout@v4
- name: Run Linting
uses: ./.github/actions/lint
with:
python-version: "3.10"
- name: Run pre-commit
uses: pre-commit/[email protected]
python-version: 3.12

test:
needs: lint
Expand All @@ -36,13 +32,12 @@ jobs:
PGDATABASE: postgres
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
fail-fast: false

steps:
- name: Check out repository
uses: actions/checkout@v3

- uses: ./.github/actions/drf-integrations-framework-build
- uses: actions/checkout@v4
- name: Run tests
uses: ./.github/actions/tests
with:
python-version: ${{ matrix.python-version }}
29 changes: 25 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,37 @@ name: Release

on:
release:
types:
- created
types: [created]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Linting
uses: ./.github/actions/lint

test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Run Tests
uses: ./.github/actions/tests
with:
python-version: ${{ matrix.python-version }}

publish:
needs: [test, lint]
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build and publish
uses: JRubics/poetry-publish@v1.16
uses: JRubics/poetry-publish@v2.0
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
65 changes: 41 additions & 24 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,58 @@
repos:

- repo: https://github.com/PyCQA/isort
rev: 5.11.5
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 22.3.0
rev: 24.8.0
hooks:
- id: black

- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: fix-encoding-pragma
args: [--remove]
- id: forbid-new-submodules
- id: mixed-line-ending
args: [--fix=lf]
- id: trailing-whitespace
- id: check-added-large-files
- id: check-ast
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-encoding-pragma
args: [--remove]
- id: forbid-new-submodules
- id: mixed-line-ending
args: [--fix=lf]
# Cannot use for now due to our factories.py files
# - id: name-tests-test
# args: [--django]
- id: no-commit-to-branch
args: [--branch=master]
- id: trailing-whitespace

- repo: local
hooks:
- id: check-migrations
name: Check for missing migrations
entry: bash -c "poetry run python manage.py makemigrations --check --dry-run"
language: system
types: [python]
always_run: true
pass_filenames: false
Loading
Loading