Skip to content

Commit

Permalink
Merge cc7e49e into 7752b80
Browse files Browse the repository at this point in the history
  • Loading branch information
yakky authored Apr 23, 2023
2 parents 7752b80 + cc7e49e commit afcf6bf
Show file tree
Hide file tree
Showing 13 changed files with 115 additions and 140 deletions.
22 changes: 22 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[bumpversion]
current_version = 0.2.0
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.?)(?P<release>[a-z]*)(?P<relver>\d*)
serialize =
{major}.{minor}.{patch}.{release}{relver}
{major}.{minor}.{patch}
commit = True
tag = True
sign_tags = True
tag_name = {new_version}
message = Release {new_version}

[bumpversion:part:release]
optional_value = gamma
values =
dev
a
b
rc
gamma

[bumpversion:file:app_enabler/__init__.py]
12 changes: 6 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@ jobs:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
python-version: [3.8]
toxenv: [pep8, isort, black, pypi-description, docs, towncrier]
python-version: ["3.11.x"]
toxenv: [ruff, isort, black, pypi-description, docs, towncrier]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.toxenv }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.toxenv }}
- name: Cache tox
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: .tox
key: ${{ runner.os }}-lint-${{ matrix.toxenv }}-${{ hashFiles('setup.cfg') }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Cache pip
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.toxenv }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.toxenv }}
- name: Cache tox
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: .tox
key: ${{ runner.os }}-tox-release-${{ hashFiles('setup.cfg') }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, 3.8, 3.7, 3.6]
django: [31, 30, 22]
python-version: ["3.11", "3.10", "3.9"]
django: [42, 41, 32]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.toxenv }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.toxenv }}
- name: Cache tox
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: .tox
key: ${{ runner.os }}-tox-${{ format('{{py{0}-django{1}}}', matrix.python-version, matrix.django) }}-${{ hashFiles('setup.cfg') }}
Expand Down
43 changes: 17 additions & 26 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
exclude: "(.idea|node_modules|.tox)"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0
rev: v4.4.0
hooks:
- id: trailing-whitespace
exclude: "setup.cfg"
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
Expand All @@ -16,42 +17,29 @@ repos:
- id: fix-encoding-pragma
args:
- --remove
- repo: https://github.com/timothycrosley/isort
rev: "5.6.4"
- repo: https://github.com/PyCQA/isort
rev: "5.12.0"
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 20.8b1
rev: 23.3.0
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.262'
hooks:
- id: flake8
additional_dependencies:
- flake8-broken-line
- flake8-bugbear
- flake8-builtins
- flake8-coding
- flake8-commas
- flake8-comprehensions
- flake8-eradicate
- flake8-quotes
- flake8-tidy-imports
- pep8-naming
- repo: https://github.com/econchick/interrogate
rev: 1.3.2
hooks:
- id: interrogate
args:
- "-cpyproject.toml"
- "--quiet"
- id: ruff
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.4
rev: v3.3.1
hooks:
- id: pyupgrade
args:
- --py3-plus
- repo: https://github.com/adamchainz/django-upgrade
rev: "1.13.0"
hooks:
- id: django-upgrade
args: [--target-version, "3.2"]
- repo: local
hooks:
- id: towncrier
Expand All @@ -60,3 +48,6 @@ repos:
language: system
pass_filenames: false
always_run: true
ci:
skip:
- towncrier
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ formats:
- pdf

python:
version: 3.7
version: 3.9
install:
- requirements: requirements-test.txt
- method: pip
Expand Down
1 change: 0 additions & 1 deletion app_enabler/patcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ def _ast_get_object_from_value(val: Any) -> ast.Constant:


def _update_list_setting(original_setting: List, configuration: Iterable):

for config_value in configuration:
# configuration items can be either strings (which are appended) or dictionaries which contains information
# about the position of the item
Expand Down
1 change: 1 addition & 0 deletions changes/32.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade to Django 3.2/4.2
21 changes: 20 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[tool.black]
line-length = 119
target-version = ["py36"]
target-version = ["py310"]
include = 'app_enabler/*py'

[tool.towncrier]
Expand All @@ -28,3 +28,22 @@ verbose = 0
quiet = false
whitelist-regex = []
color = true

[tool.isort]
profile = "black"
combine_as_imports = true
default_section = "THIRDPARTY"
force_grid_wrap = 0
include_trailing_comma = true
known_first_party = "app_enabler"
line_length = 119
multi_line_output = 3
use_parentheses = true

[tool.ruff]
ignore = []
line-length = 119
target-version = "py310"

[tool.ruff.mccabe]
max-complexity = 10
42 changes: 9 additions & 33 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
[bumpversion]
current_version = 0.2.0
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.?)(?P<release>[a-z]*)(?P<relver>\d*)
serialize =
{major}.{minor}.{patch}.{release}{relver}
{major}.{minor}.{patch}
commit = True
tag = True
sign_tags = True
tag_name = {new_version}
message = Release {new_version}

[bumpversion:part:release]
optional_value = gamma
values =
dev
a
b
rc
gamma

[bumpversion:file:app_enabler/__init__.py]

[metadata]
name = django-app-enabler
version = attr: app_enabler.__version__
Expand All @@ -33,21 +10,23 @@ description = Autoconfigurator for django applications
long_description = file: README.rst, HISTORY.rst
long_description_content_type = text/x-rst
license = BSD
license_file = LICENSE
license_files = LICENSE
classifiers =
Development Status :: 4 - Beta
Framework :: Django
Intended Audience :: Developers
Natural Language :: English
Framework :: Django
Framework :: Django :: 2.2
Framework :: Django :: 3.0
Framework :: Django :: 3.1
Framework :: Django :: 3.2
Framework :: Django :: 4.0
Framework :: Django :: 4.1
Framework :: Django :: 4.2
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11

[options]
include_package_data = True
Expand All @@ -57,7 +36,7 @@ install_requires =
setup_requires =
setuptools
packages = app_enabler
python_requires = >=3.6
python_requires = >=3.7
test_suite = pytest
zip_safe = False

Expand All @@ -67,16 +46,13 @@ app_enabler = *.html *.png *.gif *js *jpg *jpeg *svg *py *mo *po

[options.extras_require]
docs =
django<3.1
django<5.0
sphinx-click

[options.entry_points]
console_scripts =
django-enabler = app_enabler.__main__:execute

[upload]
repository = https://upload.pypi.org/legacy/

[sdist]
formats = zip

Expand Down
Loading

0 comments on commit afcf6bf

Please sign in to comment.