diff --git a/cookiecutter.json b/cookiecutter.json index 72ea159..87ea83e 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -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", @@ -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 }}" } diff --git a/tests/contexts.json b/tests/contexts.json index 3a3f7c1..01c58c3 100644 --- a/tests/contexts.json +++ b/tests/contexts.json @@ -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" diff --git a/{{cookiecutter.project_slug}}/LICENSE b/{{cookiecutter.project_slug}}/LICENSE index f7f3843..a763da9 100644 --- a/{{cookiecutter.project_slug}}/LICENSE +++ b/{{cookiecutter.project_slug}}/LICENSE @@ -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 @@ -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, @@ -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. @@ -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 diff --git a/{{cookiecutter.project_slug}}/flake.nix b/{{cookiecutter.project_slug}}/flake.nix index a372241..1990354 100644 --- a/{{cookiecutter.project_slug}}/flake.nix +++ b/{{cookiecutter.project_slug}}/flake.nix @@ -1,4 +1,5 @@ { + description = "{{ cookiecutter.project_short_description }}"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; diff --git a/{{cookiecutter.project_slug}}/mkdocs.yml b/{{cookiecutter.project_slug}}/mkdocs.yml index 8dfb256..5f6e03d 100644 --- a/{{cookiecutter.project_slug}}/mkdocs.yml +++ b/{{cookiecutter.project_slug}}/mkdocs.yml @@ -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 }} diff --git a/{{cookiecutter.project_slug}}/pyproject.toml b/{{cookiecutter.project_slug}}/pyproject.toml index 2f3bd8f..3631be9 100644 --- a/{{cookiecutter.project_slug}}/pyproject.toml +++ b/{{cookiecutter.project_slug}}/pyproject.toml @@ -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", @@ -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"]