mloq.commands
Contents
mloq.commands
#
Contains all the defined mloq Commands.
Submodules#
Package Contents#
Classes#
Implement the functionality of the ci Command. |
|
Implement the functionality of the docker Command. |
|
Implement the functionality of the docs Command. |
|
Implement the functionality of the globals Command. |
|
Implement the functionality of the license Command. |
|
Implement the functionality of the lint Command. |
|
Implement the functionality of the package Command. |
|
Implement the functionality of the project Command. |
|
Implement the functionality of the requirements Command. |
|
Implement the functionality of the setup Command. |
- class mloq.commands.CiCMD(record, interactive=False, **kwargs)[source]#
Bases:
mloq.command.Command
Implement the functionality of the ci Command.
- Parameters
record (mloq.writer.CMDRecord) –
interactive (bool) –
- cmd_name :str = ci#
- ubuntu_version#
- disable#
- docker#
- project_name#
- default_branch#
- docker_org#
- bot_name#
- bot_email#
- ci_python_version#
- python_versions#
- ci_extra#
- vendor#
- open_source#
- author#
- owner#
- email#
- project_url#
- files#
- property directories#
Tuple containing Paths objects representing the directories created by the command.
- Return type
Tuple[pathlib.Path]
- class mloq.commands.DockerCMD(record, interactive=False, **kwargs)[source]#
Bases:
mloq.command.Command
Implement the functionality of the docker Command.
- Parameters
record (mloq.writer.CMDRecord) –
interactive (bool) –
- cmd_name = docker#
- files#
- disable#
- cuda#
- cuda_image_type#
- cuda_version#
- ubuntu_version#
- project_name#
- docker_org#
- python_version#
- base_image#
- test#
- lint#
- jupyter#
- jupyter_password#
- requirements#
- extra#
- makefile#
- static require_cuda_from_requirements(project_config=None)[source]#
Return True if any of the project dependencies require CUDA.
- Parameters
project_config (Optional[omegaconf.DictConfig]) –
- Return type
bool
- parse_config()[source]#
Update the configuration dictionary from the data entered by the user.
- Return type
omegaconf.DictConfig
- class mloq.commands.DocsCMD(record, interactive=False, **kwargs)[source]#
Bases:
mloq.command.Command
Implement the functionality of the docs Command.
- Parameters
record (mloq.writer.CMDRecord) –
interactive (bool) –
- cmd_name = docs#
- disable#
- project_name#
- description#
- author#
- copyright_year#
- copyright_holder#
- deploy_docs#
- default_branch#
- project_url#
- files#
- property directories#
Tuple containing Paths objects representing the directories created by the command.
- Return type
Tuple[pathlib.Path]
- class mloq.commands.GlobalsCMD(record, interactive=False, **kwargs)[source]#
Bases:
mloq.command.Command
Implement the functionality of the globals Command.
- Parameters
record (mloq.writer.CMDRecord) –
interactive (bool) –
- cmd_name = globals#
- project_name#
- description#
- author#
- owner#
- email#
- open_source#
- project_url#
- default_branch#
- license#
- use_poetry#
- main_python_version#
- class mloq.commands.LicenseCMD(record, interactive=False, **kwargs)[source]#
Bases:
mloq.command.Command
Implement the functionality of the license Command.
- Parameters
record (mloq.writer.CMDRecord) –
interactive (bool) –
- cmd_name = license#
- files#
- LICENSES#
- disable#
- license#
- copyright_year#
- copyright_holder#
- project_name#
- project_url#
- email#
- class mloq.commands.LintCMD(record, interactive=False, **kwargs)[source]#
Bases:
mloq.command.Command
Implement the functionality of the lint Command.
- Parameters
record (mloq.writer.CMDRecord) –
interactive (bool) –
- cmd_name = lint#
- files#
- disable#
- black#
- isort#
- linters#
- docstring_checks#
- pyproject_extra#
- project_name#
- makefile#
- poetry_requirements#
- ignore_files#
- class mloq.commands.PackageCMD(record, interactive=False, **kwargs)[source]#
Bases:
mloq.command.Command
Implement the functionality of the package Command.
- Parameters
record (mloq.writer.CMDRecord) –
interactive (bool) –
- cmd_name = package#
- files#
- LICENSE_CLASSIFIERS#
- disable#
- pyproject_extra#
- project_name#
- license#
- license_classifier#
- description#
- default_branch#
- project_url#
- owner#
- author#
- email#
- main_python_version#
- python_versions#
- use_poetry#
- parse_config()[source]#
Update the configuration DictConfig with the Command parameters.
- Return type
omegaconf.DictConfig
- class mloq.commands.ProjectCMD(record, interactive=False, **kwargs)[source]#
Bases:
mloq.command.Command
Implement the functionality of the project Command.
- Parameters
record (mloq.writer.CMDRecord) –
interactive (bool) –
- cmd_name = project#
- files#
- disable#
- project_name#
- owner#
- description#
- project_url#
- license#
- tests#
- property directories#
Tuple containing Paths objects representing the directories created by the command.
- Return type
Tuple[pathlib.Path]
- class mloq.commands.RequirementsCMD(record, interactive=False)[source]#
Bases:
mloq.command.Command
Implement the functionality of the requirements Command.
- Parameters
record (mloq.record.CMDRecord) –
interactive (bool) –
- cmd_name = requirements#
- files#
- disable#
- requirements#
- REQUIREMENTS_ALIASES#
- classmethod get_aliased_requirements_file(option)[source]#
Get requirement file from aliased name.
- Parameters
option (str) –
- Return type
- classmethod read_requirements_file(option)[source]#
Return the content of the target requirements file form an aliased name.
- Parameters
option (str) –
- Return type
str
- classmethod compose_requirements(options)[source]#
Return the content requirements.txt file with pinned dependencies.
The returned string contains the combined dependencies for the different options sorted alphabetically.
- Parameters
options (Iterable[str]) – Iterable containing the aliased names of the target dependencies for the project.
- Returns
str containing the pinned versions of all the selected requirements.
- Return type
str
- interactive_config()[source]#
Generate the configuration of the project interactively.
- Return type
omegaconf.DictConfig
- class mloq.commands.SetupCMD(record, interactive=False)[source]#
Bases:
mloq.command.CommandMixin
Implement the functionality of the setup Command.
- Parameters
record (mloq.record.CMDRecord) –
interactive (bool) –
- cmd_name = setup#
- files#
- SUB_COMMAND_CLASSES#
- property config#
List of all the commands that will be executed when running mloq setup.
- Return type
omegaconf.DictConfig
- property sub_commands#
List of all the commands that will be executed when running mloq setup.
- Return type
List[mloq.command.Command]
- property directories#
Tuple containing Paths objects representing the directories created by the command.
- Return type
Tuple[pathlib.Path]
- interactive_config()[source]#
Generate the configuration of the project interactively.
- Return type
omegaconf.DictConfig