Skip to content

Commit c711a8c

Browse files
committed
chore: Resolve merge conflicts
2 parents 11c691b + 4166e5d commit c711a8c

19 files changed

Lines changed: 693 additions & 260 deletions

.cruft.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"template": "https://github.com/pawamoy/cookie-poetry",
3+
"commit": "97493f9f8f3ee8e2119f76431353166d50f40383",
4+
"context": {
5+
"cookiecutter": {
6+
"project_name": "git-changelog",
7+
"project_description": "Automatic Changelog generator using Jinja2 templates.",
8+
"author_fullname": "Timothée Mazzucotelli",
9+
"author_email": "pawamoy@pm.me",
10+
"author_username": "pawamoy",
11+
"repository_provider": "github.com",
12+
"repository_namespace": "pawamoy",
13+
"repository_name": "git-changelog",
14+
"copyright_holder": "Timothée Mazzucotelli",
15+
"copyright_holder_email": "pawamoy@pm.me",
16+
"copyright_date": "2018",
17+
"copyright_license": "ISC License",
18+
"python_package_distribution_name": "git-changelog",
19+
"python_package_import_name": "git_changelog",
20+
"python_package_command_line_name": "git-changelog",
21+
"_template": "https://github.com/pawamoy/cookie-poetry"
22+
}
23+
}
24+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ tests/tmp/*
99
!tests/tmp/.gitkeep
1010
pip-wheel-metadata/
1111
.pytest_cache/
12+
.python-version

.gitlab-ci.yml

Lines changed: 22 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -11,56 +11,46 @@ stages:
1111
- quality
1212
- tests
1313

14+
.install-deps-template: &install-deps
15+
before_script:
16+
- pip install poetry
17+
- poetry --version
18+
- poetry config settings.virtualenvs.in-project true
19+
- poetry install -vv
20+
21+
# Quality jobs
22+
1423
.quality-template: &quality
24+
<<: *install-deps
1525
image: python:3.6
1626
stage: quality
1727

18-
check-black:
28+
check-bandit:
1929
<<: *quality
20-
before_script:
21-
- pip install black
22-
script: black --check src/ tests/
30+
script: make check-bandit
2331

24-
check-isort:
32+
check-black:
2533
<<: *quality
26-
before_script:
27-
- pip install isort[pyproject]
28-
script: isort -c -rc src/ tests/
34+
script: make check-black
2935

3036
check-flake8:
3137
<<: *quality
32-
before_script:
33-
- pip install flake8
34-
script: flake8 src/ tests/
38+
script: make check-flake8
3539

36-
check-bandit:
40+
check-isort:
3741
<<: *quality
38-
before_script:
39-
- pip install bandit
40-
script: bandit -r src/
42+
script: make check-isort
4143

4244
check-safety:
4345
<<: *quality
44-
before_script:
45-
- apt-get update
46-
- apt-get install -y python-enchant
47-
- pip install poetry
48-
- poetry config settings.virtualenvs.in-project true
49-
- poetry install -vv
50-
- poetry --version
5146
script: make check-safety
5247

48+
# Tests jobs
49+
5350
.test-template: &test
51+
<<: *install-deps
5452
stage: tests
55-
before_script:
56-
- apt-get update
57-
- apt-get install -y python-enchant
58-
- apt-get install -y aria2
59-
- pip install poetry
60-
- poetry config settings.virtualenvs.in-project true
61-
- poetry install -vv
62-
- poetry --version
63-
script: poetry run pytest -v
53+
script: make test
6454

6555
python3.6:
6656
<<: *test
@@ -72,6 +62,4 @@ python3.7:
7262

7363
python3.8:
7464
<<: *test
75-
image: python:3.8-rc
76-
allow_failure: true
77-
65+
image: python:3.8

.python-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

CREDITS.md

Lines changed: 55 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,110 @@
1+
<!--
2+
IMPORTANT:
3+
This file is generated from the template at 'scripts/templates/CREDITS.md'.
4+
Please update the template instead of this file.
5+
-->
6+
17
# Credits
28
These projects were used to build `git-changelog`. **Thank you!**
39

410
[![`python`](https://www.vectorlogo.zone/logos/python/python-ar21.svg)](https://www.python.org/) |
5-
[`poetry`](https://poetry.eustace.io/)
11+
[`poetry`](https://poetry.eustace.io/) |
12+
[`cookie-poetry`](https://github.com/pawamoy/cookie-poetry)
613

714
### Direct dependencies
15+
[`bandit`](https://bandit.readthedocs.io/en/latest/) |
16+
[`black`](https://github.com/ambv/black) |
17+
[`coverage`](https://github.com/nedbat/coveragepy) |
18+
[`cruft`](None) |
819
[`flake8`](https://gitlab.com/pycqa/flake8) |
920
[`ipython`](https://ipython.org) |
21+
[`isort`](https://github.com/timothycrosley/isort) |
22+
[![`Jinja2`](https://www.vectorlogo.zone/logos/pocoo_jinja/pocoo_jinja-ar21.svg)](https://palletsprojects.com/p/jinja/) |
23+
[`jinja2-cli`](https://github.com/mattrobenolt/jinja2-cli) |
24+
[`pylint`](https://github.com/PyCQA/pylint) |
1025
[`pytest`](https://docs.pytest.org/en/latest/) |
1126
[`pytest-cov`](https://github.com/pytest-dev/pytest-cov) |
1227
[`pytest-sugar`](http://pivotfinland.com/pytest-sugar/) |
1328
[`pytest-xdist`](https://github.com/pytest-dev/pytest-xdist) |
1429
[`recommonmark`](https://github.com/rtfd/recommonmark) |
30+
[`safety`](https://github.com/pyupio/safety) |
1531
[`Sphinx`](http://sphinx-doc.org/) |
1632
[`sphinx-rtd-theme`](https://github.com/rtfd/sphinx_rtd_theme/) |
17-
[`sphinxcontrib-spelling`](https://github.com/sphinx-contrib/spelling)
33+
[`toml`](https://github.com/uiri/toml)
1834

1935
### Indirect dependencies
2036
[`alabaster`](https://alabaster.readthedocs.io) |
2137
[`apipkg`](https://github.com/pytest-dev/apipkg) |
38+
[`appdirs`](https://github.com/ActiveState/appdirs) |
39+
[`appnope`](https://github.com/minrk/appnope) |
40+
[`arrow`](https://arrow.readthedocs.io) |
41+
[`astroid`](https://github.com/PyCQA/astroid) |
2242
[`atomicwrites`](https://github.com/untitaker/python-atomicwrites) |
2343
[`attrs`](https://www.attrs.org/) |
2444
[`Babel`](http://babel.pocoo.org/) |
2545
[`backcall`](https://github.com/takluyver/backcall) |
46+
[`binaryornot`](https://github.com/audreyr/binaryornot) |
2647
[`certifi`](https://certifi.io/) |
2748
[`chardet`](https://github.com/chardet/chardet) |
28-
[![CommonMark](https://www.vectorlogo.zone/logos/commonmark/commonmark-ar21.svg)](https://github.com/rolandshoemaker/CommonMark-py) |
29-
[`coverage`](https://bitbucket.org/ned/coveragepy) |
49+
[`Click`](https://palletsprojects.com/p/click/) |
50+
[`colorama`](https://github.com/tartley/colorama) |
51+
[![`commonmark`](https://www.vectorlogo.zone/logos/commonmark/commonmark-ar21.svg)](https://github.com/rtfd/commonmark.py) |
52+
[`cookiecutter`](https://github.com/audreyr/cookiecutter) |
53+
[`dataclasses`](https://github.com/ericvsmith/dataclasses) |
3054
[`decorator`](https://github.com/micheles/decorator) |
3155
[`docutils`](http://docutils.sourceforge.net/) |
32-
[`execnet`](http://codespeak.net/execnet) |
56+
[`dparse`](https://github.com/jayfk/dparse) |
57+
[`entrypoints`](https://github.com/takluyver/entrypoints) |
58+
[`examples`](None) |
59+
[`execnet`](https://execnet.readthedocs.io/en/latest/) |
60+
[`falcon`](https://falconframework.org) |
61+
[`future`](https://python-future.org) |
62+
[`gitdb2`](https://github.com/gitpython-developers/gitdb) |
63+
[`GitPython`](https://github.com/gitpython-developers/GitPython) |
64+
[`hug`](https://github.com/hugapi/hug) |
3365
[`idna`](https://github.com/kjd/idna) |
3466
[`imagesize`](https://github.com/shibukawa/imagesize_py) |
67+
[`importlib-metadata`](http://importlib-metadata.readthedocs.io/) |
3568
[`ipython-genutils`](http://ipython.org) |
3669
[`jedi`](https://github.com/davidhalter/jedi) |
37-
[![jinja2](https://www.vectorlogo.zone/logos/pocoo_jinja/pocoo_jinja-ar21.svg)](http://jinja.pocoo.org/?utm_source=vectorlogozone&utm_medium=referrer) |
38-
[`MarkupSafe`](https://www.palletsprojects.com/p/markupsafe/) |
70+
[`jinja2-time`](https://github.com/hackebrot/jinja2-time) |
71+
[`lazy-object-proxy`](https://github.com/ionelmc/python-lazy-object-proxy) |
72+
[`MarkupSafe`](https://palletsprojects.com/p/markupsafe/) |
3973
[`mccabe`](https://github.com/pycqa/mccabe) |
4074
[`more-itertools`](https://github.com/erikrose/more-itertools) |
4175
[`packaging`](https://github.com/pypa/packaging) |
4276
[`parso`](https://github.com/davidhalter/parso) |
77+
[`pbr`](https://docs.openstack.org/pbr/latest/) |
4378
[`pexpect`](https://pexpect.readthedocs.io/) |
4479
[`pickleshare`](https://github.com/pickleshare/pickleshare) |
4580
[`pluggy`](https://github.com/pytest-dev/pluggy) |
81+
[`poyo`](https://github.com/hackebrot/poyo) |
4682
[`prompt-toolkit`](https://github.com/jonathanslenders/python-prompt-toolkit) |
4783
[`ptyprocess`](https://github.com/pexpect/ptyprocess) |
4884
[`py`](http://py.readthedocs.io/) |
4985
[`pycodestyle`](https://pycodestyle.readthedocs.io/) |
50-
[`pyenchant`](https://pythonhosted.org/pyenchant/) |
86+
[`pydantic`](https://github.com/samuelcolvin/pydantic) |
5187
[`pyflakes`](https://github.com/PyCQA/pyflakes) |
5288
[`Pygments`](http://pygments.org/) |
5389
[`pyparsing`](https://github.com/pyparsing/pyparsing/) |
5490
[`pytest-forked`](https://github.com/pytest-dev/pytest-forked) |
91+
[`python-dateutil`](https://dateutil.readthedocs.io) |
5592
[`pytz`](http://pythonhosted.org/pytz) |
93+
[`PyYAML`](https://github.com/yaml/pyyaml) |
94+
[`requests`](http://python-requests.org) |
5695
[`six`](https://github.com/benjaminp/six) |
57-
[`snowballstemmer`](https://github.com/shibukawa/snowball_py) |
96+
[`smmap2`](https://github.com/gitpython-developers/smmap) |
97+
[`snowballstemmer`](https://github.com/snowballstem/snowball) |
5898
[`sphinxcontrib-websupport`](http://sphinx-doc.org/) |
99+
[`stevedore`](https://docs.openstack.org/stevedore/latest/) |
59100
[`termcolor`](http://pypi.python.org/pypi/termcolor) |
60101
[`traitlets`](http://ipython.org) |
102+
[`typed-ast`](https://github.com/python/typed_ast) |
61103
[`urllib3`](https://urllib3.readthedocs.io/) |
62-
[`wcwidth`](https://github.com/jquast/wcwidth)
104+
[`wcwidth`](https://github.com/jquast/wcwidth) |
105+
[`whichcraft`](https://github.com/pydanny/whichcraft) |
106+
[`wrapt`](https://github.com/GrahamDumpleton/wrapt) |
107+
[`zipp`](https://github.com/jaraco/zipp)
63108

64109
**[More credits from the author](http://pawamoy.github.io/credits/)**
65110

Makefile

Lines changed: 66 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,41 @@
1-
.PHONY: help
2-
.PHONY: docs
3-
.PHONY: test-py36
4-
.PHONY: test-py37
5-
.PHONY: clean
6-
.PHONY: clean-tests
71
.DEFAULT_GOAL := help
82

9-
help: ## Print this help.
10-
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort
3+
PY_SRC := src/ tests/ scripts/*.py docs/conf.py
114

12-
readme: README.md ## Regenerate README.md.
13-
poetry run ./scripts/gen-readme-data.py | \
14-
poetry run jinja2 --format=json scripts/templates/README.md > README.md
5+
.PHONY: build
6+
build: ## Build the package wheel and sdist.
7+
poetry build
158

16-
docs: ## Build the documentation locally.
17-
poetry run sphinx-build -E -b html docs build/docs
18-
19-
check: check-bandit check-black check-flake8 check-isort check-safety check-docs-spelling ## Check it all!
9+
.PHONY: check
10+
check: check-bandit check-black check-flake8 check-isort check-safety ## Check it all!
2011

21-
update-spelling-wordlist: ## Update the spelling word list.
22-
scripts/update-spelling-wordlist.sh
23-
24-
check-docs-spelling: update-spelling-wordlist ## Check spelling in the documentation.
25-
scripts/check-docs-spelling.sh
12+
.PHONY: check-bandit
13+
check-bandit: ## Check for security warnings in code using bandit.
14+
poetry run bandit -r src/
2615

16+
.PHONY: check-black
2717
check-black: ## Check if code is formatted nicely using black.
28-
poetry run black --check src/ tests/ docs/conf.py
29-
30-
check-isort: ## Check if imports are correctly ordered using isort.
31-
poetry run isort -c -rc src/ tests/ docs/conf.py
18+
poetry run black --check $(PY_SRC)
3219

20+
.PHONY: check-flake8
3321
check-flake8: ## Check for general warnings in code using flake8.
34-
poetry run flake8 src/ tests/
22+
poetry run flake8 $(PY_SRC)
3523

36-
check-bandit: ## Check for security warnings in code using bandit.
37-
poetry run bandit -r src/
24+
.PHONY: check-isort
25+
check-isort: ## Check if imports are correctly ordered using isort.
26+
poetry run isort -c -rc $(PY_SRC)
3827

28+
.PHONY: check-pylint
29+
check-pylint: ## Check for code smells using pylint.
30+
poetry run pylint $(PY_SRC)
31+
32+
.PHONY: check-safety
3933
check-safety: ## Check for vulnerabilities in dependencies using safety.
4034
poetry run pip freeze 2>/dev/null | \
4135
grep -v git-changelog | \
4236
poetry run safety check --stdin --full-report 2>/dev/null
4337

44-
run-black: ## Lint the code using black.
45-
poetry run black src/ tests/ docs/conf.py
46-
47-
run-isort: ## Sort the imports using isort.
48-
poetry run isort -y -rc src/ tests/ docs/conf.py
49-
50-
lint: run-black run-isort ## Run linting tools on the code.
51-
52-
clean-tests: ## Delete temporary tests files.
53-
@rm -rf tests/tmp/* 2>/dev/null
54-
38+
.PHONY: clean
5539
clean: clean-tests ## Delete temporary files.
5640
@rm -rf build 2>/dev/null
5741
@rm -rf dist 2>/dev/null
@@ -60,5 +44,48 @@ clean: clean-tests ## Delete temporary files.
6044
@rm -rf .pytest_cache 2>/dev/null
6145
@rm -rf pip-wheel-metadata 2>/dev/null
6246

47+
.PHONY: clean-tests
48+
clean-tests: ## Delete temporary tests files.
49+
@rm -rf tests/tmp/* 2>/dev/null
50+
51+
.PHONY: credits
52+
credits: ## Regenerate CREDITS.md.
53+
poetry run ./scripts/gen-credits-data.py | \
54+
poetry run jinja2 --strict -o CREDITS.md --format=json scripts/templates/CREDITS.md -
55+
56+
.PHONY: docs
57+
docs: ## Build the documentation locally.
58+
poetry run sphinx-build -E -b html docs build/docs
59+
60+
.PHONY: help
61+
help: ## Print this help.
62+
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort
63+
64+
.PHONY: lint
65+
lint: lint-black lint-isort ## Run linting tools on the code.
66+
67+
.PHONY: lint-black
68+
lint-black: ## Lint the code using black.
69+
poetry run black $(PY_SRC)
70+
71+
.PHONY: lint-isort
72+
lint-isort: ## Sort the imports using isort.
73+
poetry run isort -y -rc $(PY_SRC)
74+
75+
.PHONY: publish
76+
publish: ## Publish the latest built version on PyPI.
77+
poetry publish
78+
79+
.PHONY: setup
80+
setup: ## Setup the development environment.
81+
poetry install
82+
83+
.PHONY: readme
84+
readme: ## Regenerate README.md.
85+
poetry run ./scripts/gen-readme-data.py | \
86+
poetry run jinja2 --strict -o README.md --format=json scripts/templates/README.md -
87+
88+
.PHONY: test
6389
test: clean-tests ## Run the tests using pytest.
64-
poetry run pytest -n6 2>/dev/null
90+
poetry run pytest -n auto -k "$(K)" 2>/dev/null
91+
-poetry run coverage html --rcfile=coverage.ini

coverage.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ omit =
1919

2020
[coverage:html]
2121
directory = build/coverage
22+
extra_css = scripts/templates/coverage.css
23+
24+
[coverage:json]
25+
output = build/coverage.json

0 commit comments

Comments
 (0)