You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.
All of the aggregation code's command line API can be called from withing a python script. This can make interfacing with the convert_to_ibcc easier in the long run. The python version of this script would look like:
Where the three empty strings at the top can be read in via the command line (e.g. sys.argv or argparse).
The config_workflow function returns the extractor config as a dict, the reducer configs as a list of dicts (currently there is bug and this is only returning the last reducer config instead of all of them), and the task labels as a dict.
The extract_csv function returns a list of file paths for each extraction file written to disk. The second arg to this function is expecting a filename (or any file like object), so I use StringIO to convert the extractor config from a dict to a string being read in. You could also construct the path to the config file that was written to disk if you wanted.
At the end of this script is where the call to the convert_to_ibcc code should be called. It might be best if convert_to_ibccs argparse bit was converted to a python function that can be imported and called directly.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
All of the aggregation code's command line API can be called from withing a python script. This can make interfacing with the
convert_to_ibcc
easier in the long run. The python version of this script would look like:Where the three empty strings at the top can be read in via the command line (e.g.
sys.argv
orargparse
).The
config_workflow
function returns the extractor config as adict
, the reducer configs as alist
ofdict
s (currently there is bug and this is only returning the last reducer config instead of all of them), and the task labels as adict
.The
extract_csv
function returns a list of file paths for each extraction file written to disk. The second arg to this function is expecting a filename (or any file like object), so I useStringIO
to convert the extractor config from adict
to a string being read in. You could also construct the path to the config file that was written to disk if you wanted.At the end of this script is where the call to the
convert_to_ibcc
code should be called. It might be best ifconvert_to_ibcc
s argparse bit was converted to a python function that can be imported and called directly.The text was updated successfully, but these errors were encountered: