MCPcopy Create free account
hub / github.com/Kaggle/docker-python / GetGcsPathHandler

Class GetGcsPathHandler

tests/test_datasets.py:47–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45 _request = {}
46
47 class GetGcsPathHandler(GcsDatasetsHTTPHandler):
48
49 def set_request(self):
50 _request['path'] = self.path
51 content_len = int(self.headers.get('Content-Length'))
52 _request['body'] = json.loads(self.rfile.read(content_len))
53 _request['headers'] = self.headers
54
55 def get_response(self):
56 if success:
57 gcs_path = _TPU_GCS_BUCKET if is_tpu else _AUTOML_GCS_BUCKET
58 return {'result': {
59 'destinationBucket': gcs_path,
60 'destinationPath': None}, 'wasSuccessful': "true"}
61 else:
62 return {'wasSuccessful': "false"}
63
64 env = EnvironmentVarGuard()
65 env.set(_KAGGLE_USER_SECRETS_TOKEN_ENV_VAR_NAME, _TEST_JWT)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected