Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation #68

Merged
merged 43 commits into from
Apr 20, 2018
Merged

Documentation #68

merged 43 commits into from
Apr 20, 2018

Conversation

jgosmann
Copy link
Collaborator

@jgosmann jgosmann commented Aug 9, 2017

Motivation and context:
This PR is adding documentation to Nengo SPA and work in progress. Comments, improvements, and help are welcome as I go along.

Interactions with other PRs:

How has this been tested?

How long should this take to review?

  • Quick (less than 40 lines changed or changes are straightforward)
  • Average (neither quick nor lengthy)
  • Lengthy (more than 150 lines changed or changes are complicated)

Where should a reviewer start?

Types of changes:

  • Non-code change (touches things like tests, documentation, build scripts)

Checklist:

  • I have read the CONTRIBUTING.rst document.
  • I have updated the documentation accordingly.
  • I have included a changelog entry.
  • [n/a] I have added tests to cover my changes.
  • All new and existing tests passed.

Still to do:

  • User Guide
  • Examples
  • API documentation
  • proof read, including checking cross references
  • add example of adding custom module

@jgosmann jgosmann self-assigned this Aug 9, 2017
@Seanny123 Seanny123 changed the title Documenation Documentation Sep 29, 2017
@Seanny123 Seanny123 self-assigned this Oct 25, 2017
@Seanny123
Copy link
Collaborator

Seanny123 commented Oct 25, 2017

@jgosmann could you rebase this to master, so I can start updating the documentation? I would do it myself, but I'm afraid I might do it wrong. It needs to be rebased, because otherwise it tries to import memoize which doesn't exist anymore.

@jgosmann
Copy link
Collaborator Author

rebased and force pushed

@Seanny123
Copy link
Collaborator

Seanny123 commented Nov 7, 2017

The Thalamus module has a really weird looking docstring:

    def construct_channel(
            self, target_net, target_input, net, label=None):
        """Construct a channel.

        Channels are an additional neural population in-between a source
        population and a target population. This allows inhibiting the channel
        without affecting the source and thus is useful in routing information.

        Parameters
        ----------
        target_net : :class:`spa.Network`
            The network that the channel will project to.
        target_input : :class:`spa.Vocabulary`
            
        net : :class:`nengo.Network`, optional
            Network to which to add the channel. Defaults to ``self.spa``.
        label : str, optional
            Label for the channel.

        Returns
        -------
        :class:`nengo.networks.EnsembleArray`
            The constructed channel.
        """

What does :class: do and do we want to include it in our docstrings?

On the same topic, do we want to document objects as being from nengo_spa or spa? For example, if one of the parameters of a function is a Vocabulary instance, should this be documented as spa.Vocabulary or nengo_spa.Vocabulary or just Vocabulary?

@Seanny123
Copy link
Collaborator

Note: my latest push is going to break Travis because it depends on the Basal Ganglia accessor PR.

@jgosmann
Copy link
Collaborator Author

jgosmann commented Nov 9, 2017

Shall one of us rebase this branch to master? (Otherwise Travis-CI will spam me with an email for every commit.)

@Seanny123
Copy link
Collaborator

Seanny123 commented Nov 9, 2017 via email

@jgosmann
Copy link
Collaborator Author

jgosmann commented Nov 9, 2017

Do you want me to do it? You should have pushed all your work beforehand because otherwise you might lose it (though it is hard to lose it completely in git) or merging might be very annoying.

@Seanny123
Copy link
Collaborator

Seanny123 commented Nov 9, 2017 via email

@jgosmann
Copy link
Collaborator Author

jgosmann commented Nov 9, 2017

Force pushed the rebased version. No conflicts whatsoever. 😏

@Seanny123
Copy link
Collaborator

Now that the new syntax has been merged, should this be rebased yet again?

@jgosmann
Copy link
Collaborator Author

Yeah

@jgosmann
Copy link
Collaborator Author

jgosmann commented Feb 20, 2018

Has been rebased to master.

@jgosmann
Copy link
Collaborator Author

@bjkomer I updated the introduction coming from legacy SPA to the new syntax in this PR. Might be of interest to you.

@jgosmann
Copy link
Collaborator Author

Actually Nengo does not install the examples.¹ Not sure why zip_safe=False was set, but it can't because of the examples. zip_safe=False has to be used if a Python package contains files that need to be accessible as actual files in the file system. Without, the Python package may be installed as an egg which is basically a zip file with all the contents (thus, the files cannot be directly accessed, but need to be unzipped when read).

¹: This means that you cannot test the examples of in an installed Nengo package. While I think that we want the tests in general to be available in the install for testing backends, the tests are probably not essential (all the functionality should be tested by the other tests; testing the examples is mainly to ensure the examples are up to date and work with the current Nengo version).

For Nengo SPA I'm leaning towards not including any documentation, examples, or tests in the install. Most people will access the documentation and examples online anyways. We can add a download link to the documentation (which will be hosted on Github and Github provides links to download the branch of a repository as zip). This would then include the examples; the Jupyter notebook files can be downloaded from within the documentation. The tests are only required for development and in that case one is working on a git clone anyways.

@Seanny123
Copy link
Collaborator

Seanny123 commented Apr 19, 2018 via email

@jgosmann
Copy link
Collaborator Author

Excluded examples, tests, docs from install. Fixed the tests (I think, we'll see what Travis and AppVeyor think). Should be ready for final review ...

@jgosmann
Copy link
Collaborator Author

Oh, and AppVeyor is working again. It didn't like the rename of the repository from nengo_spa to nengo-spa.

@Seanny123
Copy link
Collaborator

New changes LGTM. Are we going to wait for a review of @tcstewar before merging?

@jgosmann
Copy link
Collaborator Author

Probably not, except @tcstewar is exceptionally fast. (We can always make changes to the documentation later, and it is an improvement on the current state.)

jgosmann and others added 17 commits April 20, 2018 11:15
Still todo:

* nengo_spa.vocab (except for Vocabulary)
* nengo_spa.networks
* nengo_spa.modules
This commit removes the extraction script for the notebooks.

Revert "Add cmd interface to extract examples."
This reverts commit a74b72a.

Decided to not include examples, docs, or tests in the installed
packages. Docs and examples can accessed online and downloaded from
there which is easier to discover than how to extract these things
from an installed package. The tests are only required for development
which will be done on a git clone rather than an installed package.
Tolerance was too low, should be more accurate with dimensions doubled.
@jgosmann
Copy link
Collaborator Author

Added one more commit because a test was failing after squashing the fixup commits. @Seanny123 still looks good to you?

@Seanny123
Copy link
Collaborator

Seanny123 commented Apr 20, 2018 via email

@jgosmann jgosmann merged commit c2bdcd8 into master Apr 20, 2018
@jgosmann jgosmann deleted the docs branch April 20, 2018 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants