cellmap_flow.cli.common
What the cellmap_flow subcommands share.
log_level_option:--log-level, which sets the level as soon as it is parsed.ModelTypeGroup: a group with one subcommand per model type, built from the registry when asked for.deprecated: a command under the name it had before 0.3.0, which says what replaces it and then runs it.resample_option:--resample, ofinfer <type>andserve.
Attributes
Classes
A group with a subcommand for each model type, besides its own. |
Functions
|
|
|
|
|
Tell the user, on stderr, that |
|
|
Module Contents
- cellmap_flow.cli.common.LOG_LEVELS = ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']
- cellmap_flow.cli.common.REMOVED_IN = 'the release after 0.3.0'
- cellmap_flow.cli.common.log_level_option(default=None, help='Set the logging level')
--log-level, applied when it is parsed rather than passed on.The
cellmap_flowgroup’s defaults to INFO. A subcommand that had its own before 0.3.0 (yaml, view, blockwise) keeps it, defaulting to None, so thatcellmap_flow --log-level DEBUG yaml c.yamlis not reset to INFO by the subcommand’s default. Run on its own (python -m, as the dashboard’s blockwise tab runs blockwise), such a subcommand logs at INFO unless told otherwise.
- cellmap_flow.cli.common.resample_option()
--resample/--no-resample, on by default: read the dataset resampled to the model’s input voxel size when it has no level at that size (ImageDataInterface’son_voxel_size_mismatch="resample"). With--no-resamplethe level chosen is read as if it were at the model’s voxel size, with a warning.
- class cellmap_flow.cli.common.ModelTypeGroup(*args, make_command, **kwargs)
A group with a subcommand for each model type, besides its own.
make_command(name, config_class)builds a type’s command when click asks for it, from the registry as it is at that moment: a type a plugin defines has its command, and nothing is built at import.- list_commands(ctx)
Returns a list of subcommand names in the order they should appear.
- get_command(ctx, name)
Given a context and a command name, this returns a
Commandobject if it exists or returnsNone.
- cellmap_flow.cli.common.deprecation_notice(old: str, new: str) None
Tell the user, on stderr, that
oldis going andnewreplaces it.
- cellmap_flow.cli.common.deprecated(command: click.Command, old_name: str, old: str, new: str) click.Command
commandasold_name, its name before 0.3.0: hidden from –help, and saying thatnewreplacesoldeach time before it runs.