Skip to content

Commit da50391

Browse files
committed
v1.4.0
1 parent 4aef0d6 commit da50391

File tree

9 files changed

+34
-27
lines changed

9 files changed

+34
-27
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# CHANGELOG
22

3-
# v1.3.0 (2021-05-31)
3+
## v1.4.0 (2021-07-12)
4+
5+
* Clarified various pieces of info
6+
* Unified more text replacements for easier usage of the template when getting started
7+
8+
## v1.3.0 (2021-05-31)
49

510
* Pins dependencies and moves them to a constant
611
* Adds missing lines to code coverage report

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@ help:
66

77
## venv - Install the virtual environment
88
venv:
9-
$(VIRTUALENV) ~/.venv/python_project/
10-
ln -snf ~/.venv/python_project/ venv
9+
$(VIRTUALENV) ~/.venv/project_name/
10+
ln -snf ~/.venv/project_name/ venv
1111
venv/bin/pip install -e ."[dev]"
1212

1313
## install - Install the project locally
1414
install: | venv
1515

1616
## clean - Remove the virtual environment and clear out .pyc files
1717
clean:
18-
rm -rf ~/.venv/python_project/ venv
18+
rm -rf ~/.venv/project_name/ venv
1919
find . -name '*.pyc' -delete
2020
rm -rf dist
2121
rm -rf build
2222
rm -rf *.egg-info
2323

2424
## lint - Lint the project
2525
lint:
26-
venv/bin/flake8 python_project/*.py
26+
venv/bin/flake8 project_name/*.py
2727
venv/bin/flake8 test/unit/*.py
2828

2929
## test - Test the project
@@ -32,6 +32,6 @@ test:
3232

3333
## coverage - Test the project and generate an HTML coverage report
3434
coverage:
35-
venv/bin/pytest --cov=python_project --cov-branch --cov-report=html --cov-report=term-missing
35+
venv/bin/pytest --cov=project_name --cov-branch --cov-report=html --cov-report=term-missing
3636

3737
.PHONY: help install clean lint test coverage

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,22 @@ Click the `Use this template` button at the top of this project's GitHub page, i
2424

2525
**Easy text replacements**
2626

27-
1. Replace all instances of `python_project` with the name of your project
28-
1. Replace all instances of `Python Template` with the name of your project
29-
1. Replace all instances of `PROJECT_NAME` with the name of your project
30-
1. Replace all instances of `USERNAME` with the name of the author/owner as it appears on GitHub
27+
1. Replace all instances of `project_name` with the name of your project
28+
* These are the Python snake_case references (eg: `project_name`)
29+
1. Replace all instances of `PROJECT_NAME_URL` with the name of your project
30+
* These are the references to your project that will appear in URLs and are typically hyphenated (eg: `project-name`)
31+
1. Replace all instances of `USERNAME` with the name of the author or owner of the project
32+
* These are references typically found in the URL of your project as it appears on GitHub
3133

3234
**File configuration**
3335

3436
1. Configure the `setup.py` file
3537
1. Configure the `Makefile` targets
36-
1. Update the name in the `LICENSE`
38+
1. Update the name in the `LICENSE` or swap it out entirely
3739
1. Configure the `.github/workflows/build.yml` file
38-
1. Update the `CHANGELOG`
39-
1. Replace the showcase image in `/assets` and remove all other unneeded assets
4040
1. Change the data in `.github/FUNDING.yml`
41+
1. Update the `CHANGELOG.md` with your own info
42+
1. Replace the showcase image in `/assets` and remove all other unused assets
4143
1. Rename other files/folders as needed and configure their content
4244
1. Delete this `README` and rename `README_project.md` to `README.md`
4345

README_project.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<div align="center">
22

3-
# Python Project
3+
# Project Name
44

55
A one-liner description of your project goes here.
66

7-
[![Build Status](https://github.com/Justintime50/PROJECT_NAME/workflows/build/badge.svg)](https://github.com/Justintime50/PROJECT_NAME/actions)
8-
[![Coverage Status](https://coveralls.io/repos/github/USERNAME/PROJECT_NAME/badge.svg?branch=main)](https://coveralls.io/github/USERNAME/PROJECT_NAME?branch=main)
9-
[![PyPi](https://img.shields.io/pypi/v/PROJECT_NAME)](https://pypi.org/project/PROJECT_NAME)
10-
[![Licence](https://img.shields.io/github/license/USERNAME/PROJECT_NAME)](LICENSE)
7+
[![Build Status](https://github.com/USERNAME/PROJECT_NAME_URL/workflows/build/badge.svg)](https://github.com/USERNAME/PROJECT_NAME_URL/actions)
8+
[![Coverage Status](https://coveralls.io/repos/github/USERNAME/PROJECT_NAME_URL/badge.svg?branch=main)](https://coveralls.io/github/USERNAME/PROJECT_NAME_URL?branch=main)
9+
[![PyPi](https://img.shields.io/pypi/v/PROJECT_NAME_URL)](https://pypi.org/project/PROJECT_NAME_URL)
10+
[![Licence](https://img.shields.io/github/license/USERNAME/PROJECT_NAME_URL)](LICENSE)
1111

1212
<img src="assets/showcase.png" alt="Showcase">
1313

@@ -33,7 +33,7 @@ make help
3333
Usage instructions go here.
3434

3535
```bash
36-
python my_project.py
36+
venv/bin/python my_script.py
3737
```
3838

3939
## Development

project_name/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# flake8: noqa
2+
from project_name.my_module import MyModule

python_project/__init__.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
]
1818

1919
setuptools.setup(
20-
name='PROJECT_NAME',
20+
name='PROJECT_NAME_URL',
2121
version='1.0.0',
22-
description='Your project description here', # noqa
22+
description='Your project description here',
2323
long_description=long_description,
2424
long_description_content_type="text/markdown",
25-
url='http://github.com/USERNAME/PROJECT_NAME',
25+
url='http://github.com/USERNAME/PROJECT_NAME_URL',
2626
author='USERNAME',
2727
license='MIT',
2828
packages=setuptools.find_packages(),
@@ -37,7 +37,7 @@
3737
},
3838
entry_points={
3939
'console_scripts': [
40-
'PROJECT_NAME=python_project.my_module:main'
40+
'PROJECT_NAME_URL=project_name.my_module:main'
4141
]
4242
},
4343
python_requires='>=3.6',

test/unit/test_my_module.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import mock
2-
from python_project.my_module import (
2+
from project_name.my_module import (
33
main,
44
MyModule
55
)
@@ -9,7 +9,7 @@ def test_my_function():
99
MyModule.my_function()
1010

1111

12-
@mock.patch('python_project.my_module.MyModule.my_function')
12+
@mock.patch('project_name.my_module.MyModule.my_function')
1313
def test_main(mock_my_function):
1414
main()
1515
mock_my_function.assert_called_once()

0 commit comments

Comments
 (0)