- class substrafl.dependency.Dependency(*, editable_mode: bool = False, pypi_dependencies: List[str] = None, local_dependencies: List[pathlib.Path] = None, local_code: List[pathlib.Path] = None, excluded_paths: List[pathlib.Path] = None, excluded_regex: List[str] = None, force_included_paths: List[pathlib.Path] = None)¶
Dependency pydantic class.
If you are using your current package as a local dependencies, be aware that folders named local-worker or with tmp_substrafl as prefix are ignored during the installation.
editable_mode (bool) – If set to False, substra, substrafl and substratools used in the Dockerfiles submitted to Substra platform will be taken from pypi. If set to True, it will be the one installed in editable mode from your python environment. Defaults to False.
dependencies (List[str]) – Python packages installable from pypi.
local_dependencies (List[pathlib.Path]) – Local installable packages. The command pip install -e . will be executed in each of those folders hence a setup.py must be present in each folder.
local_code (List[pathlib.Path]) – Local relative imports used by your script. All files / folders will be pasted to the level of the running script.
excluded_paths (List[pathlib.Path]) – Local paths excluded from local_dependencies / local_code. Default to .
excluded_regex (List[pathlib.Path]) – Regex used to exclude files from local_dependencies / local_code. Default to . Always excludes common data formats (see substrafl.dependency.path_management.EXCLUDED_PATHS_REGEX_DEFAULT).
force_included_paths (List[pathlib.Path]) – Force include files otherwise excluded by excluded_paths and excluded_regex Default to 
- Return type
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- classmethod check_setup(v)¶
Check the presence of a setup.py file in the provided paths.
- classmethod resolve_path(v)¶
Resolve list of local code paths and check if they exist.