Skip to content
Permalink
Browse files

updating for refactoring of wc_lang.io

  • Loading branch information
jonrkarr committed Jan 7, 2019
1 parent 07b4205 commit ea6af5ffbf9af578810590e1f9629c2ddec72b32
Showing with 3 additions and 3 deletions.
  1. +3 −3 intro_to_wc_modeling/wc_modeling/wc_lang_tutorial/core.py
@@ -36,7 +36,7 @@ def main(examples_dir=os.path.join(os.path.dirname(__file__), 'examples')):
# Don't change the next comment - it's used by a literalinclude
# This example illustrates how to read a model from an Excel file
# 'model_filename' is the name of an Excel file storing a model
model = wc_lang.io.Reader().run(model_filename)
model = wc_lang.io.Reader().run(model_filename)[wc_lang.Model][0]

results.append("read model: '{}'".format(model.name))

@@ -46,13 +46,13 @@ def main(examples_dir=os.path.join(os.path.dirname(__file__), 'examples')):
# This example illustrates how to write a model to a set of .tsv files
# 'examples_dir' is a directory
model_filename_pattern = os.path.join(examples_dir, 'example_model-*.tsv')
wc_lang.io.Writer().run(model, model_filename_pattern, set_repo_metadata_from_path=False)
wc_lang.io.Writer().run(model_filename_pattern, model, set_repo_metadata_from_path=False)

results.append("write a model to a set of .tsv files: '{}'".format(model_filename_pattern))

# Don't change the next comment - it's used by a literalinclude
# This example illustrates how to read a model from a set of .tsv files
model_from_tsv = wc_lang.io.Reader().run(model_filename_pattern)
model_from_tsv = wc_lang.io.Reader().run(model_filename_pattern)[wc_lang.Model][0]

results.append("read a model from a set of .tsv files: '{}'".format(model_from_tsv.name))

0 comments on commit ea6af5f

Please sign in to comment.
You can’t perform that action at this time.