Skip to content

Commit

Permalink
Add Python 3.7 support (#160)
Browse files Browse the repository at this point in the history
* Change python version dependency to 3.7

* Add checks for null values of env_vars in batch config

Co-authored-by: ewezy <ziyi.ewe@gojek.com>
  • Loading branch information
deadlycoconuts and deadlycoconuts authored Jan 27, 2022
1 parent 4c22d77 commit f1fa940
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sdk/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
extras_require={
'dev': dev_requirements
},
python_requires='>=3.8',
python_requires='>=3.7',
)
7 changes: 6 additions & 1 deletion sdk/turing/batch/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,13 @@ def job_spec(self) -> turing.generated.models.EnsemblingJobSpec:
)

def infra_spec(self) -> turing.generated.models.EnsemblerInfraConfig:
if self.env_vars is None:
env_vars = []
else:
env_vars = [EnvVar(name=name, value=value) for name, value in self.env_vars.items()]\

return turing.generated.models.EnsemblerInfraConfig(
service_account_name=self.service_account,
resources=self.resource_request,
env=[EnvVar(name=name, value=value) for name, value in self.env_vars.items()],
env=env_vars,
)

0 comments on commit f1fa940

Please sign in to comment.