A lightweight python package, alternative of pyscafford
python_package
https://github.com/fanqingsong/python_package
- Metadata and dependency information is stored in the pyproject.toml for compatibility with both pip and poetry.
- Flake8, pylint, and isort configurations are defined to be compatible with the black autoformatter.
- Pylint settings are based on the Google Python Style Guide and adapted for black compatibility.
- Linting tools run automatically before each commit using pre-commit, black, and isort.
- Test coverage reports are generated during every commit and pull request using coverage and pytest-cov. All reports are automatically uploaded and archived on codecov.io.
- Unit tests are written using pytest and static type checking is provided by mypy.
- Package releases to PyPI with dynamic versioning provided by bump2version begin automatically whenever a new tag is created in github.
- Documentation is built using mkdocs and mkdocstrings. Docs are automatically deployed to github pages during every release.
- Release notes are automatically generated during every release using github actions.
To install the package using
pip:pip install pytemplates_pypackageTo add the package as a dependency using
poetry:poetry add pytemplates_pypackageFrom a
.pyfile:import pytemplates_pypackage print(pytemplates_pypackage.__version__) pytemplates_pypackage.greet(user="Jacob") from pytemplates_pypackage import wish_farewell wish_farewell(user="Jacob")To begin local development, clone the PyTemplates/typer_cli repository and use one of the following methods to build it. Commands should be executed from inside of the project home folder.
poetry installInstall optional dependencies using the
--extrasflag:poetry install --extras=environmentpip install .Install optional dependencies using square brackets:
pip install .[environment]
出处:http://www.cnblogs.com/lightsong/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接。

浙公网安备 33010602011771号