nengo / nengo-extras

Extra utilities and add-ons for Nengo
https://www.nengo.ai/nengo-extras
Other
5 stars 8 forks source link

Infrastructure #68

Closed tbekolay closed 6 years ago

tbekolay commented 6 years ago

Since there's interest in having this on PyPI (#63) this PR adds the infrastructure that other released Nengo projects have. I started from #47, organized the history a bit, then did a few more things.

This is WIP because I still want to add some rudimentary documentation before doing the release. I'll do that tomorrow; pushing this today so that the TravisCI tests can run, at least.

tbekolay commented 6 years ago

Docs have been added, and can be generated with the usual

sphinx-build -W docs docs/_build

The API docs are essentially complete, though I may have added some things that users don't need to know about, and many things don't have docstrings. I don't plan to add those in this PR. But I do plan to add the examples to the docs, which I still have to do, after which I think this PR will be good to go.

Seanny123 commented 6 years ago

When I try to build the docs, I get the following:

Warning, treated as error:
/home/saubin/git/nengo_extras/nengo_extras/keras.py:docstring of nengo_extras.keras.SoftLIF.call:5:Inline strong start-string without end-string.

Any idea what this means?

tbekolay commented 6 years ago

Hm... nope! That's very strange because SoftLIF.call has no docstring, so I don't see how it could be having a problem parsing it...

tbekolay commented 6 years ago

OK, this PR is now essentially complete; the docs include all of the examples and generate with TravisCI when a tag is pushed.

Unfortunately, there are a few issues with testing:

  1. I enabled testing that notebooks will run without errors; this works locally, but causes TravisCI to kill the job prematurely; see py27 and py36 builds. I'm not sure if this can be remedied with some kind of configuration to increase resource limits, but it doesn't seem that critical right now, so I've temporarily removed testing that no error are raised in notebooks. We can revisit this later.

  2. Having added theano and keras to the TravisCI conda deps, we now get a failure in test_neuronlayer_softlif_theano and a failure in test_softlif_layer. These don't seem like super easy tests to debug, so unless someone can determine why these might be failing (@hunse is on vacation), I'm going to xfail these tomorrow morning so we can move forward.

tbekolay commented 6 years ago

@Seanny123 can you give this another look over? I'll merge on your OK

Seanny123 commented 6 years ago

After installing the proper version of sphinx, I'm still getting the error:

Warning, treated as error:
/home/saubin/git/nengo_extras/docs/visualization.rst:77:failed to import nengo_extras.deepview.ImageSelector
Seanny123 commented 6 years ago

Figured it out. It's because PIL.ImageTk doesn't exist in Python 3.

tbekolay commented 6 years ago

PIL is an external dependency, do pip install pillow (it's in docs/requirements.txt)

Seanny123 commented 6 years ago

In regards to the aforementioned error, if I replace PIL.ImageTK with tk.PhotoImage I can get the docs to compile, but I still can't run the examples due to a wide variety of errors. Consequently, I'm willing to shrug this off and just say to only build the docs with Python2 and revisit stability/compatibility of the rest of the code later.

tbekolay commented 6 years ago

Agreed, there are several robustness issues that we should deal with... later! I'll merge for now and we can deal with these things post-release (or continue to not deal with them :man_shrugging:)

tbekolay commented 6 years ago

Had a few issues with doc building (including the notebook that was taking too long for the regular tests) but those are fixed now; see the built docs. Merging; docs will be rebuilt when I do a release tomorrow.