Skip to content
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
22 changes: 10 additions & 12 deletions cookiecutter.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"full_name": "Adrián Lattes",
"email": "adrianlattes@disroot.org",
"github_username": "haztecaso",
"project_name": "My cool python project",
"project_name": null,
"project_slug": "{{ cookiecutter.project_name.lower().replace(' ', '_').replace('-', '_') }}",
"project_short_description": "Short description",
"project_short_description": null,
"author": null,
"author_email": null,
"github_username": null,
"use_asyncio": "y",
"command_line_interface": [
"click",
Expand All @@ -13,13 +13,11 @@
],
"use_mkdocs": "y",
"open_source_license": [
"MIT license",
"BSD license",
"ISC license",
"Apache Software License 2.0",
"GNU General Public License v3",
"Not open source"
"GNU General Public License v3 (GPLv3)",
"Apache Software License",
"MIT License",
"BSD License"
],
"security_advisories_email": "{{ cookiecutter.email }}",
"security_advisories_email": "{{ cookiecutter.author_email }}",
"__gh_slug": "{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}"
}
28 changes: 27 additions & 1 deletion tests/contexts.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,47 @@
{
"default": {},
"default": {
"author": "Test Author",
"author_email": "test@email.com",
"project_name": "My Cool Python Project",
"project_short_description": "A short description",
"github_username": "testuser"
},
"minimalist": {
"author": "Test Author",
"author_email": "test@email.com",
"project_name": "My Cool Python Project",
"project_short_description": "A short description",
"github_username": "testuser",
"use_asyncio": "n",
"command_line_interface": "None",
"use_mkdocs": "n"
},
"click": {
"author": "Test Author",
"author_email": "test@email.com",
"project_name": "My Cool Python Project",
"project_short_description": "A short description",
"github_username": "testuser",
"use_asyncio": "n",
"command_line_interface": "click",
"use_mkdocs": "n"
},
"argparse": {
"author": "Test Author",
"author_email": "test@email.com",
"project_name": "My Cool Python Project",
"project_short_description": "A short description",
"github_username": "testuser",
"use_asyncio": "n",
"command_line_interface": "argparse",
"use_mkdocs": "n"
},
"mkdocs": {
"author": "Test Author",
"author_email": "test@email.com",
"project_name": "My Cool Python Project",
"project_short_description": "A short description",
"github_username": "testuser",
"use_asyncio": "n",
"command_line_interface": "None",
"use_mkdocs": "y"
Expand Down
24 changes: 8 additions & 16 deletions {{cookiecutter.project_slug}}/LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% if cookiecutter.open_source_license == 'MIT license' -%}
{% if cookiecutter.open_source_license == 'MIT License' -%}
MIT License

Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.full_name }}
Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.author }}

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -20,10 +20,10 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
{%- elif cookiecutter.open_source_license == 'BSD license' -%}
{%- elif cookiecutter.open_source_license == 'BSD License' -%}
BSD License

Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.full_name }}
Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.author }}
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand All @@ -50,18 +50,10 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
{%- elif cookiecutter.open_source_license == 'ISC license' -%}
ISC License

Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.full_name }}

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
{%- elif cookiecutter.open_source_license == 'Apache Software License 2.0' -%}
{%- elif cookiecutter.open_source_license == 'Apache Software License' -%}
Apache Software License 2.0

Copyright (c) {%- now 'local', '%Y' %}, {{ cookiecutter.full_name }}
Copyright (c) {%- now 'local', '%Y' %}, {{ cookiecutter.author }}

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -74,12 +66,12 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
{%- elif cookiecutter.open_source_license == 'GNU General Public License v3' -%}
{%- elif cookiecutter.open_source_license == 'GNU General Public License v3 (GPLv3)' -%}
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

{{ cookiecutter.project_short_description }}
Copyright (C) {% now 'local', '%Y' %} {{ cookiecutter.full_name }}
Copyright (C) {% now 'local', '%Y' %} {{ cookiecutter.author }}

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
1 change: 1 addition & 0 deletions {{cookiecutter.project_slug}}/flake.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
description = "{{ cookiecutter.project_short_description }}";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
site_name: {{ cookiecutter.project_name }}
site_description: {{ cookiecutter.project_short_description }}
site_author: {{ cookiecutter.full_name }}
site_author: {{ cookiecutter.author }}

repo_url: https://github.com/{{ cookiecutter.__gh_slug }}
repo_name: {{ cookiecutter.__gh_slug }}
Expand Down
14 changes: 14 additions & 0 deletions {{cookiecutter.project_slug}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version = "0.1.0"
description = "{{ cookiecutter.project_short_description }}"
readme = "README.md"
requires-python = ">=3.10"
authors = [
{name="{{ cookiecutter.author }}", email="{{ cookiecutter.author_email }}"},
]
dependencies = [
{%- if cookiecutter.command_line_interface.lower() == "click" %}
"click",
Expand All @@ -12,6 +15,17 @@ dependencies = [
"asyncio",
{%- endif %}
]
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: {{ cookiecutter.open_source_license }}",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Natural Language :: English",
]

[build-system]
requires = ["hatchling"]
Expand Down