ELVIS-Project / vis-framework

Thoroughly modern symbolic musical data analysis suite.
http://elvisproject.ca/
31 stars 6 forks source link

Tutorial example in section "Make a new workflow" fails with current master #343

Closed maxalbert closed 8 years ago

maxalbert commented 9 years ago

The first code example (in subsection "What Does the NGramIndexer Require?") is missing a closing parenthesis in the last line. Also, it fails with the following error.

Traceback (most recent call last):
  File "vis_example.py", line 15, in <module>
    ngram_results.append(piece.get_data([ngram.NGramIndexer], ngram_settings, [part]))
  File "/home/albert/miniconda3/envs/try-vis-framework/lib/python2.7/site-packages/vis/models/indexed_piece.py", line 422, in get_data
    return analyzer_cls[0](data, settings).run()
  File "/home/albert/miniconda3/envs/try-vis-framework/lib/python2.7/site-packages/vis/analyzers/indexers/ngram.py", line 292, in run
    for i, name in enumerate(self._settings['vertical']):
TypeError: 'int' object is not iterable
crantila commented 9 years ago

As I mentioned on the music21 mailing list, the solution is probably to replace ngram_settings = {'vertical': 0, 'n': 3} with ngram_settings = {'vertical': '0', 'n': 3}

Either way, it's in the domain of things I should be updating in devel_docs, so I'll assign it to myself.

Thanks for your detailed issue reports!

alexandermorgan commented 9 years ago

As much as I use VIS I still don't know exactly how to analyze more than one piece at a time and how to control whether the results of a group of pieces will be combined or whether they will all be kept separate in as many dataframes as there are pieces. Could this information please be included when the documentation is updated? Also note that this is basically the same issue as #319 .

alexandermorgan commented 8 years ago

Note that the new_ngram indexer does not need the workflow manager and handles its 'vertical' and 'horizontal' settings slightly differently.

alexandermorgan commented 8 years ago

The workflow manager has been deprecated and the examples in the documentation have been thoroughly revised and updated (with the exception of deprecated code like that of the workflow manager).