Skip to content

int-i/python-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Starter

Python Starter Template

This template was inspired by pypa/sampleproject.

Setup

Package Information

See setup.py

Check the package classifier here: PyPI Classifiers

Reference: Building and Distributing Packages with Setuptools

GitHub Workflow

See python.yml

Check pytest --cov=package_name --cov-report=xml in line 81, and fix it to your package name.

Implemented Jobs:

Badges for Documentation

See Shields.io

Package Version:

[![PyPI](https://img.shields.io/pypi/v/package_name?logo=pypi&logoColor=white&style=for-the-badge)](https://pypi.org/project/package_name/)

Required Python Version:

[![Python](https://img.shields.io/pypi/pyversions/package_name?logo=python&logoColor=white&style=for-the-badge)](https://www.python.org/)

GitHub Workflow Status:

[![GitHub Workflow](https://img.shields.io/github/workflow/status/author_name/package_name/Python?logo=github&logoColor=white&style=for-the-badge)](https://github.com/author_name/package_name/actions)

Code Coverage with Codecov:

[![Codecov](https://img.shields.io/codecov/c/gh/author_name/package_name?logo=codecov&logoColor=white&style=for-the-badge)](https://codecov.io/gh/author_name/package_name)

Package Downloads:

[![Downloads](https://img.shields.io/pypi/dm/package_name?logo=pypi&logoColor=white&style=for-the-badge)](https://pypi.org/project/package_name/)

Package License:

[![License](https://img.shields.io/pypi/l/package_name?style=for-the-badge)](./LICENSE)

Test

Run pytest

$ pytest

Code Coverage with pytest-cov

$ pytest --cov=package_name

If you need the output in html format:

$ pytest --cov=package_name --cov-report=html

See pytest-cov Reporting

Deploy

Create requirements.txt

pip freeze > requirements.txt

Fix LICENSE

Delete the original LICENSE file or change it to your license file.

Packaging Project

$ pip install --user --upgrade setuptools wheel
$ python ./setup.py sdist bdist_wheel

Check Project Package

$ pip install --user --upgrade twine
$ twine check dist/*

Update Package to PyPI

$ twine upload dist/*

If you want to upload the package to Test PyPI, use --repository testpypi option.

Reference: Packaging Python Projects

License

Copyright (c) 2020 Seungjae Park

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.

Python Starter is licensed under the MIT License.

About

Python Starter Template

Topics

Resources

License

Stars

Watchers

Forks

Languages