ramble.definitions namespace
Submodules
ramble.definitions.families module
ramble.definitions.requirements module
- class ramble.definitions.requirements.PackageManagerRequirement(command: str, validation_type: str, regex: str, package_manager: str, when: list)[source]
Bases:
objectClass representing a package manager requirement for a modifier
- as_str(n_indent: int = 0, verbose: bool = False)[source]
String representation of this requirement
- Parameters:
n_indent – Number of spaces to indent string lines with
verbose – Print verbose output
- Returns:
Representation of this requirement
- Return type:
(str)
- print_attr_map = [('command', 'Command'), ('validation_type', 'Validation Type'), ('package_manager', 'Package Manager'), ('regex', 'Regex'), ('when', 'When')]
ramble.definitions.variables module
- class ramble.definitions.variables.CommandVariable(name: str, command: str, dry_run_value: str, description: str | None = None, expandable: bool = True, track_used: bool = True, when=None, **kwargs)[source]
Bases:
Variable- print_attr_map = [('description', 'Description'), ('command', 'Command'), ('dry_run_value', 'Dry Run Value'), ('when', 'When')]
- class ramble.definitions.variables.EnvironmentVariable(name: str, value=None, description: str | None = None, method: str = 'set', append_separator: str = ',', when=None, **kwargs)[source]
Bases:
objectClass representing an environment variable
- as_str(n_indent: int = 0, verbose: bool = False)[source]
String representation of environment variable
- print_attr_map = [('description', 'Description'), ('value', 'Value'), ('method', 'Method'), ('separator', 'Separator'), ('when', 'When')]
- class ramble.definitions.variables.EnvironmentVariableModifications(name: str, modification: str, method: str = 'set', when: List[str] | None = None, **kwargs)[source]
Bases:
objectClass representing modifications of an environment variable
- add_modification(modification: str, method: str = 'set', **kwargs)[source]
Adds a modification to this environment variable
- all_methods = ['set', 'unset', 'prepend', 'append']
- class ramble.definitions.variables.Variable(name: str, default=None, description: str | None = None, values=None, expandable: bool = True, track_used: bool = True, when=None, **kwargs)[source]
Bases:
objectClass representing a variable definition
- print_attr_map = [('description', 'Description'), ('default', 'Default'), ('values', 'Suggested Values'), ('when', 'When')]
- class ramble.definitions.variables.VariableModification(name: str, modification: str, method: str = 'set', separator: str = ' ', when=None, **kwargs)[source]
Bases:
objectClass representing a variable modification
- print_attr_map = [('modification', 'Modification'), ('method', 'Method'), ('separator', 'Separator'), ('when', 'When')]
ramble.definitions.versions module
- class ramble.definitions.versions.ObjectVersion(version_number: str = '', version: Version | None = None, description: str = '', origin_type: str = '', preferred: bool = False, version_to_pep440: Callable[[str], str] | None = None, pep440_to_version: Callable[[str], str] | None = None)[source]
Bases:
object- get_version()[source]
Returns the packaging.version.Version representation of this version
Deprecated since version 0.6.0: This will be removed in 0.7.0. Access the .version attribute directly instead
- get_version_num()[source]
Returns the version number of this version
Deprecated since version 0.6.0: This will be removed in 0.7.0. Use the .version_num property instead
- satisfies(variant)[source]
Determine if an experiment’s variant satisfies this version
- Parameters:
variant – A version variant containing the “@” sigil
- Returns:
- True or False, based if the experiment’s variant satisfies
the version
- Return type:
(bool)
- property version_num
Returns the version number of this version