fractopo.cli module

Command-line integration of fractopo with click.

class fractopo.cli.LogLevel(*values)

Bases: Enum

Enums for log levels.

CRITICAL = 'CRITICAL'
DEBUG = 'DEBUG'
ERROR = 'ERROR'
INFO = 'INFO'
WARNING = 'WARNING'
fractopo.cli.default_network_output_paths(network_name: str, general_output: Path | None, branches_output: Path | None, nodes_output: Path | None, parameters_output: Path | None)

Determine default network output paths.

fractopo.cli.describe_results(validated: ~geopandas.geodataframe.GeoDataFrame, error_column: str, console: ~rich.console.Console = <console width=80 ColorSystem.EIGHT_BIT>)

Describe validation results to stdout.

fractopo.cli.fractopo_callback(log_level: ~fractopo.cli.LogLevel = <typer.models.OptionInfo object>, version: bool = <typer.models.OptionInfo object>)

Use fractopo command-line utilities.

fractopo.cli.get_click_path_args(exists=True, **kwargs)

Get basic click path args.

fractopo.cli.info()

Print out information about fractopo installation and python environment.

fractopo.cli.make_output_dir(base_path: Path) Path

Make timestamped output dir.

fractopo.cli.network(trace_file: ~pathlib.Path = <typer.models.ArgumentInfo object>, area_file: ~pathlib.Path = <typer.models.ArgumentInfo object>, snap_threshold: float = <typer.models.OptionInfo object>, determine_branches_nodes: bool = <typer.models.OptionInfo object>, name: str | None = <typer.models.OptionInfo object>, circular_target_area: bool = <typer.models.OptionInfo object>, truncate_traces: bool = <typer.models.OptionInfo object>, censoring_area: ~pathlib.Path | None = <typer.models.OptionInfo object>, output_path: ~pathlib.Path | None = <typer.models.OptionInfo object>)

Analyze the geometry and topology of trace network.

fractopo.cli.rich_table_from_parameters(parameters: dict[str, float]) Table

Generate rich Table from network parameters.

fractopo.cli.tracevalidate(trace_file: ~pathlib.Path = <typer.models.ArgumentInfo object>, area_file: ~pathlib.Path = <typer.models.ArgumentInfo object>, allow_fix: bool = <typer.models.OptionInfo object>, summary: bool = <typer.models.OptionInfo object>, snap_threshold: float = <typer.models.OptionInfo object>, output: ~pathlib.Path | None = <typer.models.OptionInfo object>, only_area_validation: bool = <typer.models.OptionInfo object>, allow_empty_area: bool = <typer.models.OptionInfo object>)

Validate trace data delineated by target area data.

If allow_fix is True, some automatic fixing will be done to e.g. convert MultiLineStrings to LineStrings.