Skip to content

Commit a56091c

Browse files
authored
Added bump version and pre-commit (#107)
* Added bump version and pre-commit * Keep version changes to 1 location
1 parent f049f69 commit a56091c

File tree

6 files changed

+169
-29
lines changed

6 files changed

+169
-29
lines changed

.pre-commit-config.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
repos:
2+
# Need to drop python 3.5 and 3.6 before we include python upgrade
3+
# - repo: https://github.com/asottile/pyupgrade
4+
# rev: v2.31.0
5+
# hooks:
6+
# - id: pyupgrade
7+
# args: ["--py37-plus"]
8+
9+
- repo: https://github.com/adamchainz/django-upgrade
10+
rev: '1.4.0'
11+
hooks:
12+
- id: django-upgrade
13+
args: [--target-version, "2.2"]
14+
15+
- repo: https://github.com/PyCQA/flake8
16+
rev: 4.0.1
17+
hooks:
18+
- id: flake8
19+
20+
- repo: https://github.com/asottile/yesqa
21+
rev: v1.3.0
22+
hooks:
23+
- id: yesqa
24+
25+
- repo: https://github.com/pre-commit/pre-commit-hooks
26+
rev: v4.1.0
27+
hooks:
28+
- id: check-merge-conflict
29+
- id: mixed-line-ending
30+
31+
- repo: https://github.com/pycqa/isort
32+
rev: 5.10.1
33+
hooks:
34+
- id: isort

CHANGELOG.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Changelog
33
=========
44

5+
unreleased
6+
==========
7+
58

69
3.0.0 (2020-09-02)
710
==================

requirements.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
bump2version
2+
django-cms>=3.7
3+
django-treebeard>=4.3,<4.5
4+
pip-tools
5+
pre-commit
6+
wheel

requirements.txt

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
#
2+
# This file is autogenerated by pip-compile with python 3.9
3+
# To update, run:
4+
#
5+
# pip-compile
6+
#
7+
--trusted-host pypi.python.org
8+
--trusted-host pypi.org
9+
--trusted-host files.pythonhosted.org
10+
11+
asgiref==3.5.0
12+
# via django
13+
bump2version==1.0.1
14+
# via -r requirements.in
15+
cfgv==3.3.1
16+
# via pre-commit
17+
click==8.0.3
18+
# via pip-tools
19+
distlib==0.3.4
20+
# via virtualenv
21+
django==4.0.1
22+
# via
23+
# django-classy-tags
24+
# django-cms
25+
# django-formtools
26+
# django-sekizai
27+
# django-treebeard
28+
django-classy-tags==3.0.0
29+
# via
30+
# django-cms
31+
# django-sekizai
32+
django-cms==3.9.0
33+
# via -r requirements.in
34+
django-formtools==2.3
35+
# via django-cms
36+
django-sekizai==3.0.0
37+
# via django-cms
38+
django-treebeard==4.4
39+
# via
40+
# -r requirements.in
41+
# django-cms
42+
djangocms-admin-style==3.0.0
43+
# via django-cms
44+
filelock==3.4.2
45+
# via virtualenv
46+
identify==2.4.4
47+
# via pre-commit
48+
nodeenv==1.6.0
49+
# via pre-commit
50+
pep517==0.12.0
51+
# via pip-tools
52+
pip-tools==6.4.0
53+
# via -r requirements.in
54+
platformdirs==2.4.1
55+
# via virtualenv
56+
pre-commit==2.17.0
57+
# via -r requirements.in
58+
pyyaml==6.0
59+
# via pre-commit
60+
six==1.16.0
61+
# via virtualenv
62+
sqlparse==0.4.2
63+
# via django
64+
toml==0.10.2
65+
# via pre-commit
66+
tomli==2.0.0
67+
# via pep517
68+
virtualenv==20.13.0
69+
# via pre-commit
70+
wheel==0.37.1
71+
# via
72+
# -r requirements.in
73+
# pip-tools
74+
75+
# The following packages are considered to be unsafe in a requirements file:
76+
# pip
77+
# setuptools

setup.cfg

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[bumpversion]
2+
current_version = 3.0.0
3+
commit = True
4+
tag = False
5+
6+
[bumpversion:file:djangocms_snippet/__init__.py]
7+
search = __version__ = '{current_version}'
8+
replace = __version__ = '{new_version}'
9+
10+
[bumpversion:file:CHANGELOG.rst]
11+
search =
12+
unreleased
13+
==========
14+
replace =
15+
unreleased
16+
==========
17+
18+
{new_version} {utcnow:%%Y-%%m-%%d}
19+
================
20+
21+
[flake8]
22+
max-line-length = 119
23+
exclude =
24+
*.egg-info,
25+
.eggs,
26+
.env,
27+
.git,
28+
.settings,
29+
.tox,
30+
.venv,
31+
build,
32+
data,
33+
dist,
34+
docs,
35+
*migrations*,
36+
requirements,
37+
tmp
38+
39+
[isort]
40+
line_length = 79
41+
skip = manage.py, *migrations*, .tox, .eggs, data, .venv, .env
42+
include_trailing_comma = true
43+
multi_line_output = 5
44+
lines_after_imports = 2
45+
default_section = THIRDPARTY
46+
sections = FUTURE, STDLIB, DJANGO, CMS, THIRDPARTY, FIRSTPARTY, LOCALFOLDER
47+
known_first_party = djangocms_snippet
48+
known_cms = cms, menus
49+
known_django = django

tox.ini

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,6 @@ envlist =
88

99
skip_missing_interpreters=True
1010

11-
[flake8]
12-
max-line-length = 119
13-
exclude =
14-
*.egg-info,
15-
.eggs,
16-
.git,
17-
.settings,
18-
.tox,
19-
build,
20-
data,
21-
dist,
22-
docs,
23-
*migrations*,
24-
requirements,
25-
tmp
26-
27-
[isort]
28-
line_length = 79
29-
skip = manage.py, *migrations*, .tox, .eggs, data
30-
include_trailing_comma = true
31-
multi_line_output = 5
32-
not_skip = __init__.py
33-
lines_after_imports = 2
34-
default_section = THIRDPARTY
35-
sections = FUTURE, STDLIB, DJANGO, CMS, THIRDPARTY, FIRSTPARTY, LIB, LOCALFOLDER
36-
known_first_party = djangocms_snippet
37-
known_cms = cms, menus
38-
known_django = django
39-
4011
[testenv]
4112
deps =
4213
-r{toxinidir}/tests/requirements/base.txt

0 commit comments

Comments
 (0)