-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* init support for django4.2 * add change log for add compatiable for django 4.2 and python 3.10 * Update CHANGELOG.rst * Update .pre-commit-config.yaml * fix lint config issue * remove test code * add blackline for flake8 * add pyproject.toml file * add requirement files * fix ci failed issue * format setup.py import section * upgrade isort version to fix pre commit ci issue * upgrade the django-upgrade package to pass through the pre commit ci test * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * upgrade packages in pre commit * resort init file changes * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * comment the django-upgrade from ci * fix: add missing migration file * fix: update previous file instead of creating new file --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Josh Peng Yu <[email protected]>
- Loading branch information
1 parent
1cd77a8
commit 1fb6fca
Showing
17 changed files
with
314 additions
and
45 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env python | ||
HELPER_SETTINGS = { | ||
'SECRET_KEY': "djangocmssnippetstestsuitekey", | ||
'INSTALLED_APPS': [ | ||
'tests.utils', | ||
'djangocms_versioning', | ||
'djangocms_snippet', | ||
], | ||
'CMS_LANGUAGES': { | ||
1: [{ | ||
'code': 'en', | ||
'name': 'English', | ||
}] | ||
}, | ||
'LANGUAGE_CODE': 'en', | ||
'ALLOWED_HOSTS': ['localhost'], | ||
'DJANGOCMS_SNIPPET_VERSIONING_ENABLED': True, | ||
'DJANGOCMS_SNIPPET_MODERATION_ENABLED': True, | ||
'CMS_TEMPLATES': ( | ||
("page.html", "Normal page"), | ||
), | ||
"DEFAULT_AUTO_FIELD": "django.db.models.AutoField", | ||
} | ||
|
||
|
||
def run(): | ||
from app_helper import runner | ||
runner.cms('djangocms_snippet') | ||
|
||
|
||
if __name__ == '__main__': | ||
run() |
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,141 @@ | ||
[build-system] | ||
requires = ["setuptools >= 40.6.0", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "djangocms-snippet" | ||
version = "4.0.1.dev2" | ||
authors = [ | ||
{name = "Divio AG", email = "[email protected]"}, | ||
] | ||
maintainers = [ | ||
{name = "Django CMS Association and contributors", email = "[email protected]"} | ||
] | ||
license = {file = "LICENSE"} | ||
description = "Adds snippet plugin to django CMS." | ||
readme = "README.rst" | ||
requires-python = ">=3.8" | ||
dependencies = [ | ||
'django-cms>=4.0', | ||
] | ||
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Web Environment", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: BSD License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Framework :: Django", | ||
"Framework :: Django :: 3.2", | ||
"Framework :: Django :: 4.2", | ||
"Framework :: Django CMS", | ||
"Framework :: Django CMS :: 4.0", | ||
"Topic :: Internet :: WWW/HTTP", | ||
"Topic :: Internet :: WWW/HTTP :: Dynamic Content", | ||
"Topic :: Software Development", | ||
"Topic :: Software Development :: Libraries", | ||
] | ||
|
||
[project.optional-dependencies] | ||
static-ace = ["djangocms-static-ace"] | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["djangocms_snippet"] | ||
exclude = ["tests"] | ||
|
||
[project.urls] | ||
"Bug Tracker" = "https://github.com/django-cms/djangocms-snippet/issues" | ||
Changelog = "https://github.com/django-cms/djangocms-snippet/blob/master/CHANGELOG.rst" | ||
Repository = "https://github.com/django-cms/djangocms-snippet" | ||
Support = "https://www.django-cms.org/slack/" | ||
|
||
[tool.coverage.run] | ||
branch = true | ||
parallel = true | ||
source = [ | ||
"djangocms_snippet", | ||
"tests", | ||
] | ||
|
||
[tool.coverage.paths] | ||
source = [ | ||
"djangocms_snippet", | ||
".tox/**/site-packages", | ||
] | ||
|
||
[tool.coverage.report] | ||
show_missing = true | ||
|
||
[tool.mypy] | ||
check_untyped_defs = true | ||
disallow_any_generics = true | ||
disallow_incomplete_defs = true | ||
disallow_untyped_defs = true | ||
mypy_path = "djangocms_snippet/" | ||
no_implicit_optional = true | ||
show_error_codes = true | ||
warn_unreachable = true | ||
warn_unused_ignores = true | ||
|
||
[[tool.mypy.overrides]] | ||
module = "tests.*" | ||
allow_untyped_defs = true | ||
|
||
|
||
[tool.ruff] | ||
# https://beta.ruff.rs/docs/configuration/ | ||
line-length = 79 | ||
select = [ | ||
"E", # pycodestyle errors | ||
"W", # pycodestyle warnings | ||
"F", # pyflakes | ||
"I", # isort | ||
"FBT", # flake8-boolean-trap | ||
"B", # flake8-bugbear | ||
"C", # flake8-comprehensions | ||
"DJ", # flake8-django | ||
"INT", # flake8-gettext | ||
"PIE", # flake8-pie | ||
"SIM", # flake8-simplify | ||
"PGH", # pygrep-hooks | ||
"PLE", # pylint error | ||
"PLR", # pylint refactor | ||
"PLW", # pylint warning | ||
"UP", # pyupgrade | ||
"C901", # mccabe | ||
"N", # pep8-naming | ||
"YTT", # flake8-2020, | ||
"RUF" | ||
] | ||
|
||
exclude = [ | ||
".eggs", | ||
".git", | ||
".mypy_cache", | ||
".ruff_cache", | ||
".env", | ||
".venv", | ||
"**migrations/**", | ||
"venv", | ||
] | ||
|
||
ignore = [ | ||
"E501", # line-too-long | ||
"W191", # tab-indentation | ||
] | ||
|
||
[tool.ruff.per-file-ignores] | ||
"__init__.py" = [ | ||
"F401" # unused-import | ||
] | ||
|
||
[tool.ruff.isort] | ||
combine-as-imports = true | ||
known-first-party = [ | ||
"djangocms_snippet", | ||
] | ||
extra-standard-library = ["dataclasses"] |
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,6 @@ | ||
bump2version | ||
https://github.com/django-cms/django-cms/tarball/release/4.0.1.x#egg=django-cms | ||
django-treebeard | ||
pip-tools | ||
pre-commit | ||
wheel |
Oops, something went wrong.