-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Python 3.12, drop support for Python 3.7, Django 4.1
Update actions versions Switch to `pyproject.toml` Fix/drop a bunch of outdated things Run flake8
- Loading branch information
Showing
14 changed files
with
161 additions
and
193 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
ignore = E501 | ||
exclude = | ||
env | ||
.tox | ||
doc | ||
**/migrations/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# :copyright: (c) 2017, Maykin Media BV. | ||
# All rights reserved. | ||
# :license: BSD (3 Clause), see LICENSE for more details. | ||
__version__ = "3.1.1" | ||
from importlib.metadata import version | ||
|
||
__version__ = version("django-admin-index") | ||
__author__ = "Joeri Bekker" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,17 @@ | ||
#!/usr/bin/env python | ||
from __future__ import absolute_import, unicode_literals | ||
|
||
import os | ||
import sys | ||
|
||
if __name__ == "__main__": | ||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.proj.settings") | ||
|
||
try: | ||
from django.core.management import execute_from_command_line | ||
except ImportError: | ||
# The above import may fail for some other reason. Ensure that the | ||
# issue is really that Django is missing to avoid masking other | ||
# exceptions on Python 2. | ||
try: | ||
import django | ||
except ImportError: | ||
raise ImportError( | ||
"Couldn't import Django. Are you sure it's installed and " | ||
"available on your PYTHONPATH environment variable? Did you " | ||
"forget to activate a virtual environment?" | ||
) | ||
raise | ||
except ImportError as e: | ||
raise ImportError( | ||
"Couldn't import Django. Are you sure it's installed and " | ||
"available on your PYTHONPATH environment variable? Did you " | ||
"forget to activate a virtual environment?" | ||
) from e | ||
|
||
execute_from_command_line(sys.argv) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,108 @@ | ||
[build-system] | ||
requires = ["setuptools >= 30.3.0"] # version supporting setup.cfg | ||
requires = ["setuptools>=61.0.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "django-admin-index" | ||
version = "3.1.1" | ||
description = "Admin index for Django" | ||
authors = [ | ||
{name = "Maykin Media", email = "[email protected]"} | ||
] | ||
readme = "README.rst" | ||
license = {file = "LICENSE"} | ||
keywords = ["Django", "index", "dashboard"] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Framework :: Django", | ||
"Framework :: Django :: 4.2", | ||
"Intended Audience :: Developers", | ||
"Operating System :: Unix", | ||
"Operating System :: MacOS", | ||
"Operating System :: Microsoft :: Windows", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
] | ||
requires-python = ">=3.10" | ||
dependencies = [ | ||
"django>=4.2", | ||
"django-ordered-model>=3.5", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/maykinmedia/django-admin-index" | ||
"Bug Tracker" = "https://github.com/maykinmedia/django-admin-index/issues" | ||
"Source Code" = "https://github.com/maykinmedia/django-admin-index" | ||
Changelog = "https://github.com/maykinmedia/django-admin-index/blob/main/CHANGELOG.rst" | ||
|
||
[project.optional-dependencies] | ||
tests = [ | ||
"pytest", | ||
"pytest-django", | ||
"tox", | ||
"isort", | ||
"black", | ||
"flake8", | ||
] | ||
coverage = [ | ||
"pytest-cov", | ||
] | ||
docs = [ | ||
"sphinx", | ||
"sphinx-rtd-theme", | ||
] | ||
release = [ | ||
"bump-my-version", | ||
] | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["django_admin_index*"] | ||
namespaces = false | ||
|
||
[tool.isort] | ||
profile = "black" | ||
combine_as_imports = true | ||
known_django = "django" | ||
known_first_party="django_admin_index" | ||
sections=["FUTURE", "STDLIB", "DJANGO", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"] | ||
skip = ["env", ".tox", ".history"] | ||
|
||
[tool.pytest.ini_options] | ||
testpaths = ["tests/unit"] | ||
python_classes = ["test_*"] | ||
DJANGO_SETTINGS_MODULE = "tests.proj.settings" | ||
|
||
[tool.bumpversion] | ||
current_version = "3.1.1" | ||
files = [ | ||
{filename = "pyproject.toml"}, | ||
{filename = "README.rst"}, | ||
{filename = "django_admin_index/locale/nl/LC_MESSAGES/django.po"}, | ||
{filename = "package.json"}, | ||
{filename = "package-lock.json"}, | ||
] | ||
|
||
[tool.coverage.run] | ||
branch = true | ||
source = [ | ||
"django_admin_index" | ||
] | ||
omit = [ | ||
"django_admin_index/migrations/*", | ||
] | ||
|
||
[tool.coverage.report] | ||
exclude_also = [ | ||
"if (typing\\.)?TYPE_CHECKING:", | ||
"@(typing\\.)?overload", | ||
"class .*\\(.*Protocol.*\\):", | ||
"@(abc\\.)?abstractmethod", | ||
"raise NotImplementedError", | ||
"\\.\\.\\.", | ||
"pass", | ||
] | ||
omit = [ | ||
"django_admin_index/migrations/*", | ||
] |
Oops, something went wrong.