dev.tools.__main__#

CLI for tools.

Module Contents#

Classes#

Constants

Constants for environment.

Functions#

main

sync_environment_variables

Initialize shell.

add_change

Add change.

get_actions

Get actions used by this repository.

sync_local_dev_configs

Synchronize local dev configs to shadow pyproject.toml, with some changes.

disable_concurrent_tests

Normalize addopts string and disable concurrent pytest tests.

elevate_pyright_warnings

Elevate Pyright warnings to errors.

build_docs

Build docs.

log

Send object to stdout.

Data#

const

APP

CLI.

API#

class dev.tools.__main__.Constants(
/,
**data: typing.Any,
)#

Bases: pydantic.BaseModel

Constants for environment.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

pylance_version: str#

‘strip(…)’

Pylance version.

dev.tools.__main__.const#

‘Constants(…)’

dev.tools.__main__.APP#

‘App(…)’

CLI.

dev.tools.__main__.main()#
dev.tools.__main__.sync_environment_variables(
pylance_version: str = const.pylance_version,
)#

Initialize shell.

dev.tools.__main__.add_change(
change: dev.tools.types.ChangeType = 'change',
)#

Add change.

dev.tools.__main__.get_actions()#

Get actions used by this repository.

For additional security, select “Allow and select non-, actions and reusable workflows” in the General section of your Actions repository settings, and paste the output of this command into the “Allow specified actions and reusable workflows” block.

Parameters#

  • high: Highest dependencies.

dev.tools.__main__.sync_local_dev_configs()#

Synchronize local dev configs to shadow pyproject.toml, with some changes.

Duplicate pytest configuration from pyproject.toml to pytest.ini. These files shadow the configuration in pyproject.toml, which drives CI or if shadow configs are not present. Shadow configs are in .gitignore to facilitate local-only shadowing. Concurrent test runs are disabled in the local pytest configuration which slows down the usual local, granular test workflow.

dev.tools.__main__.disable_concurrent_tests(
addopts: str,
) str#

Normalize addopts string and disable concurrent pytest tests.

dev.tools.__main__.elevate_pyright_warnings()#

Elevate Pyright warnings to errors.

dev.tools.__main__.build_docs()#

Build docs.

dev.tools.__main__.log(
obj,
)#

Send object to stdout.