diff --git a/docs/_static/architecture_diagram.py b/docs/_static/architecture_diagram.py index 934fafd8f..d34a77249 100644 --- a/docs/_static/architecture_diagram.py +++ b/docs/_static/architecture_diagram.py @@ -9,9 +9,14 @@ from diagrams.k8s.storage import PV from diagrams.custom import Custom -directory=os.path.dirname(__file__) +directory = os.path.dirname(__file__) -with Diagram("Gordo flow", filename=os.path.join(directory, "architecture_diagram"), outformat="png", show=False) as diag: +with Diagram( + "Gordo flow", + filename=os.path.join(directory, "architecture_diagram"), + outformat="png", + show=False, +) as diag: with Cluster("K8s"): gordo = CRD("Gordo") api = API("") diff --git a/docs/conf.py b/docs/conf.py index e9645f6a3..06a1b142d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,11 @@ author = "Equinor ASA" version = gordo.__version__ _parsed_version = parse_version(version) -commit = f"{version}" if type(_parsed_version) is GordoRelease and not _parsed_version.suffix else "HEAD" +commit = ( + f"{version}" + if type(_parsed_version) is GordoRelease and not _parsed_version.suffix + else "HEAD" +) # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration @@ -44,7 +48,7 @@ "IPython.sphinxext.ipython_console_highlighting", "sphinx_copybutton", "sphinx_click", - "nbsphinx" + "nbsphinx", ] root_doc = "index" @@ -59,8 +63,11 @@ _ignore_linkcode_infos = [ # caused "OSError: could not find class definition" {"module": "gordo_core.utils", "fullname": "PredictionResult"}, - {'module': 'gordo.workflow.config_elements.schemas', 'fullname': 'Model.Config.extra'}, - {'module': 'gordo.reporters.postgres', 'fullname': 'Machine.DoesNotExist'} + { + "module": "gordo.workflow.config_elements.schemas", + "fullname": "Model.Config.extra", + }, + {"module": "gordo.reporters.postgres", "fullname": "Machine.DoesNotExist"}, ] diff --git a/gordo/machine/model/anomaly/diff.py b/gordo/machine/model/anomaly/diff.py index 051610d21..e3b1f6f5d 100644 --- a/gordo/machine/model/anomaly/diff.py +++ b/gordo/machine/model/anomaly/diff.py @@ -95,13 +95,13 @@ def get_metadata(self): if hasattr(self, "aggregate_threshold_"): metadata["aggregate-threshold"] = self.aggregate_threshold_ if hasattr(self, "feature_thresholds_per_fold_"): - metadata[ - "feature-thresholds-per-fold" - ] = self.feature_thresholds_per_fold_.to_dict() + metadata["feature-thresholds-per-fold"] = ( + self.feature_thresholds_per_fold_.to_dict() + ) if hasattr(self, "aggregate_thresholds_per_fold_"): - metadata[ - "aggregate-thresholds-per-fold" - ] = self.aggregate_thresholds_per_fold_ + metadata["aggregate-thresholds-per-fold"] = ( + self.aggregate_thresholds_per_fold_ + ) # Window threshold metadata if hasattr(self, "window"): metadata["window"] = self.window @@ -111,9 +111,9 @@ def get_metadata(self): hasattr(self, "smooth_feature_thresholds_") and self.smooth_aggregate_threshold_ is not None ): - metadata[ - "smooth-feature-thresholds" - ] = self.smooth_feature_thresholds_.tolist() + metadata["smooth-feature-thresholds"] = ( + self.smooth_feature_thresholds_.tolist() + ) if ( hasattr(self, "smooth_aggregate_threshold_") and self.smooth_aggregate_threshold_ is not None @@ -121,13 +121,13 @@ def get_metadata(self): metadata["smooth-aggregate-threshold"] = self.smooth_aggregate_threshold_ if hasattr(self, "smooth_feature_thresholds_per_fold_"): - metadata[ - "smooth-feature-thresholds-per-fold" - ] = self.smooth_feature_thresholds_per_fold_.to_dict() + metadata["smooth-feature-thresholds-per-fold"] = ( + self.smooth_feature_thresholds_per_fold_.to_dict() + ) if hasattr(self, "smooth_aggregate_thresholds_per_fold_"): - metadata[ - "smooth-aggregate-thresholds-per-fold" - ] = self.smooth_aggregate_thresholds_per_fold_ + metadata["smooth-aggregate-thresholds-per-fold"] = ( + self.smooth_aggregate_thresholds_per_fold_ + ) if isinstance(self.base_estimator, GordoBase): metadata.update(self.base_estimator.get_metadata()) @@ -241,9 +241,9 @@ def cross_validate( smooth_aggregate_threshold_fold = ( scaled_mse.rolling(self.window).min().max() ) - self.smooth_aggregate_thresholds_per_fold_[ - f"fold-{i}" - ] = smooth_aggregate_threshold_fold + self.smooth_aggregate_thresholds_per_fold_[f"fold-{i}"] = ( + smooth_aggregate_threshold_fold + ) smooth_tag_thresholds_fold = mae.rolling(self.window).min().max() smooth_tag_thresholds_fold.name = f"fold-{i}" diff --git a/gordo/machine/model/factories/lstm_autoencoder.py b/gordo/machine/model/factories/lstm_autoencoder.py index 2c99516a8..1b43b4c1a 100644 --- a/gordo/machine/model/factories/lstm_autoencoder.py +++ b/gordo/machine/model/factories/lstm_autoencoder.py @@ -3,10 +3,10 @@ from typing import Tuple, Union, Dict, Any import tensorflow -from tensorflow import keras from tensorflow.keras.optimizers import Optimizer from tensorflow.keras.layers import Dense, LSTM from tensorflow.keras.models import Sequential as KerasSequential +from tensorflow import keras from gordo.machine.model.register import register_model_builder from gordo.machine.model.factories.utils import hourglass_calc_dims, check_dim_func_len @@ -189,7 +189,6 @@ def lstm_hourglass( compile_kwargs: Dict[str, Any] = dict(), **kwargs, ) -> tensorflow.keras.models.Sequential: - """ Builds an hourglass shaped neural network, with decreasing number of neurons diff --git a/gordo/machine/model/register.py b/gordo/machine/model/register.py index 55fb94c4b..dce61e21e 100644 --- a/gordo/machine/model/register.py +++ b/gordo/machine/model/register.py @@ -48,22 +48,22 @@ def special_keras_model_builder(n_features, ...): def __init__(self, type: str): self.type = type - def __call__(self, build_fn: Callable[..., keras.models.Model]): - self._register(self.type, build_fn) - return build_fn + def __call__(self, model: Callable[..., keras.models.Model]): + self._register(self.type, model) + return model @classmethod - def _register(cls, type: str, build_fn: Callable[[int, Any], GordoBase]): + def _register(cls, type: str, model: Callable[[int, Any], GordoBase]): """ Registers a given function as an available factory under this type. """ - cls._validate_func(build_fn) + cls._validate_func(model) # Add function to available factories under this type if type not in cls.factories: cls.factories[type] = dict() - cls.factories[type][build_fn.__name__] = build_fn + cls.factories[type][model.__name__] = model @staticmethod def _validate_func(func): diff --git a/gordo/machine/model/transformers/imputer.py b/gordo/machine/model/transformers/imputer.py index 5c3d6c57b..43a99f176 100644 --- a/gordo/machine/model/transformers/imputer.py +++ b/gordo/machine/model/transformers/imputer.py @@ -71,14 +71,18 @@ def fit(self, X: Union[pd.DataFrame, np.ndarray], y=None): # Calculate a 1d arrays of fill values for each feature self._posinf_fill_values = _posinf_fill_values.apply( - lambda val: val + self.delta - if max_allowable_value - self.delta > val - else max_allowable_value + lambda val: ( + val + self.delta + if max_allowable_value - self.delta > val + else max_allowable_value + ) ) self._neginf_fill_values = _neginf_fill_values.apply( - lambda val: val - self.delta - if min_allowable_value + self.delta < val - else min_allowable_value + lambda val: ( + val - self.delta + if min_allowable_value + self.delta < val + else min_allowable_value + ) ) return self diff --git a/gordo/machine/model/utils.py b/gordo/machine/model/utils.py index 3e17b1865..801db59f5 100644 --- a/gordo/machine/model/utils.py +++ b/gordo/machine/model/utils.py @@ -111,9 +111,11 @@ def make_base_dataframe( # Calculate the end times if possible, or also all 'None's end_series = start_series.map( - lambda start: (start + frequency).isoformat() - if isinstance(start, datetime) and frequency is not None - else None + lambda start: ( + (start + frequency).isoformat() + if isinstance(start, datetime) and frequency is not None + else None + ) ) # Convert to isoformatted string for JSON serialization. @@ -134,7 +136,7 @@ def make_base_dataframe( # the multiindex column dataframe, and naming their second level labels as needed. name: str values: np.ndarray - for (name, values) in filter(lambda nv: nv[1] is not None, names_n_values): + for name, values in filter(lambda nv: nv[1] is not None, names_n_values): _tags = tags if name == "model-input" else target_tag_list diff --git a/gordo/serializer/from_definition.py b/gordo/serializer/from_definition.py index e12291c0a..9bff1b7fa 100644 --- a/gordo/serializer/from_definition.py +++ b/gordo/serializer/from_definition.py @@ -176,9 +176,9 @@ def _build_step( import_str = list(step.keys())[0] try: - StepClass: Union[ - None, FeatureUnion, Pipeline, BaseEstimator - ] = import_location(import_str) + StepClass: Union[None, FeatureUnion, Pipeline, BaseEstimator] = ( + import_location(import_str) + ) except (ImportError, ValueError): StepClass = None diff --git a/gordo/serializer/into_definition.py b/gordo/serializer/into_definition.py index ae13588b9..a2eec78c7 100644 --- a/gordo/serializer/into_definition.py +++ b/gordo/serializer/into_definition.py @@ -172,9 +172,11 @@ def load_definition_from_params(params: dict, tuples_to_list: bool = True) -> di # TODO: Make this more robust, probably via another function to parse the iterable recursively # TODO: b/c it _could_, in theory, be a dict of {str: BaseEstimator} or similar. definition[param] = [ - _decompose_node(leaf[1], tuples_to_list=tuples_to_list) - if isinstance(leaf, tuple) - else leaf + ( + _decompose_node(leaf[1], tuples_to_list=tuples_to_list) + if isinstance(leaf, tuple) + else leaf + ) for leaf in param_val ] diff --git a/gordo/server/utils.py b/gordo/server/utils.py index 9cf1a1942..f54817378 100644 --- a/gordo/server/utils.py +++ b/gordo/server/utils.py @@ -131,9 +131,11 @@ def dataframe_to_dict(df: pd.DataFrame) -> dict: data.index = data.index.astype(str) if isinstance(df.columns, pd.MultiIndex): return { - col: data[col].to_dict() - if isinstance(data[col], pd.DataFrame) - else pd.DataFrame(data[col]).to_dict() + col: ( + data[col].to_dict() + if isinstance(data[col], pd.DataFrame) + else pd.DataFrame(data[col]).to_dict() + ) for col in data.columns.get_level_values(0) } else: diff --git a/gordo/util/version.py b/gordo/util/version.py index a43d3a5dd..60b11157d 100644 --- a/gordo/util/version.py +++ b/gordo/util/version.py @@ -8,8 +8,7 @@ class Version(metaclass=ABCMeta): @abstractmethod - def get_version(self): - ... + def get_version(self): ... class Special(Enum): diff --git a/gordo/workflow/config_elements/normalized_config.py b/gordo/workflow/config_elements/normalized_config.py index 628071ba3..6c5a76b47 100644 --- a/gordo/workflow/config_elements/normalized_config.py +++ b/gordo/workflow/config_elements/normalized_config.py @@ -119,11 +119,11 @@ def __init__( if gordo_version is None: gordo_version = __version__ default_globals = self.get_default_globals(gordo_version) - default_globals["runtime"]["influx"][ # type: ignore + default_globals["runtime"]["influx"][ "resources" ] = _calculate_influx_resources( # type: ignore len(config["machines"]) - ) + ) # type: ignore passed_globals = load_globals_config( config.get("globals", dict()), join_json_paths("globals", json_path) diff --git a/pytest.ini b/pytest.ini index 53b71c8b8..a090bfa7b 100644 --- a/pytest.ini +++ b/pytest.ini @@ -11,8 +11,8 @@ addopts = --doctest-glob='*.md' --doctest-glob='*.rst' --junitxml=junit/junit.xml - --cov-report=xml - --cov=gordo +; --cov-report=xml +; --cov=gordo flakes-ignore = __init__.py UnusedImport test_*.py UnusedImport diff --git a/requirements/full_requirements.txt b/requirements/full_requirements.txt index 23b88edbd..642d64ee0 100644 --- a/requirements/full_requirements.txt +++ b/requirements/full_requirements.txt @@ -145,8 +145,6 @@ graphql-core==3.2.3 # graphql-relay graphql-relay==3.2.0 # via graphene -greenlet==3.0.3 - # via sqlalchemy grpcio==1.64.1 # via # tensorboard @@ -289,7 +287,7 @@ opt-einsum==3.3.0 # via tensorflow optree==0.11.0 # via keras -packaging==21.3 +packaging==24.1 # via # -r requirements.in # azureml-core @@ -352,9 +350,7 @@ pyopenssl==24.1.0 # azureml-core # ndg-httpsclient pyparsing==3.1.2 - # via - # matplotlib - # packaging + # via matplotlib pysocks==1.7.1 # via requests python-dateutil==2.9.0.post0 diff --git a/requirements/mlflow_requirements.in b/requirements/mlflow_requirements.in index f79ecbd06..23d129df5 100644 --- a/requirements/mlflow_requirements.in +++ b/requirements/mlflow_requirements.in @@ -1,2 +1,2 @@ mlflow~=2.14 -azureml-core~=1.49 +azureml-core~=1.56.0 diff --git a/requirements/requirements.in b/requirements/requirements.in index 0f40fb2ad..4945d87cb 100644 --- a/requirements/requirements.in +++ b/requirements/requirements.in @@ -1,15 +1,14 @@ dictdiffer~=0.8 dataclasses-json~=0.3 -gunicorn~=22.0 jinja2~=3.1 python-dateutil~=2.8 tensorflow~=2.16.0 scikeras~=0.13.0 +gunicorn~=22.0 # There's a bug in keras 3.4.0 with loading models (https://github.com/keras-team/keras/issues/19921) keras<3.4.0 Flask>=2.2.5,<3.0.0 simplejson~=3.17 prometheus_client~=0.7 -# Due to azureml-core 1.49.0 depends on packaging<22.0 -packaging>=21.0,<22.0 +packaging>=24.0 gordo-client~=6.2 diff --git a/requirements/test_requirements.in b/requirements/test_requirements.in index 077c481e2..533d60eb8 100644 --- a/requirements/test_requirements.in +++ b/requirements/test_requirements.in @@ -1,6 +1,6 @@ -c full_requirements.txt -docker>=4.0,<7.0 -pytest~=7.2 +docker~=7.1.0 +pytest~=8.2 pytest-xdist~=3.2 pytest-mock~=3.6 pytest-mypy~=0.10 @@ -9,10 +9,9 @@ pytest-cov~=4.0 pytest-benchmark~=4.0 pytest-flakes~=4.0 mock~=5.0 -responses~=0.23 -# Due to packaging>22.0 in black 23.0, azureml-core~=1.49 requires packaging<22.0 -black>=22.0,<23.0 -notebook~=6.4 +responses~=0.25.3 +black~=24.4.2 +notebook~=7.2.1 nbconvert~=7.4 types-simplejson types-python-dateutil diff --git a/requirements/test_requirements.txt b/requirements/test_requirements.txt index 74e614df9..69507dae7 100644 --- a/requirements/test_requirements.txt +++ b/requirements/test_requirements.txt @@ -4,33 +4,40 @@ # # pip-compile --no-emit-index-url --output-file=test_requirements.txt test_requirements.in # -anyio==4.2.0 - # via jupyter-server -argon2-cffi==23.1.0 +anyio==4.4.0 # via + # httpx # jupyter-server - # nbclassic - # notebook +appnope==0.1.4 + # via ipykernel +argon2-cffi==23.1.0 + # via jupyter-server argon2-cffi-bindings==21.2.0 # via argon2-cffi arrow==1.3.0 # via isoduration asttokens==2.4.1 # via stack-data +async-lru==2.0.4 + # via jupyterlab attrs==23.2.0 # via # jsonschema # pytest-mypy # referencing +babel==2.15.0 + # via jupyterlab-server beautifulsoup4==4.12.3 # via nbconvert -black==22.12.0 +black==24.4.2 # via -r test_requirements.in bleach==6.1.0 # via nbconvert -certifi==2023.11.17 +certifi==2024.7.4 # via # -c full_requirements.txt + # httpcore + # httpx # requests cffi==1.16.0 # via @@ -44,104 +51,112 @@ click==8.1.7 # via # -c full_requirements.txt # black -comm==0.2.1 +comm==0.2.2 # via ipykernel -coverage[toml]==7.4.0 +coverage[toml]==7.5.4 # via pytest-cov -debugpy==1.8.0 +debugpy==1.8.1 # via ipykernel decorator==5.1.1 # via ipython defusedxml==0.7.1 # via nbconvert -docker==6.1.3 +docker==7.1.0 # via # -c full_requirements.txt # -r test_requirements.in -entrypoints==0.4 - # via - # -c full_requirements.txt - # jupyter-client -execnet==2.0.2 +execnet==2.1.1 # via pytest-xdist executing==2.0.1 # via stack-data -fastjsonschema==2.19.1 +fastjsonschema==2.20.0 # via nbformat -filelock==3.13.1 +filelock==3.15.4 # via pytest-mypy fqdn==1.5.1 # via jsonschema -idna==3.6 +h11==0.14.0 + # via httpcore +httpcore==1.0.5 + # via httpx +httpx==0.27.0 + # via jupyterlab +idna==3.7 # via # -c full_requirements.txt # anyio + # httpx # jsonschema # requests iniconfig==2.0.0 # via pytest -ipykernel==6.29.0 - # via - # nbclassic - # notebook -ipython==8.20.0 +ipykernel==6.29.4 + # via jupyterlab +ipython==8.25.0 # via ipykernel -ipython-genutils==0.2.0 - # via - # nbclassic - # notebook isoduration==20.11.0 # via jsonschema jedi==0.19.1 # via ipython -jinja2==3.1.3 +jinja2==3.1.4 # via # -c full_requirements.txt # jupyter-server - # nbclassic + # jupyterlab + # jupyterlab-server # nbconvert - # notebook -jsonpointer==2.4 +json5==0.9.25 + # via jupyterlab-server +jsonpointer==3.0.0 # via jsonschema -jsonschema[format-nongpl]==4.21.1 +jsonschema[format-nongpl]==4.22.0 # via # jupyter-events + # jupyterlab-server # nbformat jsonschema-specifications==2023.12.1 # via jsonschema -jupyter-client==7.4.9 +jupyter-client==8.6.2 # via # ipykernel # jupyter-server - # nbclassic # nbclient - # notebook -jupyter-core==5.7.1 +jupyter-core==5.7.2 # via # ipykernel # jupyter-client # jupyter-server - # nbclassic + # jupyterlab # nbclient # nbconvert # nbformat - # notebook -jupyter-events==0.9.0 +jupyter-events==0.10.0 # via jupyter-server -jupyter-server==2.12.5 +jupyter-lsp==2.2.5 + # via jupyterlab +jupyter-server==2.14.1 # via - # nbclassic + # jupyter-lsp + # jupyterlab + # jupyterlab-server + # notebook # notebook-shim -jupyter-server-terminals==0.5.2 +jupyter-server-terminals==0.5.3 # via jupyter-server +jupyterlab==4.2.2 + # via notebook jupyterlab-pygments==0.3.0 # via nbconvert -markupsafe==2.1.4 +jupyterlab-server==2.27.2 + # via + # jupyterlab + # notebook +markupsafe==2.1.5 # via # -c full_requirements.txt # jinja2 # nbconvert -matplotlib-inline==0.1.6 +matplotlib-inline==0.1.7 # via # ipykernel # ipython @@ -149,53 +164,47 @@ mistune==3.0.2 # via nbconvert mock==5.1.0 # via -r test_requirements.in -mypy==1.8.0 +mypy==1.10.0 # via pytest-mypy mypy-extensions==1.0.0 # via # -c full_requirements.txt # black # mypy -nbclassic==1.0.0 - # via notebook -nbclient==0.9.0 +nbclient==0.10.0 # via nbconvert -nbconvert==7.14.2 +nbconvert==7.16.4 # via # -r test_requirements.in # jupyter-server - # nbclassic - # notebook -nbformat==5.9.2 +nbformat==5.10.4 # via # jupyter-server - # nbclassic # nbclient # nbconvert - # notebook nest-asyncio==1.6.0 + # via ipykernel +notebook==7.2.1 + # via -r test_requirements.in +notebook-shim==0.2.4 # via - # ipykernel - # jupyter-client - # nbclassic + # jupyterlab # notebook -notebook==6.5.6 - # via -r test_requirements.in -notebook-shim==0.2.3 - # via nbclassic -overrides==7.6.0 +overrides==7.7.0 # via jupyter-server -packaging==21.3 +packaging==24.1 # via # -c full_requirements.txt - # docker + # black # ipykernel # jupyter-server + # jupyterlab + # jupyterlab-server # nbconvert # pytest pandocfilters==1.5.1 # via nbconvert -parso==0.8.3 +parso==0.8.4 # via jedi pathspec==0.12.1 # via @@ -203,21 +212,19 @@ pathspec==0.12.1 # black pexpect==4.9.0 # via ipython -platformdirs==4.1.0 +platformdirs==4.2.2 # via # black # jupyter-core -pluggy==1.3.0 +pluggy==1.5.0 # via pytest -prometheus-client==0.19.0 +prometheus-client==0.20.0 # via # -c full_requirements.txt # jupyter-server - # nbclassic - # notebook -prompt-toolkit==3.0.43 +prompt-toolkit==3.0.47 # via ipython -psutil==5.9.8 +psutil==6.0.0 # via ipykernel ptyprocess==0.7.0 # via @@ -227,22 +234,18 @@ pure-eval==0.2.2 # via stack-data py-cpuinfo==9.0.0 # via pytest-benchmark -pycparser==2.21 +pycparser==2.22 # via # -c full_requirements.txt # cffi pyflakes==3.2.0 # via pytest-flakes -pygments==2.17.2 +pygments==2.18.0 # via # -c full_requirements.txt # ipython # nbconvert -pyparsing==3.1.1 - # via - # -c full_requirements.txt - # packaging -pytest==7.4.4 +pytest==8.2.2 # via # -r test_requirements.in # pytest-benchmark @@ -258,15 +261,15 @@ pytest-cov==4.1.0 # via -r test_requirements.in pytest-flakes==4.0.5 # via -r test_requirements.in -pytest-mock==3.12.0 +pytest-mock==3.14.0 # via -r test_requirements.in pytest-mypy==0.10.3 # via -r test_requirements.in -pytest-timeout==2.2.0 +pytest-timeout==2.3.1 # via -r test_requirements.in -pytest-xdist==3.5.0 +pytest-xdist==3.6.1 # via -r test_requirements.in -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # -c full_requirements.txt # arrow @@ -278,24 +281,23 @@ pyyaml==6.0.1 # -c full_requirements.txt # jupyter-events # responses -pyzmq==24.0.1 +pyzmq==26.0.3 # via # ipykernel # jupyter-client # jupyter-server - # nbclassic - # notebook -referencing==0.32.1 +referencing==0.35.1 # via # jsonschema # jsonschema-specifications # jupyter-events -requests==2.31.0 +requests==2.32.3 # via # -c full_requirements.txt # docker + # jupyterlab-server # responses -responses==0.24.1 +responses==0.25.3 # via -r test_requirements.in rfc3339-validator==0.1.4 # via @@ -305,15 +307,12 @@ rfc3986-validator==0.1.1 # via # jsonschema # jupyter-events -rpds-py==0.17.1 +rpds-py==0.18.1 # via # jsonschema # referencing -send2trash==1.8.2 - # via - # jupyter-server - # nbclassic - # notebook +send2trash==1.8.3 + # via jupyter-server six==1.16.0 # via # -c full_requirements.txt @@ -321,29 +320,29 @@ six==1.16.0 # bleach # python-dateutil # rfc3339-validator -sniffio==1.3.0 - # via anyio +sniffio==1.3.1 + # via + # anyio + # httpx soupsieve==2.5 # via beautifulsoup4 stack-data==0.6.3 # via ipython -terminado==0.18.0 +terminado==0.18.1 # via # jupyter-server # jupyter-server-terminals - # nbclassic - # notebook -tinycss2==1.2.1 +tinycss2==1.3.0 # via nbconvert -tornado==6.4 +tornado==6.4.1 # via # ipykernel # jupyter-client # jupyter-server - # nbclassic + # jupyterlab # notebook # terminado -traitlets==5.14.1 +traitlets==5.14.3 # via # comm # ipykernel @@ -352,35 +351,35 @@ traitlets==5.14.1 # jupyter-core # jupyter-events # jupyter-server + # jupyterlab # matplotlib-inline - # nbclassic # nbclient # nbconvert # nbformat - # notebook -types-mock==5.1.0.20240106 +types-mock==5.1.0.20240425 # via -r test_requirements.in -types-python-dateutil==2.8.19.20240106 +types-python-dateutil==2.9.0.20240316 # via # -r test_requirements.in # arrow -types-pytz==2023.3.1.1 +types-pytz==2024.1.0.20240417 # via -r test_requirements.in -types-pyyaml==6.0.12.12 +types-pyyaml==6.0.12.20240311 # via -r test_requirements.in -types-requests==2.31.0.20240106 +types-requests==2.32.0.20240622 # via -r test_requirements.in -types-setuptools==69.0.0.20240115 +types-setuptools==70.0.0.20240524 # via -r test_requirements.in -types-simplejson==3.19.0.2 +types-simplejson==3.19.0.20240310 # via -r test_requirements.in -typing-extensions==4.5.0 +typing-extensions==4.12.2 # via # -c full_requirements.txt + # ipython # mypy uri-template==1.3.0 # via jsonschema -urllib3==2.1.0 +urllib3==2.2.2 # via # -c full_requirements.txt # docker @@ -389,14 +388,14 @@ urllib3==2.1.0 # types-requests wcwidth==0.2.13 # via prompt-toolkit -webcolors==1.13 +webcolors==24.6.0 # via jsonschema webencodings==0.5.1 # via # bleach # tinycss2 -websocket-client==1.7.0 - # via - # -c full_requirements.txt - # docker - # jupyter-server +websocket-client==1.8.0 + # via jupyter-server + +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/setup.py b/setup.py index d87a86d94..0490843b4 100644 --- a/setup.py +++ b/setup.py @@ -49,7 +49,7 @@ def requirements(fp: str): ], description="Train and build models for Argo / Kubernetes", long_description=long_description, - long_description_content_type='text/markdown', + long_description_content_type="text/markdown", entry_points={"console_scripts": ["gordo=gordo.cli:gordo"]}, install_requires=install_requires, license="AGPLv3", diff --git a/tests/gordo/client/test_client.py b/tests/gordo/client/test_client.py index 04097cbe7..e3b306363 100644 --- a/tests/gordo/client/test_client.py +++ b/tests/gordo/client/test_client.py @@ -1,4 +1,5 @@ """Tests for gordo-client.""" + # TODO: Move those tests to gordo-client project. import json diff --git a/tests/gordo/machine/model/test_register.py b/tests/gordo/machine/model/test_register.py index 47aa0b1ce..97a1369e1 100644 --- a/tests/gordo/machine/model/test_register.py +++ b/tests/gordo/machine/model/test_register.py @@ -15,16 +15,16 @@ def test_fail_no_required_params(self): with self.assertRaises(ValueError): @register_model_builder(type="KerasAutoEncoder") - def build_fn(): + def model(): pass # Pass with required param(s) @register_model_builder(type="KerasAutoEncoder") # pragma: no flakes - def build_fn(n_features): + def model(n_features): pass # Call to ensure that register didn't 'eat' the function - build_fn(1) + model(1) def test_hold_multiple_funcs(self): """ diff --git a/tests/gordo/test_version.py b/tests/gordo/test_version.py index 90e0a5b98..8feda84d3 100644 --- a/tests/gordo/test_version.py +++ b/tests/gordo/test_version.py @@ -18,7 +18,7 @@ def test_version(): "version,expected", [ ("1.1.1", (1, 1, False)), - ("1.1.1.dev-a1", (1, 1, True)), + ("1.1.1.dev-1", (1, 1, True)), ("0.55.0-rc1", (0, 55, True)), ("0.0.0", (0, 0, True)), ], diff --git a/tests/gordo/util/test_sensor_tag.py b/tests/gordo/util/test_sensor_tag.py index 139597f9c..8b1378917 100644 --- a/tests/gordo/util/test_sensor_tag.py +++ b/tests/gordo/util/test_sensor_tag.py @@ -1,2 +1 @@ - diff --git a/tests/gordo/workflow/test_helpers.py b/tests/gordo/workflow/test_helpers.py index 56919193e..78ef29a01 100644 --- a/tests/gordo/workflow/test_helpers.py +++ b/tests/gordo/workflow/test_helpers.py @@ -3,6 +3,7 @@ import pytest from mock import patch from packaging import version +from packaging.version import InvalidVersion from gordo.workflow.workflow_generator.helpers import ( determine_argo_version, @@ -17,7 +18,11 @@ def test_parse_argo_version(): parsed_version = parse_argo_version("2.12.11") assert type(parsed_version) is version.Version assert str(parsed_version) == "2.12.11" - assert parse_argo_version("wrong_version") is None + + +def test_parse_argo_version_error(): + with pytest.raises(InvalidVersion): + parse_argo_version("wrong_version") def create_completed_process(return_code, stdout):