Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Commit

Permalink
Upgrade everything to python 3.9 dependencies. (#2041)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Crosby <[email protected]>
  • Loading branch information
scrosby and Scott Crosby authored Feb 7, 2022
1 parent 4c6b043 commit 6db4d93
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
5 changes: 4 additions & 1 deletion cli/cook/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ def __delete(url, params=None):

def __make_url(cluster, endpoint):
"""Given a cluster and an endpoint, returns the corresponding full URL"""
return urljoin(cluster['url'], endpoint)
url = cluster['url']
if not url.startswith("http"):
url = "http://" + url
return urljoin(url, endpoint)


def post(cluster, endpoint, json_body):
Expand Down
2 changes: 1 addition & 1 deletion integration/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.6
FROM python:3.9

WORKDIR /opt/cook/integration
COPY requirements.txt /opt/cook/integration
Expand Down
14 changes: 7 additions & 7 deletions integration/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
beakerx==0.16.1
tornado==5.1.1
jupyter_client==5.2.3
nbconvert==5.6.0
nbformat==4.4.0
numpy==1.15.3
beakerx==1.3.0
tornado==6.1.0
jupyter_client==7.1.0
nbconvert==6.3.0
nbformat==5.1.3
numpy==1.21.0
pip==9.0.1; python_version >= '3.6'
pytest==5.2.0
pytest-timeout==1.3.3
Expand All @@ -12,4 +12,4 @@ python-dateutil==2.8.1
requests==2.20.0
retrying==1.3.3
file:../cli#egg=cook_client
pygit2==0.28.2
pygit2==1.7.2
2 changes: 1 addition & 1 deletion integration/tests/cook/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2081,7 +2081,7 @@ def test_docker_port_mapping(self):
command='python -m http.server 8080',
ports=2,
container={'type': 'DOCKER',
'docker': {'image': 'python:3.6',
'docker': {'image': 'python:3.9',
'network': 'BRIDGE',
'port-mapping': [{'host-port': 0, # first assigned port
'container-port': 8080},
Expand Down
5 changes: 3 additions & 2 deletions integration/tests/cook/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2346,10 +2346,11 @@ def preprocess_notebook():
self.assertEqual(1, len(notebook['cells']))
self.assertEqual('code', cell['cell_type'])
self.assertEqual(1, cell['execution_count'])
self.assertLessEqual(1, len(cell['outputs']))
self.assertLessEqual(2, len(cell['outputs']))
self.assertEqual('stdout', output['name'], ''.join(output['text']))
self.assertEqual('\n', output['text'][0])
self.assertIn('=== Job: ', output['text'][1])
self.logger.info("Log output: "+repr(notebook))
self.assertIn('=== Job: ', cell['outputs'][1]['text'][0])
finally:
os.remove(executed_notebook_filename)
finally:
Expand Down
2 changes: 1 addition & 1 deletion scheduler/config-k8s.edn
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
:pool-regex "^k8s-.+"}
:default-containers
[{:pool-regex "k8s-.*" :container {:type "docker"
:docker {:image "python:3.6",
:docker {:image "python:3.9",
:network "HOST"
:force-pull-image false
:parameters []}}}]
Expand Down

0 comments on commit 6db4d93

Please sign in to comment.