Merge branch '8784-dir-listings'
[arvados.git] / crunch_scripts / pgp-survey-parse
1 #!/usr/bin/env python
2 # Copyright (C) The Arvados Authors. All rights reserved.
3 #
4 # SPDX-License-Identifier: Apache-2.0
5
6 import arvados
7
8 this_job = arvados.current_job()
9 this_task = arvados.current_task()
10 parser_path = arvados.util.git_checkout(
11     url = this_job['script_parameters']['parser_url'],
12     version = this_job['script_parameters']['parser_version'],
13     path = 'parser')
14
15 stdoutdata, stderrdata = arvados.util.run_command(
16     ["python", "demo.py"],
17     cwd=parser_path)
18
19 out = arvados.CollectionWriter()
20 out.write(stdoutdata)
21 out.set_current_file_name('participant_traits.tsv')
22 this_task.set_output(out.finish())