Skip to content

Commit

Permalink
delint
Browse files Browse the repository at this point in the history
  • Loading branch information
jigold committed Jan 8, 2024
1 parent 8bc5d1c commit 467df51
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
11 changes: 7 additions & 4 deletions hail/python/hailtop/hailctl/batch/submit.py
Expand Up @@ -75,10 +75,13 @@ def file_input_to_src_dest(file: str) -> Tuple[str, str, str]:

assert False, str(local_files_to_cloud_files)

await copy_from_dict(files=[
{'from': script_src, 'to': script_cloud_file},
{'from': user_config_src, 'to': user_config_cloud_file},
*local_files_to_cloud_files])
await copy_from_dict(
files=[
{'from': script_src, 'to': script_cloud_file},
{'from': user_config_src, 'to': user_config_cloud_file},
*local_files_to_cloud_files,
]
)

script_file = b.read_input(script_cloud_file)
config_file = b.read_input(user_config_cloud_file)
Expand Down
10 changes: 7 additions & 3 deletions hail/python/test/hailtop/hailctl/batch/test_submit.py
Expand Up @@ -14,14 +14,16 @@ def runner():

def write_script(dir: str, filename: str):
with open(f'{dir}/test_job.py', 'w') as f:
f.write(f'''
f.write(
f'''
import hailtop.batch as hb
b = hb.Batch()
j = b.new_job()
j.command('cat {filename}')
b.run(wait=False)
backend.close()
''')
'''
)


def write_hello(filename: str):
Expand Down Expand Up @@ -72,7 +74,9 @@ def test_mount_multiple_files(runner: CliRunner):
write_hello(f'{dir}/child/hello1.txt')
write_hello(f'{dir}/child/hello2.txt')
write_script(dir, '/hello1.txt')
res = runner.invoke(cli.app, ['submit', '--files', 'child/hello1.txt:/', '--files', 'child/hello2.txt:/', 'test_job.py'])
res = runner.invoke(
cli.app, ['submit', '--files', 'child/hello1.txt:/', '--files', 'child/hello2.txt:/', 'test_job.py']
)
assert res.exit_code == 0


Expand Down

0 comments on commit 467df51

Please sign in to comment.