S4G/discoverability API Wrapper.
Project description
python3-boilerplate
A best-practices template project for Python3 modules
Disclaimer: If you see this on pypi.org please note that the project is only published here for testing purposes. Please visit GitHub for the related template project.
Setup
- Make sure that
python3
andpip3
is installed and available on the path (on Ubuntu:sudo apt-get install python3 python3-pip
) - On first checkout run
make venv
to initialize the project configuration - Refer to the Makefile to learn about the various operations available
- To rename the project you can use the provided script
Features
- Basic project/module organization according to https://packaging.python.org
- Makefile management script
- pipenv and virtual environments
- distutils-based installer script
- Unit testing with pytest
- Multicore/-interpreter testing with tox
- Linting (flake8) and code formatting (autopep8) support
- isort support for automated import sorting
- Publishing to PyPi.org at https://pypi.org/project/python3-boilerplate/
- vscode editor configuration including plugin recommendations, debugging support, unit test discovery and on-save formatting
- Github actions continuous integration
How to use in existing project
To use it in an existing project you can merge the remote changes to your project.
- Add remote to access the template project
git remote add py3template git@github.com:BastiTee/python3-boilerplate.git
git pull py3template master --allow-unrelated-histories
- Solve all merge conflicts and commit. Most likely there will be a lot
- Do whatever is necessary to remove the boilerplate you don't need, e.g.
rm -rf s4gpy tests/test_utils.py __rename__.sh
- Commit your changes and push to your project
Resources
- http://packaging.python.org/
- https://packaging.python.org/en/latest/distributing.html
- https://pypi.org/
- https://github.com/pypa/sampleproject
- https://www.python.org/dev/peps/
- https://www.python.org/dev/peps/pep-0008/
- https://www.kennethreitz.org/essays/why-you-should-use-vs-code-if-youre-a-python-developer
- https://code.visualstudio.com/docs/python/python-tutorial
Future ideas and todos
- Optional static type hints (PEP 484) with mypy
- Make sure tox is working as expected for supported Python versions
- Introduce black in favour of other linters
- Introduce pyproject.toml along with bleeding edge build tools like flit or poetry
Licensing
This project is licensed under Apache License 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for s4gpy-0.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 432ff223cfd39e80ce486f8cba24001b4fbf6fe9c39b9c7a1a64c591bd19204e |
|
MD5 | 5db6beff15bc1bb33c8c15009d88bdf8 |
|
BLAKE2b-256 | f8b46d10aadee21a5e40361d49bfbd543b0f2b04e7ad70b33c23eae275741565 |