python_dependencies#
- python_dependencies()[source]#
Python package dependency requirement specifiers for the object (PEP 440).
Part of packaging metadata for the object.
String name:
"python_dependencies"Private tag, developer and framework facing
Values: str or list of str, each str a PEP 440 compliant dependency specifier
Example:
"numpy>=1.20.0"Example 2:
["numpy>=1.20.0", "pandas>=1.3.0"]Default: no requirements beyond
sktimecore dependencies (None)
sktimemanages objects and estimators like mini-packages, with their own dependencies and compatibility requirements. Dependencies are specified in the tags:"python_version": Python version specifier (PEP 440) for the object,"python_dependencies": list of required Python packages (PEP 440)"env_marker": environment marker for the object (PEP 508)"requires_cython": whether the object requires a C compiler present
The
python_dependenciestag of an object is string or list of strings, each string a PEP 440 compliant version specifier, specifying python dependency requirements of the object.If passed as a list, conditions are combined with logical AND. Optionally, lists within a list can be used to combine conditions with logical OR.
The tag is used in packaging metadata for the object, and is used internally to check compatibility of the object with the build environment, to raise informative error messages.
Valid dependency specifications with plain English descriptions:
"numba":numbamust be present"numpy>=1.20.0":numpymust be version 1.20.0 or higher["numpy>=1.20.0", "pandas>=1.3.0"]:numpymust be version 1.20.0 or higher, andpandasmust be version 1.3.0 or higher[["numpy>=1.20.0", "pandas>=1.3.0"], "scikit-learn>=0.24.0"]:scikit-learnmust be version 0.24.0 or higher, and at least one of the following should be true>numpymust be version 1.20.0 or higher, orpandasmust be version 1.3.0 or higher
Developers should note that package names in the PEP 440 specifier strings that should be provided are identical with the package names used in
pip installcommands or on PyPI, which in general is not the same as the import name of the package, e.g.,"scikit-learn"as inpip install scikit-learn, and not"sklearn", as inimport sklearn.Developers can use
_check_soft_dependenciesfromskbase.utils.dependenciesto check compatibility of the python constraint of the object with the current build environment, or_check_estimator_depsto check compatibility of the object (including further checks) with the current build environment.