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

Added bump version and pre-commit #107

Merged
merged 2 commits into from
Feb 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
34 changes: 34 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
repos:
# Need to drop python 3.5 and 3.6 before we include python upgrade
# - repo: https://github.com/asottile/pyupgrade
# rev: v2.31.0
# hooks:
# - id: pyupgrade
# args: ["--py37-plus"]

- repo: https://github.com/adamchainz/django-upgrade
rev: '1.4.0'
hooks:
- id: django-upgrade
args: [--target-version, "2.2"]

- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8

- repo: https://github.com/asottile/yesqa
rev: v1.3.0
hooks:
- id: yesqa

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-merge-conflict
- id: mixed-line-ending

- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog
=========

unreleased
==========


3.0.0 (2020-09-02)
==================
Expand Down
6 changes: 6 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
bump2version
django-cms>=3.7
django-treebeard>=4.3,<4.5
pip-tools
pre-commit
wheel
77 changes: 77 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
#
# pip-compile
#
--trusted-host pypi.python.org
--trusted-host pypi.org
--trusted-host files.pythonhosted.org

asgiref==3.5.0
# via django
bump2version==1.0.1
# via -r requirements.in
cfgv==3.3.1
# via pre-commit
click==8.0.3
# via pip-tools
distlib==0.3.4
# via virtualenv
django==4.0.1
# via
# django-classy-tags
# django-cms
# django-formtools
# django-sekizai
# django-treebeard
django-classy-tags==3.0.0
# via
# django-cms
# django-sekizai
django-cms==3.9.0
# via -r requirements.in
django-formtools==2.3
# via django-cms
django-sekizai==3.0.0
# via django-cms
django-treebeard==4.4
# via
# -r requirements.in
# django-cms
djangocms-admin-style==3.0.0
# via django-cms
filelock==3.4.2
# via virtualenv
identify==2.4.4
# via pre-commit
nodeenv==1.6.0
# via pre-commit
pep517==0.12.0
# via pip-tools
pip-tools==6.4.0
# via -r requirements.in
platformdirs==2.4.1
# via virtualenv
pre-commit==2.17.0
# via -r requirements.in
pyyaml==6.0
# via pre-commit
six==1.16.0
# via virtualenv
sqlparse==0.4.2
# via django
toml==0.10.2
# via pre-commit
tomli==2.0.0
# via pep517
virtualenv==20.13.0
# via pre-commit
wheel==0.37.1
# via
# -r requirements.in
# pip-tools

# The following packages are considered to be unsafe in a requirements file:
# pip
# setuptools
49 changes: 49 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[bumpversion]
current_version = 3.0.0
commit = True
tag = False

[bumpversion:file:djangocms_snippet/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'

[bumpversion:file:CHANGELOG.rst]
search =
unreleased
==========
replace =
unreleased
==========

{new_version} {utcnow:%%Y-%%m-%%d}
================

[flake8]
max-line-length = 119
exclude =
*.egg-info,
.eggs,
.env,
.git,
.settings,
.tox,
.venv,
build,
data,
dist,
docs,
*migrations*,
requirements,
tmp

[isort]
line_length = 79
skip = manage.py, *migrations*, .tox, .eggs, data, .venv, .env
include_trailing_comma = true
multi_line_output = 5
lines_after_imports = 2
default_section = THIRDPARTY
sections = FUTURE, STDLIB, DJANGO, CMS, THIRDPARTY, FIRSTPARTY, LOCALFOLDER
known_first_party = djangocms_snippet
known_cms = cms, menus
known_django = django
29 changes: 0 additions & 29 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,6 @@ envlist =

skip_missing_interpreters=True

[flake8]
max-line-length = 119
exclude =
*.egg-info,
.eggs,
.git,
.settings,
.tox,
build,
data,
dist,
docs,
*migrations*,
requirements,
tmp

[isort]
line_length = 79
skip = manage.py, *migrations*, .tox, .eggs, data
include_trailing_comma = true
multi_line_output = 5
not_skip = __init__.py
lines_after_imports = 2
default_section = THIRDPARTY
sections = FUTURE, STDLIB, DJANGO, CMS, THIRDPARTY, FIRSTPARTY, LIB, LOCALFOLDER
known_first_party = djangocms_snippet
known_cms = cms, menus
known_django = django

[testenv]
deps =
-r{toxinidir}/tests/requirements/base.txt
Expand Down