Skip to content

Commit

Permalink
rerun make fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxue authored and seldondev committed Feb 5, 2021
1 parent 4386b73 commit 45f730d
Show file tree
Hide file tree
Showing 26 changed files with 122 additions and 110 deletions.
2 changes: 1 addition & 1 deletion python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ setup_linter:
fmt:
black \
./ ../testing ../operator/helm ../operator/hack \
--exclude "(testing/scripts|proto|seldon_core/proto/|.eggs|.tox)"
--exclude "(testing/scripts/proto|seldon_core/proto/|.eggs|.tox)"
isort \
./ ../testing ../operator/helm ../operator/hack \
--skip testing/scripts --skip proto --skip seldon_core/proto --skip .eggs --skip .tox
Expand Down
1 change: 1 addition & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
[tool.isort]
profile = "black"
multi_line_output = 3
known_first_party = ["seldon_core", "e2e_utils", "seldon_e2e_utils"]
2 changes: 1 addition & 1 deletion testing/benchmarking/tf_proto_save.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import argparse
import json
import base64
import json

from tensorflow.contrib.util import make_tensor_proto
from tensorflow_serving.apis import predict_pb2
Expand Down
5 changes: 3 additions & 2 deletions testing/benchmarking/vegeta_utils.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import json
import subprocess
import time
from subprocess import Popen, run

import yaml
import subprocess
from subprocess import run, Popen


def run_model(model_name):
Expand Down
1 change: 1 addition & 0 deletions testing/s2i/python-features/tags/Combiner.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging

import numpy as np


Expand Down
7 changes: 4 additions & 3 deletions testing/scripts/conftest.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import os
from subprocess import run

import pytest
from seldon_e2e_utils import clean_string, retry_run, get_seldon_version

from e2e_utils.install import install_seldon, delete_seldon
from e2e_utils.install import delete_seldon, install_seldon
from e2e_utils.s2i import create_s2i_image, kind_load_image
from subprocess import run
from seldon_e2e_utils import clean_string, get_seldon_version, retry_run


def _to_python_bool(val):
Expand Down
1 change: 0 additions & 1 deletion testing/scripts/e2e_utils/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from .common import HELM_CHARTS_PATH, to_helm_values_list


SC_NAME = "seldon"
SC_NAMESPACE = "seldon-system"

Expand Down
2 changes: 1 addition & 1 deletion testing/scripts/e2e_utils/jaeger.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import requests
from tenacity import retry, stop_after_attempt, wait_exponential, retry_if_result
from tenacity import retry, retry_if_result, stop_after_attempt, wait_exponential

from seldon_e2e_utils import API_AMBASSADOR

Expand Down
2 changes: 1 addition & 1 deletion testing/scripts/e2e_utils/s2i.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging

from sh import s2i, kind
from sh import kind, s2i


