c_therm_tci_tools.sync#

Sync tools.

Module Contents#

Functions#

check_compilation

Check compilation, re-lock if incompatible, and return the compilation.

lock

Lock dependencies for all platforms and Python versions.

get_compilation

Get existing dependency compilations.

get_compilation_key

Get the name of a dependency compilation.

get_lockfile

Get lockfile path.

compile

Compile system dependencies.

get_uv_version

Get the installed version of uv.

escape

Path escape suitable for all operating systems.

Data#

PYTEST

Resulting pytest configuration file.

COPIER_ANSWERS

Copier answers file.

PYTHON_VERSIONS_FILE

File containing supported Python versions.

REQS

Requirements.

UV

UV requirement.

DEV

Other development tools and editable local dependencies.

NODEPS

Dependencies appended to locks without compiling their dependencies.

OVERRIDE

Overrides to satisfy otherwise incompatible combinations.

SYS_PLATFORM

Platform identifier.

SYS_PYTHON_VERSION

Python version associated with this platform.

PLATFORMS

Supported platforms.

PYTHON_VERSIONS

Supported Python versions.

UV_PAT

Pattern for stored uv version comment.

SUB_PAT

Pattern for stored submodule revision comments.

DEP_PAT

Pattern for compiled dependencies.

API#

c_therm_tci_tools.sync.PYTEST#

‘Path(…)’

Resulting pytest configuration file.

c_therm_tci_tools.sync.COPIER_ANSWERS#

‘Path(…)’

Copier answers file.

c_therm_tci_tools.sync.PYTHON_VERSIONS_FILE#

‘Path(…)’

File containing supported Python versions.

c_therm_tci_tools.sync.REQS#

‘Path(…)’

Requirements.

c_therm_tci_tools.sync.UV#

None

UV requirement.

c_therm_tci_tools.sync.DEV#

None

Other development tools and editable local dependencies.

c_therm_tci_tools.sync.NODEPS#

None

Dependencies appended to locks without compiling their dependencies.

c_therm_tci_tools.sync.OVERRIDE#

None

Overrides to satisfy otherwise incompatible combinations.

c_therm_tci_tools.sync.SYS_PLATFORM: c_therm_tci_tools.types.Platform#

None

Platform identifier.

c_therm_tci_tools.sync.SYS_PYTHON_VERSION: c_therm_tci_tools.types.PythonVersion#

‘join(…)’

Python version associated with this platform.

c_therm_tci_tools.sync.PLATFORMS: tuple[c_therm_tci_tools.types.Platform, ...]#

(‘linux’, ‘macos’, ‘windows’)

Supported platforms.

c_therm_tci_tools.sync.PYTHON_VERSIONS: tuple[c_therm_tci_tools.types.PythonVersion, ...]#

None

Supported Python versions.

c_therm_tci_tools.sync.UV_PAT#

‘(?m)^# uv\s(?P.+)$’

Pattern for stored uv version comment.

c_therm_tci_tools.sync.SUB_PAT#

‘(?m)^# submodules/(?P[^\s]+)\s(?P[^\s]+)$’

Pattern for stored submodule revision comments.

c_therm_tci_tools.sync.DEP_PAT#

‘(?mi)^(?P[A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])==.+$’

Pattern for compiled dependencies.

See: https://packaging.python.org/en/latest/specifications/name-normalization/#name-format

c_therm_tci_tools.sync.check_compilation(
high: bool = False,
) str#

Check compilation, re-lock if incompatible, and return the compilation.

Parameters#

  • high: Highest dependencies.

c_therm_tci_tools.sync.lock(
high: bool,
sys_compilation: str = '',
) str#

Lock dependencies for all platforms and Python versions.

c_therm_tci_tools.sync.get_compilation(
platform: c_therm_tci_tools.types.Platform,
python_version: c_therm_tci_tools.types.PythonVersion,
high: bool,
) str#

Get existing dependency compilations.

Parameters#

  • high: Highest dependencies.

  • platform: Platform to compile for.

  • python_version: Python version to compile for.

c_therm_tci_tools.sync.get_compilation_key(
platform: c_therm_tci_tools.types.Platform,
python_version: c_therm_tci_tools.types.PythonVersion,
high: bool,
) str#

Get the name of a dependency compilation.

Parameters#

  • platform: Platform to compile for.

  • python_version: Python version to compile for.

  • high: Highest dependencies.

c_therm_tci_tools.sync.get_lockfile(
high: bool,
) pathlib.Path#

Get lockfile path.

Parameters#

  • high: Highest dependencies.

c_therm_tci_tools.sync.compile(
platform: c_therm_tci_tools.types.Platform,
python_version: c_therm_tci_tools.types.PythonVersion,
high: bool,
no_deps: bool = False,
) str#

Compile system dependencies.

Parameters#

  • high: Highest dependencies.

  • no_deps: Without transitive dependencies.

  • platform: Platform to compile for.

  • python_version: Python version to compile for.

c_therm_tci_tools.sync.get_uv_version() str#

Get the installed version of uv.

c_therm_tci_tools.sync.escape(
path: str | pathlib.Path,
) str#

Path escape suitable for all operating systems.

Parameters#

  • path: Path to escape.