Skip to content

Commit

Permalink
v1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Justintime50 committed Jul 12, 2021
1 parent 4aef0d6 commit da50391
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 27 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# CHANGELOG

# v1.3.0 (2021-05-31)
## v1.4.0 (2021-07-12)

* Clarified various pieces of info
* Unified more text replacements for easier usage of the template when getting started

## v1.3.0 (2021-05-31)

* Pins dependencies and moves them to a constant
* Adds missing lines to code coverage report
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ help:

## venv - Install the virtual environment
venv:
$(VIRTUALENV) ~/.venv/python_project/
ln -snf ~/.venv/python_project/ venv
$(VIRTUALENV) ~/.venv/project_name/
ln -snf ~/.venv/project_name/ venv
venv/bin/pip install -e ."[dev]"

## install - Install the project locally
install: | venv

## clean - Remove the virtual environment and clear out .pyc files
clean:
rm -rf ~/.venv/python_project/ venv
rm -rf ~/.venv/project_name/ venv
find . -name '*.pyc' -delete
rm -rf dist
rm -rf build
rm -rf *.egg-info

## lint - Lint the project
lint:
venv/bin/flake8 python_project/*.py
venv/bin/flake8 project_name/*.py
venv/bin/flake8 test/unit/*.py

## test - Test the project
Expand All @@ -32,6 +32,6 @@ test:

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

.PHONY: help install clean lint test coverage
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,22 @@ Click the `Use this template` button at the top of this project's GitHub page, i

**Easy text replacements**

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

**File configuration**

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

Expand Down
12 changes: 6 additions & 6 deletions README_project.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<div align="center">

# Python Project
# Project Name

A one-liner description of your project goes here.

[![Build Status](https://github.com/Justintime50/PROJECT_NAME/workflows/build/badge.svg)](https://github.com/Justintime50/PROJECT_NAME/actions)
[![Coverage Status](https://coveralls.io/repos/github/USERNAME/PROJECT_NAME/badge.svg?branch=main)](https://coveralls.io/github/USERNAME/PROJECT_NAME?branch=main)
[![PyPi](https://img.shields.io/pypi/v/PROJECT_NAME)](https://pypi.org/project/PROJECT_NAME)
[![Licence](https://img.shields.io/github/license/USERNAME/PROJECT_NAME)](LICENSE)
[![Build Status](https://github.com/USERNAME/PROJECT_NAME_URL/workflows/build/badge.svg)](https://github.com/USERNAME/PROJECT_NAME_URL/actions)
[![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)
[![PyPi](https://img.shields.io/pypi/v/PROJECT_NAME_URL)](https://pypi.org/project/PROJECT_NAME_URL)
[![Licence](https://img.shields.io/github/license/USERNAME/PROJECT_NAME_URL)](LICENSE)

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

Expand All @@ -33,7 +33,7 @@ make help
Usage instructions go here.

```bash
python my_project.py
venv/bin/python my_script.py
```

## Development
Expand Down
2 changes: 2 additions & 0 deletions project_name/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# flake8: noqa
from project_name.my_module import MyModule
File renamed without changes.
2 changes: 0 additions & 2 deletions python_project/__init__.py

This file was deleted.

8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
]

setuptools.setup(
name='PROJECT_NAME',
name='PROJECT_NAME_URL',
version='1.0.0',
description='Your project description here', # noqa
description='Your project description here',
long_description=long_description,
long_description_content_type="text/markdown",
url='http://github.com/USERNAME/PROJECT_NAME',
url='http://github.com/USERNAME/PROJECT_NAME_URL',
author='USERNAME',
license='MIT',
packages=setuptools.find_packages(),
Expand All @@ -37,7 +37,7 @@
},
entry_points={
'console_scripts': [
'PROJECT_NAME=python_project.my_module:main'
'PROJECT_NAME_URL=project_name.my_module:main'
]
},
python_requires='>=3.6',
Expand Down
4 changes: 2 additions & 2 deletions test/unit/test_my_module.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import mock
from python_project.my_module import (
from project_name.my_module import (
main,
MyModule
)
Expand All @@ -9,7 +9,7 @@ def test_my_function():
MyModule.my_function()


@mock.patch('python_project.my_module.MyModule.my_function')
@mock.patch('project_name.my_module.MyModule.my_function')
def test_main(mock_my_function):
main()
mock_my_function.assert_called_once()

0 comments on commit da50391

Please sign in to comment.