lookback_tools.sync
#
Sync tools.
Module Contents#
Classes#
Dependency. |
|
Compiler. |
|
Compilation. |
Functions#
Check compilation, re-lock if incompatible, and return the requirements. |
|
Lock. |
|
Get the name of a dependency compilation. |
|
Get lockfile path. |
|
Get version of |
|
Get directs. |
|
Compile dependencies. |
|
Get submodules. |
|
Get submodule info. |
|
Escape a path, suitable for passing to e.g. |
Data#
Resulting pytest configuration file. |
|
File containing supported Python versions. |
|
Requirements. |
|
Other development tools and editable local dependencies. |
|
Paths to compile dependencies for. |
|
Overrides to satisfy otherwise incompatible combinations. |
|
Path to dependencies which should not have their transitive dependencies compiled. |
|
Security requirements. |
|
Platform identifier. |
|
Python version associated with this platform. |
|
This project’s default compilation platform. |
|
This project’s default Python version. |
|
Supported platforms. |
|
Supported Python versions. |
|
Regular expression for a legal Python package name. |
|
Regular expression for valid version separators. |
API#
- class lookback_tools.sync.Dep#
Dependency.
- op: lookback_tools.types.Op#
None
Operator.
- model_dump() lookback_tools.types.Dep #
Dump model.
- lookback_tools.sync.PYTEST#
‘Path(…)’
Resulting pytest configuration file.
- lookback_tools.sync.PYTHON_VERSIONS_FILE#
‘Path(…)’
File containing supported Python versions.
- lookback_tools.sync.REQS#
‘Path(…)’
Requirements.
- lookback_tools.sync.DEV#
None
Other development tools and editable local dependencies.
- lookback_tools.sync.DEPS#
()
Paths to compile dependencies for.
- lookback_tools.sync.OVERRIDES#
None
Overrides to satisfy otherwise incompatible combinations.
- lookback_tools.sync.NODEPS#
None
Path to dependencies which should not have their transitive dependencies compiled.
- lookback_tools.sync.SECURITY_REQS#
None
Security requirements.
- lookback_tools.sync.SYS_PLATFORM: lookback_tools.types.Platform#
None
Platform identifier.
- lookback_tools.sync.SYS_PYTHON_VERSION: lookback_tools.types.PythonVersion#
‘join(…)’
Python version associated with this platform.
- lookback_tools.sync.PROJECT_PLATFORM: lookback_tools.types.Platform#
‘linux’
This project’s default compilation platform.
- lookback_tools.sync.PROJECT_PYTHON_VERSION: lookback_tools.types.PythonVersion#
‘3.11’
This project’s default Python version.
- lookback_tools.sync.PLATFORMS: tuple[lookback_tools.types.Platform, ...]#
(‘linux’, ‘macos’, ‘windows’)
Supported platforms.
- lookback_tools.sync.PYTHON_VERSIONS: tuple[lookback_tools.types.PythonVersion, ...]#
None
Supported Python versions.
- lookback_tools.sync.check_compilation(
- high: bool = False,
Check compilation, re-lock if incompatible, and return the requirements.
- lookback_tools.sync.get_lockfile_key(
- platform: lookback_tools.types.Platform,
- python_version: lookback_tools.types.PythonVersion,
Get the name of a dependency compilation.
Parameters#
platform: Platform to compile for.
python_version: Python version to compile for.
high: Highest dependencies.
- lookback_tools.sync.get_lockfile(
- high: bool,
Get lockfile path.
- class lookback_tools.sync.Compiler#
Compiler.
- platform: lookback_tools.types.Platform#
None
Platform compiled for.
- python_version: lookback_tools.types.PythonVersion#
None
Python version compiled for.
- overrides: pathlib.Path#
None
Overrides.
- paths: tuple[pathlib.Path, ...]#
None
Paths compiled from, such as
requirements.in
orpyproject.toml
.
- get_command() tuple[datetime.datetime, list[str]] #
Command to reproduce compilation requirements.
- compile(
- time: datetime.datetime = datetime.min,
- directs: dict[str, lookback_tools.sync.Dep] | None = None,
Compile dependencies.
- lookback_tools.sync.NAME_PAT#
‘[A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9._-]*[A-Za-z0-9]’
Regular expression for a legal Python package name.
See: https://packaging.python.org/en/latest/specifications/name-normalization/#name-format
- lookback_tools.sync.OP_PAT#
‘join(…)’
Regular expression for valid version separators.
- lookback_tools.sync.get_directs( ) dict[str, lookback_tools.sync.Dep] #
Get directs.
- class lookback_tools.sync.Compilation#
Compilation.
- compiler: lookback_tools.sync.Compiler#
‘field(…)’
Compiler used to compile.
- time: datetime.datetime#
None
Time of compilation.
- directs: dict[str, lookback_tools.sync.Dep]#
‘field(…)’
Direct dependencies and their revisions.
- __post_init__()#
- lookback_tools.sync.compile(
- compiler: lookback_tools.sync.Compiler,
Compile dependencies.
- lookback_tools.sync.get_subs() dict[str, lookback_tools.sync.Dep] #
Get submodules.
- lookback_tools.sync.get_submodule_info(
- kind: lookback_tools.types.SubmoduleInfoKind,
Get submodule info.
- lookback_tools.sync.escape(
- path: str | pathlib.Path,
Escape a path, suitable for passing to e.g.
run()
.