arx.settings

arx.settings

Source: packages/arx/src/arx/settings.py

title: Parse and validate ``.arxproject.toml`` project settings.

Functions

resolve_source_root(project: ArxProject) -> Path

title: Resolve the effective source root from manifest defaults.
parameters:
  project:
    type: ArxProject
returns:
  type: Path

dump_settings(settings: ArxProject) -> str

title: Serialize settings into canonical ``.arxproject.toml`` text.
parameters:
  settings:
    type: ArxProject
returns:
  type: str

write_settings(settings: ArxProject, path: str | Path=DEFAULT_CONFIG_FILENAME) -> Path

title: Write canonical ``.arxproject.toml`` text to disk.
parameters:
  settings:
    type: ArxProject
  path:
    type: str | Path
returns:
  type: Path

find_config_file(start: Path | None=None) -> Path | None

title: Walk upward from ``start`` to locate ``.arxproject.toml``.
parameters:
  start:
    type: Path | None
returns:
  type: Path | None

load_settings_from_text(content: str, source_path: Path | None=None) -> ArxProject

title: Parse and validate one ``.arxproject.toml`` string.
parameters:
  content:
    type: str
  source_path:
    type: Path | None
returns:
  type: ArxProject

load_settings(path: str | Path | None=None) -> ArxProject

title: Load and validate ``.arxproject.toml`` into a typed dataclass.
parameters:
  path:
    type: str | Path | None
returns:
  type: ArxProject

Classes

ArxProjectError(Exception)

title: Raised when ``.arxproject.toml`` cannot be loaded or validated.

Author

title: One author entry declared in ``[project].authors``.
attributes:
  name:
    type: str
  email:
    type: str | None

Project

title: Parsed project section of .arxproject.toml.
attributes:
  name:
    type: str
  version:
    type: str
  edition:
    type: str | None
  description:
    type: str | None
  license:
    type: str | None
  authors:
    type: tuple[Author, Ellipsis]
  dependencies:
    type: tuple[str, Ellipsis]
  requires_arx:
    type: str | None

DependencyGroupInclude

title: Include one named dependency group inside another group.
attributes:
  include_group:
    type: str

Environment

title: Parsed environment section of .arxproject.toml.
attributes:
  kind:
    type: str | None
  name:
    type: str | None
  path:
    type: str | None

Build

title: Parsed build section of .arxproject.toml.
attributes:
  src_dir:
    type: str | None
  package:
    type: str | None
  out_dir:
    type: str | None
  mode:
    type: str | None

BuildSystem

title: Parsed build-system section of .arxproject.toml.
attributes:
  dependencies:
    type: tuple[str, Ellipsis]

ArxpmDependencyGroup

title: Legacy placeholder for removed ``[arxpm.*]`` sections.
attributes:
  dependencies:
    type: tuple[str, Ellipsis]

Arxpm

title: Legacy placeholder for the removed ``[arxpm]`` section.
attributes:
  dependencies:
    type: ArxpmDependencyGroup | None
  dependencies_dev:
    type: ArxpmDependencyGroup | None
  extras:
    type: dict[str, Any]

Tests

title: Parsed tests section of .arxproject.toml.
attributes:
  paths:
    type: tuple[str, Ellipsis] | None
  exclude:
    type: tuple[str, Ellipsis] | None
  file_pattern:
    type: str | None
  function_pattern:
    type: str | None

ArxProject

title: Full parsed ``.arxproject.toml`` document.
attributes:
  project:
    type: Project
  environment:
    type: Environment | None
  build:
    type: Build | None
  build_system:
    type: BuildSystem
  dependency_groups:
    type: dict[str, tuple[DependencyGroupEntry, Ellipsis]]
  arxpm:
    type: Arxpm | None
  tests:
    type: Tests | None
  source_path:
    type: Path | None