Skip to content

Commit 2259d32

Browse files
committed
[NEW] Pytest Plugin & Other Project Types
Cookiecutter Python Package v1.6.0 Release
2 parents 57d034d + b18b321 commit 2259d32

32 files changed

+735
-154
lines changed

.github/biskotaki.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
default_context:
22
project_name: Biskotaki
3+
project_type: module
34
project_slug: biskotaki
45
repo_name: biskotaki
56
pkg_name: biskotaki
@@ -10,5 +11,4 @@ default_context:
1011
github_username: boromir674
1112
project_short_description: Project generated from the https://github.com/boromir674/cookiecutter-python-package/tree/master/src/cookiecutter_python cookiecutter
1213
initialize_git_repo: yes
13-
add_cli: no
1414
interpreters: {"supported-interpreters": ["3.6", "3.7", "3.8", "3.9", "3.10"]}

.github/workflows/test.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,10 @@ jobs:
4848
run: |
4949
PARSER="src/cookiecutter_python/{{ cookiecutter.project_slug }}/scripts/parse_version.py"
5050
PARSED_VERSION=$(python "${PARSER}")
51-
echo $PARSED_VERSION
5251
echo "PKG_VERSION=$PARSED_VERSION" >> $GITHUB_ENV
5352
5453
- name: Run Test Suite
55-
run: tox --sitepackages -vv -s false -- -n auto --run-network_bound
54+
run: tox -vv -s false -- -n auto --run-network_bound
5655
env:
5756
PLATFORM: ${{ matrix.platform }}
5857

.prospector.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ ignore-paths:
1010
- docs
1111
ignore-patterns:
1212
- (^|/)skip(this)?(/|$)
13-
- src/cookiecutter_python/{{ cookiecutter.project_slug }}/tests/smoke_test.py
13+
- src/cookiecutter_python/{{ cookiecutter.project_slug }}/src/{{ cookiecutter.pkg_name }}/__init__.py
1414
- src/cookiecutter_python/{{ cookiecutter.project_slug }}/src/{{ cookiecutter.pkg_name }}/__main__.py
1515
- src/cookiecutter_python/{{ cookiecutter.project_slug }}/src/{{ cookiecutter.pkg_name }}/cli.py
16+
- src/cookiecutter_python/{{ cookiecutter.project_slug }}/tests/smoke_test.py
17+
- src/cookiecutter_python/{{ cookiecutter.project_slug }}/tests/test_cli.py
1618
autodetect: false
1719
max-line-length: 95
1820

CHANGELOG.rst

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

5+
1.6.0 (2022-06-28)
6+
==================
7+
8+
Introducing the *Project Type* Generate Variable. Now you can select what
9+
type of Python Package you intend to develop and the Generation process
10+
shall adjust to produce the desired skeleton and infrastructure accordingly!
11+
12+
Packaged the existing functionality into the `Module` and `Module + CLI`
13+
Project Types.
14+
Added the new `Pytest Plugin` Project Type, designed for developing Pytest
15+
Plugins and Fixtures (see below).
16+
17+
Project Types currently supported:
18+
- Module: a Python Package intended to serve exclusively as a Software Library
19+
- Module + CLI: a Python Package proving a Software Library and an
20+
"installable" (executable) Command Line Program/Interface (CLI)
21+
- Pytest Plugin: a Python Package intended to providing a Pyetst Plugin (ie with
22+
a Test Fixture)
23+
24+
Changes
25+
^^^^^^^
26+
27+
feature
28+
"""""""
29+
- add 'project_type' Variable allowing for 'module', 'module+cli' or 'pytest-plugin' Projects
30+
- conditionaly populate 'test' dependencies, ie based on whether there is a cli entrypoint
31+
32+
533
1.5.2 (2022-06-22)
634
==================
735

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ For more complex use cases, you can modify the Template and also leverage all of
196196

197197
.. Github Releases & Tags
198198
199-
.. |commits_since_specific_tag_on_master| image:: https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/v1.5.2/master?color=blue&logo=github
199+
.. |commits_since_specific_tag_on_master| image:: https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/v1.6.0/master?color=blue&logo=github
200200
:alt: GitHub commits since tagged version (branch)
201-
:target: https://github.com/boromir674/cookiecutter-python-package/compare/v1.5.2..master
201+
:target: https://github.com/boromir674/cookiecutter-python-package/compare/v1.6.0..master
202202

203203
.. |commits_since_latest_github_release| image:: https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/latest?color=blue&logo=semver&sort=semver
204204
:alt: GitHub commits since latest release (by SemVer)

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ build-backend = "poetry.core.masonry.api"
1010
## Also renders on pypi as 'subtitle'
1111
[tool.poetry]
1212
name = "cookiecutter_python"
13-
version = "1.5.2"
13+
version = "1.6.0"
1414
description = "Yet another modern Python Package (pypi) with emphasis in CI/CD and automation."
1515
authors = ["Konstantinos Lampridis <k.lampridis@hotmail.com>"]
1616
maintainers = ["Konstantinos Lampridis <k.lampridis@hotmail.com>"]
@@ -98,6 +98,7 @@ requests-futures = "^1.0.0"
9898
PyInquirer = "^1.0.3"
9999
prompt-toolkit = "==1.0.14"
100100
gitpython = "^3.1"
101+
chardet = "^4.0.0"
101102

102103
# A list of all of the optional dependencies, some of which are included in the
103104
# below `extras`. They can be opted into by apps.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.5.2'
1+
__version__ = '1.6.0'

src/cookiecutter_python/__main__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""Allow to run Python Generator also through `python -m cookiecutter_python`.
32
43
Allows Python Generator to be executed through `python -m cookiecutter_python`.

src/cookiecutter_python/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ def main(
8989
like to get in touch, please see
9090
https://github.com/boromir674/cookiecutter-python-package.
9191
"""
92-
92+
print(type(exceptions['critical']))
93+
# print([_ for _ in exceptions['critical']])
9394
# TODO Improvement: add logging configuration
9495
try:
9596
project: str = generate(

src/cookiecutter_python/cookiecutter.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"project_name": "My New Project",
3+
"project_type": ["module", "module+cli", "pytest-plugin"],
34
"project_slug": "{{ cookiecutter.project_name|lower|replace(' ', '-') }}",
45
"repo_name": "{{ cookiecutter.project_slug }}",
56
"pkg_name": "{{ cookiecutter.project_slug|replace('-', '_') }}",
@@ -13,7 +14,6 @@
1314
"year": "{% now 'utc', '%Y' %}",
1415
"version": "0.0.1",
1516
"initialize_git_repo": ["yes", "no"],
16-
"add_cli": ["no", "yes"],
1717
"interpreters": {
1818
"supported-interpreters": [
1919
"3.6",

0 commit comments

Comments
 (0)