ELVIS-Project / vis-framework

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

cadence indexer Documentation #430

Closed musicus closed 7 years ago

musicus commented 8 years ago

This object is not being properly picked up by sphinx, nor is its documentation in the docstring.

The code example that is part of the docstring needs to look the following way in the run() method:

***Examples***

>>> import music21
>>> import pandas
>>> import vis.analyzers.indexers import noterest, interval, over_bass, fermata, cadence

>>> score = music21.converter.parse('example.xml')
>>> notes = noterest.NoteRestIndexer(score).run()
>>> intervals = interval.IntervalIndexer(notes).run()

>>> fermatas = fermata.FermataIndexer(score).run()

>>> df = pandas.concat([notes, intervals])
>>> overbass = over_bass.OverBassIndexer(df).run()

>>> settings = {'length': 3}
>>> df = pandas.concat([overbass, fermatas])

>>> cadences = cadence.CadenceIndexer(df, settings).run()
>>> print(cadences)

The docstring should also feature some prose describing what is being done, and why it is important. There also needs to be an example of the desired outcome of when the exact code is being run, with an example.xml form the vis/tests/corpus/ directory.

musicus commented 7 years ago

Docstrings aligned with Sphinx, and code brought into pep8 compliance (mostly).