a minimalistic python package
Project description
zzz233
WARNING: this package is only to demonstrate how to build a minimal python package. Any functions provided in this package could be changed in an incompatible way in the future. DO NOT use it in production.
A minimal python package.
- download locally
- clone repository:
git clone git@github.com:husisy/zzz233.git
- download zip:
wget xxx
- download released package: TODO
- clone repository:
- install
- install from pypi:
pip install zzz233
- install locally:
pip install .
- (for developer) install locally:
pip install ".[dev]"
- (for documentation developer) install locally:
pip install ".[doc]"
- install from github:
pip install git+https://github.com/husisy/zzz233.git
- install from pypi:
- uninstall
pip uninstall zzz233
- scrips
- run in command line:
zzz233
- run in command line:
- unittest: download locally
pytest
- (require developer install locally) coverage
pytest --cov=python/zzz233
- documentation
- build locally:
mkdocs serve
- website:
https://husisy.github.io/zzz233/
- build locally:
- github action (CI/CD)
- build documentation, enable github page (select deploy from actions)
- unittest
- reading material
- github/setuptools_scm (Source Code Management)
- setuptools/pyproject-config
- distribute package to pypi
TODO make a clear table
usage
# a dummy example
from zzz233 import from_pickle, to_pickle
a = 233
to_pickle(a=a)
assert from_pickle('a')==a
TODO
- semantic versioning link
development
new environment
micromamba create -n zzz233 python
micromamba activate zzz233
pip install .
# pip install -e ".[dev]"
mkdocs serve
publish to pypi
# cleanup the branch and tag the latest commit with a valid version
# otherwise the build will fail
rm -rf ./dist
pip install build
python -m build
# testpypi
# setup testpypi apikey $HOME/.pypirc (the username is "__token__")
twine upload --repository testpypi dist/*
# --repository-url https://test.pypi.org/legacy/
pip uninstall zzz233
pip install --upgrade -i https://test.pypi.org/simple/ zzz233
# pypi
# --repository-url https://upload.pypi.org/legacy/
License
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
zzz233-0.4.0.tar.gz
(9.3 kB
view details)
Built Distribution
File details
Details for the file zzz233-0.4.0.tar.gz
.
File metadata
- Download URL: zzz233-0.4.0.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c56c34b54dee853a05b6ff021a84788b8a7daebd7df923c92a92073328fcdd1 |
|
MD5 | e378d87d666147c08261a7b644147469 |
|
BLAKE2b-256 | bf5ccbd8703972ce65222725cfa270338b0365c66c1508af7f4ea4cb89c2eb64 |
File details
Details for the file zzz233-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: zzz233-0.4.0-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88b12dece2d3367d643f2b64f8ba03dbb74b8bb36294dd9d7adfa368d9a81358 |
|
MD5 | 0a951a1f06773ef1af838c4ebf9ce465 |
|
BLAKE2b-256 | ed4f2e31ee0c0f8cab210362e61368a6f32125e39f4c360842995ca98e52f428 |