Closed ashleyrback closed 9 years ago
@arushanova there are details on the wiki explaining how to run the tutorial with ipython notebook.
Thank you Ashley, this is a very nice tutorial. I just have a couple of comments for getting_started.ipynb. 1) The plots are not shown in ipython. Please see the detailed comments bellow the lines. 2) I think it will be more consistent to say either "we, our" or "you" throughout the tutorial.
Could you please add init to the getting_started.py, the documentation doesn't appear online
@arushanova changes pushed but still need to solve segmentation violation problem. See comment inline.
@arushanova the segmentation violation problem has now been fixed, so all should be in place for you to give it a final check-over, please.
I've tried to build the document and could see the documentation online. These are the warnings I get when make the doc:
sphinx-build -b html -d _build/doctrees . html/docs
Running Sphinx v1.3b2
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 10 source files that are out of date
updating environment: 1 added, 10 changed, 0 removed
RAT: Libraries loaded.7%] echidna.core
reading sources... [100%] modules
/.data/snoplus/evelina/virtual_echidna/echidna/docs/echidna.scripts.tutorials.rst:10: WARNING: autodoc: failed to import module u'echidna.scripts.tutorials.getting_started'; the following exception was raised:
Traceback (most recent call last):
File "/.data/snoplus/evelina/virtual_echidna/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 378, in import_object
__import__(self.modname)
File "/data/snoplus/softwareSL6/root-5.34.30/lib/ROOT.py", line 352, in _importhook
return _orig_ihook( name, *args, **kwds )
File "/.data/snoplus/evelina/virtual_echidna/echidna/echidna/scripts/tutorials/getting_started.py", line 55, in <module>
config = spectra.SpectraConfig.load_from_file("echidna/config/example.yml")
File "/.data/snoplus/evelina/virtual_echidna/echidna/echidna/core/spectra.py", line 129, in load_from_file
config = yaml.load(open(filename, 'r'))
IOError: [Errno 2] No such file or directory: 'echidna/config/example.yml'
looking for now-outdated files... none found
pickling environment... done
checking consistency... /.data/snoplus/evelina/virtual_echidna/echidna/docs/modules.rst:: WARNING: document isn't included in any toctree
done
preparing documents... done
writing output... [100%] modules
generating indices... genindex py-modindex
highlighting module code... [100%] echidna.scripts.multi_ntuple_spectrum
writing additional pages... search
copying static files... WARNING: html_static_path entry u'/.data/snoplus/evelina/virtual_echidna/echidna/docs/_static' does not exist
done
copying extra files... done
dumping search index in English (code: en) ... done
dumping object inventory... done
build succeeded, 3 warnings.
Build finished. The HTML pages are in html/docs.
Here's pep8 output:
getting_started.py:87:1: E402 module level import not at top of file
getting_started.py:149:1: E402 module level import not at top of file
getting_started.py:150:1: E402 module level import not at top of file
getting_started.py:230:1: E402 module level import not at top of file
getting_started.py:265:1: E402 module level import not at top of file
getting_started.py:266:1: E402 module level import not at top of file
But I guess this is not a problem in this case?
@arushanova, correct. In this case the module imports are part of the tutorial, so they are not all grouped at the top of the file. Well spotted though :+1:
@ashleyrback The plots are nicely shown in ipython now.
@arushanova, that should fix the docs.
@arushanova, fixes plots displayed whilst building docs issue.
merging!
Partially fulfills #78.
Tutorial covers:
Spectra
creationshrink_to_roi
,rebin
andscale
The tutorial is created in an ipython notebook, and also as a separate script in the
scripts
directory and on the wiki.