Create new, build and install Python Packages from a template
Project description
Managing the scaffolding and VCS for new and existing Python Packages.
Use a configuration (.ini) file to: 1. Create the “scaffolding” for a new package. 2. Examine existing scaffolding and add missing components like directories and files. 3. Version control 4. Apply PEP8 via Black 5. Update Git and GitHub 6. Upload to PyPi 7. PEP12 doc strings 8. Create a virtual environment for the project 9. Special thanks to Jacob Tomlinson. This application is based on his article Creating an open source Python project from scratch. 10. Configurations through templates which are easier to change. 11. Step-by-step procedure for beginners as well as connoisseurs. Intention was educational, but also functional. This is a starting block to create the initial structure that can be used to grow it bigger.
Testing
This project uses pytest to run tests and also to test docstring examples.
- Virtual Environments
PackageIt rely on virtual environments and also assume (default) any creation of a new module.package/library will be in a virtual environment. By convention each of the tests should therefore run in it’s own freshly created virtual environment. This is unfortunately and expectedly become very expensive. PackageIt there fore applies the following strategy with regards to testing:
It (obviously) assume the PackageIt.create_venv work correctly and is tested properly.
Tests rely on the virtual environment installed for PackageIt.
Fresh virtual environments will only be created if:
The test or any methods it calls will alter the virtual environment or
It requires to operate specifically in the virtual environment for the package begin created.
Install the test dependencies.
$ pip install -r requirements_test.txt
Run the tests.
Developing
This project uses black to format code and flake8 for linting. We also support pre-commit to ensure these have been run. To configure your local environment please install these development dependencies and set up the commit hooks.
$ pip install black flake8 pre-commit
$ pre-commit install
Releasing
Releases are published automatically when a tag is pushed to GitHub.
# Set next version number
export RELEASE = x.x.x
# Create tags
git commit --allow -empty -m "Release $RELEASE"
git tag -a $RELEASE -m "Version $RELEASE"
# Push
git push upstream --tags
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 Distribution
Built Distribution
File details
Details for the file PackageIt-3.3.5.tar.gz
.
File metadata
- Download URL: PackageIt-3.3.5.tar.gz
- Upload date:
- Size: 22.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56600c8e46539e8bf0eab2fb34ba7a0aa0bfc291c194f64f16b3f5055976870d |
|
MD5 | 73867f612f8bbc526e811e093b010832 |
|
BLAKE2b-256 | 38d4bb16526c40c0c36cb42edfe3ac54d532f82930c4d24680944c71591db3c4 |
File details
Details for the file PackageIt-3.3.5-py3-none-any.whl
.
File metadata
- Download URL: PackageIt-3.3.5-py3-none-any.whl
- Upload date:
- Size: 22.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab4beb9c9449e2c63c6cf581d7707d6fe0ec658852a825726263f776a369e3f0 |
|
MD5 | ebfa607bdb901a74aa113ee490fd9ca5 |
|
BLAKE2b-256 | 58f9362df4306ac33d8e2bdfa8e841bcd7bc308a951fc910c029fc959d2580a6 |