Package configuration example using bleeding edge toolset.
Project description
modernpackage
This package allows to quickly initialise new Python package using bleeding edge tools like linters, just run:
pip install modernpackage
modernpackage <your-package-name>
Now you are able to:
cd <your-package-name>
make check # To run tests and linters
make publish # To publish your new package to PyPi.org to make it accessable to everyone
This is also a boilerplate for a new python package, so you can create a new package this way as well:
git clone git@github.com:albertas/modernpackage.git <your-package-name>
cd <your-package-name>
make init <your-package-name>
- to start your modern package.
Development
Commonly used commands for package development:
make check
- run unit tests and linters.make fix
- format code and fix detected fixable issues.make publish
- publishes current package version to pypi.org.make compile
- bump and freeze dependency versions in requirements*.txt filesmake sync
- upgrade installed dependencies in Virtual Environment (executed aftermake compile
)
Toolset
This package uses these cutting edge tools:
- ruff - for linting and code formatting
- mypy - for type checking
- pip-audit - for known vulnerability detection in dependencies
- deadcode - for unused code detection
- pytest - for collecting and running unit tests
- coverage - for code coverage by unit tests
- hatch - for publishing package to pypi.org
- uv - for Python virtual environment and dependency management
- pyproject.toml - configuration file for all tools
- Makefile - aliases for commonly used command line commands
Feature requests:
- Newly installed package tests are failing. They should pass.
- Newly installed package could have virtualenv initialised.
- Check if
git
is available before trying to initialise the repository. - remove init Makefile alias and cli.py command python files.
- Update package version to 0.0.1 during
make init
. Version should be initialised to be v0.0.1 - make a cli command: this package should be installable. Ideally this flow should work:
pip install modernpackage
modernpackage mynewpackage
cd mynewpackage
&&make check
&&make publish
- Enable github and gitlab pipeline files to run
make check
in the pipeline. - Add pre-commit hooks with all the tools enabled.
- codspeed.io could be considered for Continuous integration pipeline
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
modernpackage-0.0.7.tar.gz
(4.3 kB
view details)
Built Distribution
File details
Details for the file modernpackage-0.0.7.tar.gz
.
File metadata
- Download URL: modernpackage-0.0.7.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82e698cfb154b09eea7e570f2c77393f6df797ba9935e49b5609213d3c32b0bf |
|
MD5 | f5469710ca6b8dc6e0f5cdcb3d337266 |
|
BLAKE2b-256 | 6eb525f7530e87ed71a86a4d9a9fb6c833049ea56d9a428903080223d6bc9fe7 |
File details
Details for the file modernpackage-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: modernpackage-0.0.7-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10bd3c29a7a91b53f344f9a816e3e8893c608d2dd2eca53170da6e4c96ca6051 |
|
MD5 | ccb0012d6e67591f7c01cb5d957d9ae3 |
|
BLAKE2b-256 | e4b28a91d77f99a3f922b3a0ba4e94f7483b18f99be510bd44211d5f5d306fb9 |