prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  allow output artifact store configuration (vs hard coded)
  it seems like the output artifacts are always stored in a specific minio service, port, namespace, bucket, secrets, etc (`minio-service.kubeflow:9000`). 
  
  see: https://github.com/kubeflow/pipelines/blob/f40a22a3f4a8e06d20cf3e3f425b5058d5c87e0b/sdk/python/kfp/compiler/_op_to_template.py#L148
  
  it would be great to make it flexible, e.g. allow using S3, or change namespace or bucket names.
  i suggest making it configurable, i can do such PR if we agree its needed. 
  flexible pipeline service (host) path in client SDK 
  when creating an SDK `Client()` the path to `ml-pipeline` API service is loaded from a hard coded value (`ml-pipeline.kubeflow.svc.cluster.local:8888`) which indicate a specific k8s namespace. it can be valuable to load that default value from an env variable, i.e. changing the line in `_client.py` from:
  
  `config.host = host if host else Client.IN_CLUSTER_DNS_NAME`
  
  to:
  
  `config.host = host or os.environ.get('ML_PIPELINE_DNS_NAME',Client.IN_CLUSTER_DNS_NAME)`
  
  also note that when a user provide the `host` parameter, the ipython output points to the API server and not to the UI service (see the logic in `_get_url_prefix()`), it seems like a potential bug
  
  if its acceptable i can submit a PR for the line change above
   
  
  </issue>
  <code>
  [start of sdk/python/setup.py]
  1 # Copyright 2018 Google LLC
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #      http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 
  15 import os
  16 import re
  17 from setuptools import setup
  18 
  19 NAME = 'kfp'
  20 #VERSION = .... Change the version in kfp/__init__.py
  21 
  22 REQUIRES = [
  23     'PyYAML',
  24     'google-cloud-storage>=1.13.0',
  25     'kubernetes>=8.0.0, <12.0.0',
  26     'google-auth>=1.6.1',
  27     'requests_toolbelt>=0.8.0',
  28     'cloudpickle',
  29     # Update the upper version whenever a new major version of the
  30     # kfp-server-api package is released.
  31     # Update the lower version when kfp sdk depends on new apis/fields in
  32     # kfp-server-api.
  33     # Note, please also update ./requirements.in
  34     'kfp-server-api>=0.2.5, <2.0.0',
  35     'jsonschema >= 3.0.1',
  36     'tabulate',
  37     'click',
  38     'Deprecated',
  39     'strip-hints',
  40 ]
  41 
  42 
  43 def find_version(*file_path_parts):
  44   here = os.path.abspath(os.path.dirname(__file__))
  45   with open(os.path.join(here, *file_path_parts), 'r') as fp:
  46     version_file_text = fp.read()
  47 
  48   version_match = re.search(
  49       r"^__version__ = ['\"]([^'\"]*)['\"]",
  50       version_file_text,
  51       re.M,
  52   )
  53   if version_match:
  54     return version_match.group(1)
  55 
  56   raise RuntimeError('Unable to find version string.')
  57 
  58 
  59 setup(
  60     name=NAME,
  61     version=find_version('kfp', '__init__.py'),
  62     description='KubeFlow Pipelines SDK',
  63     author='google',
  64     install_requires=REQUIRES,
  65     packages=[
  66         'kfp',
  67         'kfp.cli',
  68         'kfp.cli.diagnose_me',
  69         'kfp.compiler',
  70         'kfp.components',
  71         'kfp.components.structures',
  72         'kfp.components.structures.kubernetes',
  73         'kfp.containers',
  74         'kfp.dsl',
  75         'kfp.dsl.extensions',
  76         'kfp.notebook',
  77     ],
  78     classifiers=[
  79         'Intended Audience :: Developers',
  80         'Intended Audience :: Education',
  81         'Intended Audience :: Science/Research',
  82         'License :: OSI Approved :: Apache Software License',
  83         'Programming Language :: Python :: 3',
  84         'Programming Language :: Python :: 3.5',
  85         'Programming Language :: Python :: 3.6',
  86         'Programming Language :: Python :: 3.7',
  87         'Topic :: Scientific/Engineering',
  88         'Topic :: Scientific/Engineering :: Artificial Intelligence',
  89         'Topic :: Software Development',
  90         'Topic :: Software Development :: Libraries',
  91         'Topic :: Software Development :: Libraries :: Python Modules',
  92     ],
  93     python_requires='>=3.5.3',
  94     include_package_data=True,
  95     entry_points={
  96         'console_scripts': [
  97             'dsl-compile = kfp.compiler.main:main', 'kfp=kfp.__main__:main'
  98         ]
  99     })
  100
  [end of sdk/python/setup.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/sdk/python/setup.py b/sdk/python/setup.py
  --- a/sdk/python/setup.py
  +++ b/sdk/python/setup.py
  @@ -39,6 +39,10 @@
       'strip-hints',
   ]
   
  +TESTS_REQUIRE = [
  +    'mock',
  +]
  +
   
   def find_version(*file_path_parts):
     here = os.path.abspath(os.path.dirname(__file__))
  @@ -62,6 +66,7 @@
       description='KubeFlow Pipelines SDK',
       author='google',
       install_requires=REQUIRES,
  +    tests_require=TESTS_REQUIRE,
       packages=[
           'kfp',
           'kfp.cli',
  
verification_info: {"golden_diff": "diff --git a/sdk/python/setup.py b/sdk/python/setup.py\n--- a/sdk/python/setup.py\n+++ b/sdk/python/setup.py\n@@ -39,6 +39,10 @@\n     'strip-hints',\n ]\n \n+TESTS_REQUIRE = [\n+    'mock',\n+]\n+\n \n def find_version(*file_path_parts):\n   here = os.path.abspath(os.path.dirname(__file__))\n@@ -62,6 +66,7 @@\n     description='KubeFlow Pipelines SDK',\n     author='google',\n     install_requires=REQUIRES,\n+    tests_require=TESTS_REQUIRE,\n     packages=[\n         'kfp',\n         'kfp.cli',\n", "issue": "allow output artifact store configuration (vs hard coded)\nit seems like the output artifacts are always stored in a specific minio service, port, namespace, bucket, secrets, etc (`minio-service.kubeflow:9000`). \r\n\r\nsee: https://github.com/kubeflow/pipelines/blob/f40a22a3f4a8e06d20cf3e3f425b5058d5c87e0b/sdk/python/kfp/compiler/_op_to_template.py#L148\r\n\r\nit would be great to make it flexible, e.g. allow using S3, or change namespace or bucket names.\r\ni suggest making it configurable, i can do such PR if we agree its needed. \nflexible pipeline service (host) path in client SDK \nwhen creating an SDK `Client()` the path to `ml-pipeline` API service is loaded from a hard coded value (`ml-pipeline.kubeflow.svc.cluster.local:8888`) which indicate a specific k8s namespace. it can be valuable to load that default value from an env variable, i.e. changing the line in `_client.py` from:\r\n\r\n`config.host = host if host else Client.IN_CLUSTER_DNS_NAME`\r\n\r\nto:\r\n\r\n`config.host = host or os.environ.get('ML_PIPELINE_DNS_NAME',Client.IN_CLUSTER_DNS_NAME)`\r\n\r\nalso note that when a user provide the `host` parameter, the ipython output points to the API server and not to the UI service (see the logic in `_get_url_prefix()`), it seems like a potential bug\r\n\r\nif its acceptable i can submit a PR for the line change above\r\n \n", "before_files": [{"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport os\nimport re\nfrom setuptools import setup\n\nNAME = 'kfp'\n#VERSION = .... Change the version in kfp/__init__.py\n\nREQUIRES = [\n    'PyYAML',\n    'google-cloud-storage>=1.13.0',\n    'kubernetes>=8.0.0, <12.0.0',\n    'google-auth>=1.6.1',\n    'requests_toolbelt>=0.8.0',\n    'cloudpickle',\n    # Update the upper version whenever a new major version of the\n    # kfp-server-api package is released.\n    # Update the lower version when kfp sdk depends on new apis/fields in\n    # kfp-server-api.\n    # Note, please also update ./requirements.in\n    'kfp-server-api>=0.2.5, <2.0.0',\n    'jsonschema >= 3.0.1',\n    'tabulate',\n    'click',\n    'Deprecated',\n    'strip-hints',\n]\n\n\ndef find_version(*file_path_parts):\n  here = os.path.abspath(os.path.dirname(__file__))\n  with open(os.path.join(here, *file_path_parts), 'r') as fp:\n    version_file_text = fp.read()\n\n  version_match = re.search(\n      r\"^__version__ = ['\\\"]([^'\\\"]*)['\\\"]\",\n      version_file_text,\n      re.M,\n  )\n  if version_match:\n    return version_match.group(1)\n\n  raise RuntimeError('Unable to find version string.')\n\n\nsetup(\n    name=NAME,\n    version=find_version('kfp', '__init__.py'),\n    description='KubeFlow Pipelines SDK',\n    author='google',\n    install_requires=REQUIRES,\n    packages=[\n        'kfp',\n        'kfp.cli',\n        'kfp.cli.diagnose_me',\n        'kfp.compiler',\n        'kfp.components',\n        'kfp.components.structures',\n        'kfp.components.structures.kubernetes',\n        'kfp.containers',\n        'kfp.dsl',\n        'kfp.dsl.extensions',\n        'kfp.notebook',\n    ],\n    classifiers=[\n        'Intended Audience :: Developers',\n        'Intended Audience :: Education',\n        'Intended Audience :: Science/Research',\n        'License :: OSI Approved :: Apache Software License',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: 3.7',\n        'Topic :: Scientific/Engineering',\n        'Topic :: Scientific/Engineering :: Artificial Intelligence',\n        'Topic :: Software Development',\n        'Topic :: Software Development :: Libraries',\n        'Topic :: Software Development :: Libraries :: Python Modules',\n    ],\n    python_requires='>=3.5.3',\n    include_package_data=True,\n    entry_points={\n        'console_scripts': [\n            'dsl-compile = kfp.compiler.main:main', 'kfp=kfp.__main__:main'\n        ]\n    })\n", "path": "sdk/python/setup.py"}]}