stubber.publish.publish

prepare a set of stub files for publishing to PyPi

required folder structure: NOTE: stubs and publish paths can be located in different locations and repositories

+–stubs - [config.stubs_path] | +–<any stub folders in repo> | +–micropython-v1_18-esp32

+–publish - [config.publish_path] | +–package_data.jsondb | +–package_data_test.jsondb | +–template - [config.template_path] | +–pyproject.toml | +–README.md | +–LICENSE.md | +–<folder for each package> | +–<package name> double nested to match the folder structure | +–<family>-<port>-<board>-<type>-stubs-<version> | +–micropython-esp32-stubs-v1_18 | +–micropython-stm32-stubs-v1_18 | +–micropython-stm32-stubs-v1_19_1 | +– … |

!!Note: anything excluded in .gitignore is not packaged by poetry

Module Contents

Functions

publish(→ Dict[str, Any])

Publish a package to PyPi

publish_one([family, versions, ports, boards, frozen, ...])

Publish a bunch of stub packages of the same version

publish_multiple([family, versions, ports, boards, ...])

Publish a bunch of stub packages

stubber.publish.publish.publish(*, db: pysondb.PysonDB, pkg_type, version: str, family='micropython', production, dryrun=False, force=False, clean: bool = False, port: str = '', board: str = '') Dict[str, Any]

Publish a package to PyPi look up the previous package version in the dabase, and only publish if there are changes to the package - change determied by hash across all files

Parameters
  • db (pysondb.PysonDB) –

  • version (str) –

  • clean (bool) –

  • port (str) –

  • board (str) –

Return type

Dict[str, Any]

stubber.publish.publish.publish_one(family='micropython', versions: Union[str, List[str]] = 'v1.18', ports: Union[str, List[str]] = 'auto', boards: Union[str, List[str]] = 'GENERIC', frozen: bool = False, production=False, dryrun: bool = False, clean: bool = False, force: bool = False)

Publish a bunch of stub packages of the same version

Parameters
  • versions (Union[str, List[str]]) –

  • ports (Union[str, List[str]]) –

  • boards (Union[str, List[str]]) –

  • frozen (bool) –

  • dryrun (bool) –

  • clean (bool) –

  • force (bool) –

stubber.publish.publish.publish_multiple(family='micropython', versions: List[str] = ['v1.18', 'v1.19.1'], ports: List[str] = ['auto'], boards: List[str] = ['GENERIC'], frozen: bool = False, production=False, dryrun: bool = False, clean: bool = False, force: bool = False)

Publish a bunch of stub packages

Parameters
  • versions (List[str]) –

  • ports (List[str]) –

  • boards (List[str]) –

  • frozen (bool) –

  • dryrun (bool) –

  • clean (bool) –

  • force (bool) –