diff --git a/cookiecutter.json b/cookiecutter.json index 03c6994..d85db1d 100755 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -5,7 +5,8 @@ "version": "0.1.0", "year": "{% now 'utc', '%Y' %}", "python_version": "3.10.12", - "project_name": "toepack_clone", + "project_name": "Toepack Clone", + "__project_slug": "{{ cookiecutter.project_name|lower|replace(' ', '_')|replace('-', '_') }}", "project_title": "Clamytoe's Project Template", "description": "Bare minimum Python project templating system based on Cookiecutter.", "_copy_without_render": [ diff --git a/environment.yml b/environment.yml index 8bd8805..b2b01cb 100755 --- a/environment.yml +++ b/environment.yml @@ -1,6 +1,6 @@ -name: toepack -channels: - - defaults -dependencies: - - cookiecutter - - python[version='>=3.9'] +name: toepack +channels: + - defaults +dependencies: + - cookiecutter + - python[version='>=3.10'] diff --git a/{{cookiecutter.project_name}}/.flake8 b/{{cookiecutter.__project_slug}}/.flake8 similarity index 100% rename from {{cookiecutter.project_name}}/.flake8 rename to {{cookiecutter.__project_slug}}/.flake8 diff --git a/{{cookiecutter.project_name}}/.gitattributes b/{{cookiecutter.__project_slug}}/.gitattributes similarity index 95% rename from {{cookiecutter.project_name}}/.gitattributes rename to {{cookiecutter.__project_slug}}/.gitattributes index 8e5d372..a840e26 100644 --- a/{{cookiecutter.project_name}}/.gitattributes +++ b/{{cookiecutter.__project_slug}}/.gitattributes @@ -1,7 +1,7 @@ -*.css diff=css -*.htm diff=html -*.html diff=html -*.xhtml diff=html -*.md diff=markdown -*.ipynb diff=python -*.py diff=python +*.css diff=css +*.htm diff=html +*.html diff=html +*.xhtml diff=html +*.md diff=markdown +*.ipynb diff=python +*.py diff=python diff --git a/{{cookiecutter.project_name}}/.gitignore b/{{cookiecutter.__project_slug}}/.gitignore similarity index 100% rename from {{cookiecutter.project_name}}/.gitignore rename to {{cookiecutter.__project_slug}}/.gitignore diff --git a/{{cookiecutter.project_name}}/LICENSE b/{{cookiecutter.__project_slug}}/LICENSE similarity index 98% rename from {{cookiecutter.project_name}}/LICENSE rename to {{cookiecutter.__project_slug}}/LICENSE index 4279f6f..33ba2bf 100755 --- a/{{cookiecutter.project_name}}/LICENSE +++ b/{{cookiecutter.__project_slug}}/LICENSE @@ -1,21 +1,21 @@ -MIT License - -Copyright (c) {{cookiecutter.year}} {{cookiecutter.full_name}} - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -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. +MIT License + +Copyright (c) {{cookiecutter.year}} {{cookiecutter.full_name}} + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +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. diff --git a/{{cookiecutter.project_name}}/README.md b/{{cookiecutter.__project_slug}}/README.md similarity index 75% rename from {{cookiecutter.project_name}}/README.md rename to {{cookiecutter.__project_slug}}/README.md index 334dd95..b95a33f 100755 --- a/{{cookiecutter.project_name}}/README.md +++ b/{{cookiecutter.__project_slug}}/README.md @@ -1,90 +1,90 @@ -# {{cookiecutter.project_title}} (*{{cookiecutter.project_name}}*) - -> *{{cookiecutter.description}}* - -![Python version][python-version] -![Latest version][latest-version] -[![GitHub issues][issues-image]][issues-url] -[![GitHub forks][fork-image]][fork-url] -[![GitHub Stars][stars-image]][stars-url] -[![License][license-image]][license-url] - -NOTE: This project was generated with [Cookiecutter](https://github.com/audreyr/cookiecutter) along with [@clamytoe's](https://github.com/clamytoe) [toepack](https://github.com/clamytoe/toepack) project template. - -## Initial setup - -```zsh -cd Projects -git clone https://github.com/{{cookiecutter.github_account}}/{{cookiecutter.project_name}}.git -cd {{cookiecutter.project_name}} -``` - -### Anaconda setup - -If you are an Anaconda user, this command will get you up to speed with the base installation. - -```zsh -conda env create -conda activate {{cookiecutter.project_name}} -``` - -### Regular Python setup - -If you are just using normal Python, this will get you ready, but I highly recommend that you do this in a virtual environment. -There are many ways to do this, the simplest using *venv*. - -```zsh -python3 -m venv venv -source venv/bin/activate -pip install -r requirements.txt -``` - -### Final setup - -```zsh -pip install -e . -``` - -## Usage - -```zsh -{{cookiecutter.project_name}} -``` - -The output should be: `Successfully installed your project file: {{cookiecutter.project_name}}` - -## Contributing - -Contributions are welcomed. -Tests can be run with with `pytest -v`, please ensure that all tests are passing and that you've checked your code with the following packages before submitting a pull request: - -* black -* flake8 -* isort -* mypy -* pytest-cov - -I am not adhering to them strictly, but try to clean up what's reasonable. - -## License - -Distributed under the terms of the [MIT](https://opensource.org/licenses/MIT) license, "{{cookiecutter.project_name}}" is free and open source software. - -## Issues - -If you encounter any problems, please [file an issue](https://github.com/clamytoe/toepack/issues) along with a detailed description. - -## Changelog - -* **v{{cookiecutter.version}}** Initial commit. - -[python-version]:https://img.shields.io/badge/python-{{cookiecutter.python_version}}-brightgreen.svg -[latest-version]:https://img.shields.io/badge/version-{{cookiecutter.version}}-blue.svg -[issues-image]:https://img.shields.io/github/issues/{{cookiecutter.github_account}}/{{cookiecutter.project_name}}.svg -[issues-url]:https://github.com/{{cookiecutter.github_account}}/{{cookiecutter.project_name}}/issues -[fork-image]:https://img.shields.io/github/forks/{{cookiecutter.github_account}}/{{cookiecutter.project_name}}.svg -[fork-url]:https://github.com/{{cookiecutter.github_account}}/{{cookiecutter.project_name}}/network -[stars-image]:https://img.shields.io/github/stars/{{cookiecutter.github_account}}/{{cookiecutter.project_name}}.svg -[stars-url]:https://github.com/{{cookiecutter.github_account}}/{{cookiecutter.project_name}}/stargazers -[license-image]:https://img.shields.io/github/license/{{cookiecutter.github_account}}/{{cookiecutter.project_name}}.svg -[license-url]:https://github.com/{{cookiecutter.github_account}}/{{cookiecutter.project_name}}/blob/master/LICENSE +# {{cookiecutter.project_title}} (*{{cookiecutter.__project_slug}}*) + +> *{{cookiecutter.description}}* + +![Python version][python-version] +![Latest version][latest-version] +[![GitHub issues][issues-image]][issues-url] +[![GitHub forks][fork-image]][fork-url] +[![GitHub Stars][stars-image]][stars-url] +[![License][license-image]][license-url] + +NOTE: This project was generated with [Cookiecutter](https://github.com/audreyr/cookiecutter) along with [@clamytoe's](https://github.com/clamytoe) [toepack](https://github.com/clamytoe/toepack) project template. + +## Initial setup + +```zsh +cd Projects +git clone https://github.com/{{cookiecutter.github_account}}/{{cookiecutter.__project_slug}}.git +cd {{cookiecutter.__project_slug}} +``` + +### Anaconda setup + +If you are an Anaconda user, this command will get you up to speed with the base installation. + +```zsh +conda env create +conda activate {{cookiecutter.__project_slug}} +``` + +### Regular Python setup + +If you are just using normal Python, this will get you ready, but I highly recommend that you do this in a virtual environment. +There are many ways to do this, the simplest using *venv*. + +```zsh +python3 -m venv venv +source venv/bin/activate +pip install -r requirements.txt +``` + +### Final setup + +```zsh +pip install -e . +``` + +## Usage + +```zsh +{{cookiecutter.__project_slug}} +``` + +The output should be: `Successfully installed your project file: {{cookiecutter.__project_slug}}` + +## Contributing + +Contributions are welcomed. +Tests can be run with with `pytest -v`, please ensure that all tests are passing and that you've checked your code with the following packages before submitting a pull request: + +* black +* flake8 +* isort +* mypy +* pytest-cov + +I am not adhering to them strictly, but try to clean up what's reasonable. + +## License + +Distributed under the terms of the [MIT](https://opensource.org/licenses/MIT) license, "{{cookiecutter.__project_slug}}" is free and open source software. + +## Issues + +If you encounter any problems, please [file an issue](https://github.com/clamytoe/toepack/issues) along with a detailed description. + +## Changelog + +* **v{{cookiecutter.version}}** Initial commit. + +[python-version]:https://img.shields.io/badge/python-{{cookiecutter.python_version}}-brightgreen.svg +[latest-version]:https://img.shields.io/badge/version-{{cookiecutter.version}}-blue.svg +[issues-image]:https://img.shields.io/github/issues/{{cookiecutter.github_account}}/{{cookiecutter.__project_slug}}.svg +[issues-url]:https://github.com/{{cookiecutter.github_account}}/{{cookiecutter.__project_slug}}/issues +[fork-image]:https://img.shields.io/github/forks/{{cookiecutter.github_account}}/{{cookiecutter.__project_slug}}.svg +[fork-url]:https://github.com/{{cookiecutter.github_account}}/{{cookiecutter.__project_slug}}/network +[stars-image]:https://img.shields.io/github/stars/{{cookiecutter.github_account}}/{{cookiecutter.__project_slug}}.svg +[stars-url]:https://github.com/{{cookiecutter.github_account}}/{{cookiecutter.__project_slug}}/stargazers +[license-image]:https://img.shields.io/github/license/{{cookiecutter.github_account}}/{{cookiecutter.__project_slug}}.svg +[license-url]:https://github.com/{{cookiecutter.github_account}}/{{cookiecutter.__project_slug}}/blob/master/LICENSE diff --git a/{{cookiecutter.project_name}}/environment.yml b/{{cookiecutter.__project_slug}}/environment.yml similarity index 77% rename from {{cookiecutter.project_name}}/environment.yml rename to {{cookiecutter.__project_slug}}/environment.yml index 4206bd6..ac7866b 100755 --- a/{{cookiecutter.project_name}}/environment.yml +++ b/{{cookiecutter.__project_slug}}/environment.yml @@ -1,4 +1,4 @@ -name: {{cookiecutter.project_name}} +name: {{cookiecutter.__project_slug}} channels: - defaults - conda-forge diff --git a/{{cookiecutter.project_name}}/requirements-dev.txt b/{{cookiecutter.__project_slug}}/requirements-dev.txt similarity index 87% rename from {{cookiecutter.project_name}}/requirements-dev.txt rename to {{cookiecutter.__project_slug}}/requirements-dev.txt index 48dab76..25c5206 100755 --- a/{{cookiecutter.project_name}}/requirements-dev.txt +++ b/{{cookiecutter.__project_slug}}/requirements-dev.txt @@ -1,6 +1,6 @@ -black -flake8 -isort -mypy -pytest -pytest-cov +black +flake8 +isort +mypy +pytest +pytest-cov diff --git a/{{cookiecutter.project_name}}/requirements.txt b/{{cookiecutter.__project_slug}}/requirements.txt similarity index 100% rename from {{cookiecutter.project_name}}/requirements.txt rename to {{cookiecutter.__project_slug}}/requirements.txt diff --git a/{{cookiecutter.project_name}}/setup.py b/{{cookiecutter.__project_slug}}/setup.py similarity index 70% rename from {{cookiecutter.project_name}}/setup.py rename to {{cookiecutter.__project_slug}}/setup.py index f5bac91..ea3439b 100755 --- a/{{cookiecutter.project_name}}/setup.py +++ b/{{cookiecutter.__project_slug}}/setup.py @@ -1,56 +1,56 @@ -""" -setup.py - -Setup for installing the package. -""" -from setuptools import setup, find_packages -from pathlib import Path - -import {{cookiecutter.project_name}} - -VERSION = {{cookiecutter.project_name}}.__version__ -AUTHOR = {{cookiecutter.project_name}}.__author__ -EMAIL = {{cookiecutter.project_name}}.__email__ - -BASE_DIR = Path(__file__).resolve().parent -README = BASE_DIR.joinpath("README.md") - -setup( - name="{{cookiecutter.project_name}}", - version=VERSION, - description="{{cookiecutter.description}} ({{cookiecutter.project_name}})", - long_description=README.read_text(), - long_description_content_type="text/markdown", - url="https://github.com/{{cookiecutter.github_account}}/{{cookiecutter.project_name}}", - author=AUTHOR, - author_email=EMAIL, - # For a list of valid classifiers, see https://pypi.org/classifiers/ - classifiers=[ - # How mature is this project? Common values are - # 1 - Planning - # 2 - Pre-Alpha - # 3 - Alpha - # 4 - Beta - # 5 - Production/Stable - # 6 - Mature - # 7 - Inactive - "Development Status :: 1 - Planning", - "Intended Audience :: End Users/Desktop", - "Topic :: Utilities", - "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: {{cookiecutter.python_version}}", - ], - keywords="python utility", - packages=find_packages(exclude=["contrib", "docs", "tests"]), - install_requires=["pytest"], - license="MIT", - entry_points={ - "console_scripts": [ - "{{cookiecutter.project_name}}={{cookiecutter.project_name}}.app:main" - ], - }, - project_urls={ - 'Bug Reports': 'https://github.com/{{cookiecutter.github_account}}/{{cookiecutter.project_name}}/issues', - 'Source': 'https://github.com/{{cookiecutter.github_account}}/{{cookiecutter.project_name}}/', - }, -) +""" +setup.py + +Setup for installing the package. +""" +from setuptools import setup, find_packages +from pathlib import Path + +import {{cookiecutter.__project_slug}} + +VERSION = {{cookiecutter.__project_slug}}.__version__ +AUTHOR = {{cookiecutter.__project_slug}}.__author__ +EMAIL = {{cookiecutter.__project_slug}}.__email__ + +BASE_DIR = Path(__file__).resolve().parent +README = BASE_DIR.joinpath("README.md") + +setup( + name="{{cookiecutter.__project_slug}}", + version=VERSION, + description="{{cookiecutter.description}} ({{cookiecutter.__project_slug}})", + long_description=README.read_text(), + long_description_content_type="text/markdown", + url="https://github.com/{{cookiecutter.github_account}}/{{cookiecutter.__project_slug}}", + author=AUTHOR, + author_email=EMAIL, + # For a list of valid classifiers, see https://pypi.org/classifiers/ + classifiers=[ + # How mature is this project? Common values are + # 1 - Planning + # 2 - Pre-Alpha + # 3 - Alpha + # 4 - Beta + # 5 - Production/Stable + # 6 - Mature + # 7 - Inactive + "Development Status :: 1 - Planning", + "Intended Audience :: End Users/Desktop", + "Topic :: Utilities", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: {{cookiecutter.python_version}}", + ], + keywords="python utility", + packages=find_packages(exclude=["contrib", "docs", "tests"]), + install_requires=["pytest"], + license="MIT", + entry_points={ + "console_scripts": [ + "{{cookiecutter.__project_slug}}={{cookiecutter.__project_slug}}.app:main" + ], + }, + project_urls={ + 'Bug Reports': 'https://github.com/{{cookiecutter.github_account}}/{{cookiecutter.__project_slug}}/issues', + 'Source': 'https://github.com/{{cookiecutter.github_account}}/{{cookiecutter.__project_slug}}/', + }, +) diff --git a/{{cookiecutter.project_name}}/tests/__init__.py b/{{cookiecutter.__project_slug}}/tests/__init__.py similarity index 100% rename from {{cookiecutter.project_name}}/tests/__init__.py rename to {{cookiecutter.__project_slug}}/tests/__init__.py diff --git a/{{cookiecutter.project_name}}/tests/test_{{cookiecutter.project_name}}.py b/{{cookiecutter.__project_slug}}/tests/test_{{cookiecutter.__project_slug}}.py similarity index 59% rename from {{cookiecutter.project_name}}/tests/test_{{cookiecutter.project_name}}.py rename to {{cookiecutter.__project_slug}}/tests/test_{{cookiecutter.__project_slug}}.py index 1408e56..7506537 100755 --- a/{{cookiecutter.project_name}}/tests/test_{{cookiecutter.project_name}}.py +++ b/{{cookiecutter.__project_slug}}/tests/test_{{cookiecutter.__project_slug}}.py @@ -1,11 +1,11 @@ """ -test_{{cookiecutter.project_name}}.py +test_{{cookiecutter.__project_slug}}.py -Tests for {{cookiecutter.project_name}}. +Tests for {{cookiecutter.__project_slug}}. """ from os import environ from dotenv import load_dotenv -from {{cookiecutter.project_name}} import __version__ +from {{cookiecutter.__project_slug}} import __version__ def test_version(): diff --git a/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/__init__.py b/{{cookiecutter.__project_slug}}/{{cookiecutter.__project_slug}}/__init__.py similarity index 71% rename from {{cookiecutter.project_name}}/{{cookiecutter.project_name}}/__init__.py rename to {{cookiecutter.__project_slug}}/{{cookiecutter.__project_slug}}/__init__.py index eaf991a..ab5644f 100755 --- a/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/__init__.py +++ b/{{cookiecutter.__project_slug}}/{{cookiecutter.__project_slug}}/__init__.py @@ -1,5 +1,5 @@ -from {{cookiecutter.project_name}} import * - -__author__ = '{{cookiecutter.full_name}}' -__email__ = '{{cookiecutter.email_address}}' -__version__ = '{{cookiecutter.version}}' +from {{cookiecutter.__project_slug}} import * + +__author__ = '{{cookiecutter.full_name}}' +__email__ = '{{cookiecutter.email_address}}' +__version__ = '{{cookiecutter.version}}' diff --git a/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/app.py b/{{cookiecutter.__project_slug}}/{{cookiecutter.__project_slug}}/app.py similarity index 83% rename from {{cookiecutter.project_name}}/{{cookiecutter.project_name}}/app.py rename to {{cookiecutter.__project_slug}}/{{cookiecutter.__project_slug}}/app.py index e5adca9..dbf758f 100755 --- a/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/app.py +++ b/{{cookiecutter.__project_slug}}/{{cookiecutter.__project_slug}}/app.py @@ -1,14 +1,14 @@ -#!/usr/bin/env python3 -""" -app.py - -{{cookiecutter.project_title}} -""" - - -def main(): - print("Successfully installed your project file: {{cookiecutter.project_name}}") - - -if __name__ == "__main__": - main() +#!/usr/bin/env python3 +""" +app.py + +{{cookiecutter.project_title}} +""" + + +def main(): + print("Successfully installed your project file: {{cookiecutter.__project_slug}}") + + +if __name__ == "__main__": + main()