def create_s2i_image(
Expand Down
2 changes: 1 addition & 1 deletion testing/scripts/e2e_utils/v2_protocol.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import requests
from tenacity import retry, retry_if_result, stop_after_attempt, wait_exponential

from tenacity import retry, wait_exponential, stop_after_attempt, retry_if_result
from seldon_e2e_utils import API_AMBASSADOR


Expand Down
24 changes: 11 additions & 13 deletions testing/scripts/seldon_e2e_utils.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
import json
import logging
import os
import requests
import re
import grpc
import time
import logging
import numpy as np
import json
import subprocess

import time
from concurrent.futures import ThreadPoolExecutor, wait
from subprocess import run, Popen
from tenacity import retry, wait_exponential, stop_after_attempt
from requests.auth import HTTPBasicAuth

from seldon_core.proto import prediction_pb2
from seldon_core.proto import prediction_pb2_grpc
from subprocess import Popen, run

import grpc
import numpy as np
import requests
from google.protobuf import empty_pb2
from requests.auth import HTTPBasicAuth
from tenacity import retry, stop_after_attempt, wait_exponential

from seldon_core.proto import prediction_pb2, prediction_pb2_grpc

API_AMBASSADOR = "localhost:8003"
API_ISTIO_GATEWAY = "localhost:8004"
Expand Down
6 changes: 4 additions & 2 deletions testing/scripts/test_api_version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import pytest
from seldon_e2e_utils import wait_for_rollout, wait_for_status, assert_model
from subprocess import run

import pytest

from seldon_e2e_utils import assert_model, wait_for_rollout, wait_for_status


@pytest.mark.parametrize(
"apiVersion",
Expand Down
2 changes: 1 addition & 1 deletion testing/scripts/test_bad_graphs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import subprocess
import json
import subprocess
from subprocess import run


Expand Down
24 changes: 13 additions & 11 deletions testing/scripts/test_batch_processor.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
import json
import logging
import time
import uuid
from subprocess import run

import requests

from seldon_core.batch_processor import start_multithreaded_batch_worker
from seldon_e2e_utils import (
wait_for_rollout,
API_ISTIO_GATEWAY,
create_random_data,
initial_rest_request,
rest_request,
rest_request_ambassador,
retry_run,
create_random_data,
wait_for_rollout,
wait_for_status,
rest_request,
API_ISTIO_GATEWAY,
)
from subprocess import run
import time
import logging
import json
import requests
import uuid
from seldon_core.batch_processor import start_multithreaded_batch_worker


class TestBatchWorker(object):
Expand Down
13 changes: 7 additions & 6 deletions testing/scripts/test_helm_charts_clusterwide.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import logging
from subprocess import run

from seldon_e2e_utils import (
wait_for_rollout,
wait_for_status,
initial_rest_request,
rest_request_ambassador,
API_AMBASSADOR,
assert_model,
initial_rest_request,
rest_request_ambassador,
wait_for_rollout,
wait_for_status,
)
from subprocess import run
import logging


class TestClusterWide(object):
Expand Down
9 changes: 5 additions & 4 deletions testing/scripts/test_local_operators.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import logging
from subprocess import run

from seldon_e2e_utils import (
wait_for_status,
wait_for_rollout,
rest_request_ambassador,
API_AMBASSADOR,
initial_rest_request,
rest_request_ambassador,
retry_run,
API_AMBASSADOR,
wait_for_rollout,
wait_for_status,
)


Expand Down
3 changes: 2 additions & 1 deletion testing/scripts/test_notebooks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from subprocess import run, PIPE, CalledProcessError
import logging
from subprocess import PIPE, CalledProcessError, run

import pytest


Expand Down
6 changes: 3 additions & 3 deletions testing/scripts/test_operator_updates.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import pytest

from seldon_e2e_utils import (
assert_model,
assert_model_during_op,
retry_run,
wait_for_status,
wait_for_rollout,
assert_model_during_op,
assert_model,
wait_for_status,
)

SELDON_VERSIONS_TO_TEST = [
Expand Down
21 changes: 11 additions & 10 deletions testing/scripts/test_prepackaged_servers.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
import time
import json
import logging
import time
from subprocess import run

import numpy as np
from google.protobuf import json_format

from e2e_utils import v2_protocol
from e2e_utils.models import deploy_model
from seldon_e2e_utils import (
wait_for_rollout,
create_random_data,
grpc_request_ambassador,
initial_rest_request,
log_sdep_logs,
rest_request_ambassador,
grpc_request_ambassador,
retry_run,
create_random_data,
wait_for_rollout,
wait_for_status,
log_sdep_logs,
)
from e2e_utils import v2_protocol
from e2e_utils.models import deploy_model
import numpy as np
import json
from google.protobuf import json_format


class TestPrepack(object):
Expand Down
23 changes: 12 additions & 11 deletions testing/scripts/test_rolling_updates.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
import time
import logging
import pytest
import time
from subprocess import run

import pytest

from seldon_e2e_utils import (
wait_for_status,
wait_for_rollout,
rest_request_ambassador,
initial_rest_request,
assert_model,
assert_model_during_op,
retry_run,
API_AMBASSADOR,
API_ISTIO_GATEWAY,
assert_model,
assert_model_during_op,
get_pod_name_for_sdep,
wait_for_pod_shutdown,
initial_rest_request,
rest_request_ambassador,
retry_run,
to_resources_path,
wait_for_pod_shutdown,
wait_for_rollout,
wait_for_status,
)


with_api_gateways = pytest.mark.parametrize(
"api_gateway", [API_AMBASSADOR, API_ISTIO_GATEWAY], ids=["ambas", "istio"]
)
Expand Down
6 changes: 3 additions & 3 deletions testing/scripts/test_s2i_java.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import os
import time
import pytest

from subprocess import run

from seldon_e2e_utils import initial_rest_request, wait_for_status, wait_for_rollout
import pytest

from e2e_utils.common import SC_ROOT_PATH
from e2e_utils.models import deploy_model
from seldon_e2e_utils import initial_rest_request, wait_for_rollout, wait_for_status

JAVA_S2I_FOLDER = os.path.join(SC_ROOT_PATH, "testing", "s2i", "java")

Expand Down
14 changes: 8 additions & 6 deletions testing/scripts/test_s2i_python.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import pytest
import logging
import time
from subprocess import run

import numpy as np
import pytest

from seldon_e2e_utils import (
wait_for_status,
wait_for_rollout,
rest_request_ambassador,
API_AMBASSADOR,
initial_rest_request,
rest_request_ambassador,
retry_run,
API_AMBASSADOR,
wait_for_rollout,
wait_for_status,
)
import logging

S2I_CREATE = "cd ../s2i/python/#TYPE# && s2i build -E environment#SUFFIX# . seldonio/seldon-core-s2i-python3:#VERSION# seldonio/test#TYPE##SUFFIX#:0.1"
IMAGE_NAME = "seldonio/test#TYPE##SUFFIX#:0.1"
Expand Down
6 changes: 3 additions & 3 deletions testing/scripts/test_security.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from seldon_e2e_utils import (
wait_for_status,
wait_for_rollout,
initial_rest_request,
retry_run,
to_resources_path,
initial_rest_request,
wait_for_rollout,
wait_for_status,
)


Expand Down
21 changes: 10 additions & 11 deletions testing/scripts/test_seldon_metadata.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
import pytest
import time
from google.protobuf import json_format
import json
import logging
import time
from subprocess import run

import numpy as np
import pytest
from google.protobuf import json_format

from seldon_core.proto import prediction_pb2

from seldon_e2e_utils import (
wait_for_status,
wait_for_rollout,
rest_request_ambassador,
initial_rest_request,
API_AMBASSADOR,
grpc_request_ambassador,
grpc_request_ambassador_metadata,
initial_grpc_request,
initial_rest_request,
rest_request_ambassador,
retry_run,
API_AMBASSADOR,
wait_for_rollout,
wait_for_status,
)
import logging


S2I_CREATE = """cd ../s2i/python-features/metadata && \
s2i build -E environment_{model}_{api_type} . \
Expand Down
Loading

0 comments on commit 45f730d

Please sign in to comment.