Skip to content

Commit

Permalink
Modified template to replace hyphens with underscores
Browse files Browse the repository at this point in the history
  • Loading branch information
clamytoe committed Nov 8, 2023
1 parent 8a44b83 commit 3218242
Show file tree
Hide file tree
Showing 15 changed files with 211 additions and 210 deletions.
3 changes: 2 additions & 1 deletion cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
12 changes: 6 additions & 6 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: toepack
channels:
- defaults
dependencies:
- cookiecutter
- python[version='>=3.9']
name: toepack
channels:
- defaults
dependencies:
- cookiecutter
- python[version='>=3.10']
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: {{cookiecutter.project_name}}
name: {{cookiecutter.__project_slug}}
channels:
- defaults
- conda-forge
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
black
flake8
isort
mypy
pytest
pytest-cov
black
flake8
isort
mypy
pytest
pytest-cov
Original file line number Diff line number Diff line change
@@ -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}}/',
},
)
Loading

0 comments on commit 3218242

Please sign in to comment.