Skip to content

Commit 1497738

Browse files
committed
chip: simplify the CLI call to import_chip
1 parent 1d84e92 commit 1497738

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

chip.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,12 @@ def _report_duplicates(data, index, log):
178178
.dropna(how='all')), '\t'))
179179

180180

181-
def import_chip(year, input_dir='.', output_dir=None, only=None, debug=False):
181+
def import_chip(year, input_dir=RAW, output_dir=CACHE, only=None, debug=False):
182182
"""Import the CHIP data set for *year* to files *output_dir*/*year*….pkl.
183183
184+
On the command line, YEARS can be a space-separated list of years, or the
185+
string 'all'.
186+
184187
In addition to writing a .pkl file for every (unit, sample) combination in
185188
the data set, returns a tuple containing:
186189
@@ -528,7 +531,8 @@ def _import(years):
528531
years = list(map(int, years))
529532

530533
log.info('Importing %s', years)
534+
531535
for year in years:
532-
import_chip(year, input_dir=RAW, output_dir=CACHE, debug=True)
536+
import_chip(year, debug=True)
533537

534538
cli()

0 commit comments

Comments
 (0)