Coverage for MC6809/publish.py: 75%
12 statements
« prev ^ index » next coverage.py v7.2.1, created at 2023-03-06 19:50 +0100
« prev ^ index » next coverage.py v7.2.1, created at 2023-03-06 19:50 +0100
1from pathlib import Path
3import poetry_publish
4import poetry_publish.publish
5from creole.setup_utils import update_rst_readme
6from poetry_publish.utils.subprocess_utils import verbose_check_call
8import MC6809
11PACKAGE_ROOT = Path(MC6809.__file__).parent.parent
14def update_readme():
15 return update_rst_readme(
16 package_root=PACKAGE_ROOT,
17 filename='README.creole'
18 )
21def publish():
22 """
23 Publish 'poetry-publish' to PyPi
24 Call this via:
25 $ poetry run publish
26 """
27 verbose_check_call('make', 'fix-code-style') # don't publish if code style wrong
29 poetry_publish.publish.poetry_publish(
30 package_root=PACKAGE_ROOT,
31 version=MC6809.__version__,
32 creole_readme=True # don't publish if README.rst is not up-to-date
33 )