Skip to content

Commit

Permalink
Reorganizes API reference
Browse files Browse the repository at this point in the history
Adds class diagram
Adds sequence diagram for Bpod.start
  • Loading branch information
cajomferro committed Jan 20, 2017
1 parent a494147 commit 0ddcd1e
Show file tree
Hide file tree
Showing 24 changed files with 149 additions and 108 deletions.
Binary file added docs/source/_images/main_classes.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_images/sd_bpod_start.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 0 additions & 14 deletions docs/source/api_reference/com/index.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs/source/api_reference/hardware/index.rst

This file was deleted.

19 changes: 12 additions & 7 deletions docs/source/api_reference/index.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
###############
Model Reference
###############
#############
API Reference
#############

Contents:
**Modules Hierarchy**

.. toctree::
:maxdepth: 2
:titlesonly:

pybpodapi/index

**Principal Classes (and modules)**

.. image:: /_images/main_classes.png
:scale: 100 %

model/index
hardware/index
com/index
13 changes: 0 additions & 13 deletions docs/source/api_reference/model/index.rst

This file was deleted.

18 changes: 0 additions & 18 deletions docs/source/api_reference/model/session.rst

This file was deleted.

19 changes: 0 additions & 19 deletions docs/source/api_reference/model/trial.rst

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.. _bpod-class-label:

====
Bpod
====
*******************
:mod:`bpod`--- Bpod
*******************

.. contents:: Contents
:local:
.. module:: bpod
:synopsis: Bpod main module

Overview
--------
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
=======================
Hardware Info Container
=======================

.. contents:: Contents
:local:
==========================================================
:mod:`hardware_info_container` --- Hardware Info Container
==========================================================

--------
Overview
Expand Down
15 changes: 15 additions & 0 deletions docs/source/api_reference/pybpodapi/com/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
***************************
:mod:`com`--- Communication
***************************

.. module:: pybpodapi.com
:synopsis: communication with Bpod device

.. toctree::
:titlesonly:

protocol
message_headers
arcom
hw_info_container
serial_message_container
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
========================
Protocol Message Headers
========================

.. contents:: Contents
:local:
===================================================
:mod:`message_headers` --- Protocol Message Headers
===================================================

--------
Overview
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
===========================
Requesting Commands to Bpod
===========================
===============================================
:mod:`protocol` --- Requesting Commands to Bpod
===============================================

.. module:: com.protocol
:synopsis: communication with Bpod device

.. contents:: Contents
:local:
Expand Down
20 changes: 20 additions & 0 deletions docs/source/api_reference/pybpodapi/hardware/hardware.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
========================================================
:mod:`hardware` --- Hardware Description For Bpod Device
========================================================

.. module:: pybpodapi.hardware.hardware
:synopsis: bpod device hardware description

--------
Overview
--------

Hardware description ...

--------------
Implementation
--------------

.. autoclass:: pybpodapi.hardware.hardware.Hardware
:members:
:private-members:
11 changes: 11 additions & 0 deletions docs/source/api_reference/pybpodapi/hardware/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
***************************
:mod:`hardware`--- Hardware
***************************

.. module:: pybpodapi.hardware
:synopsis: communication with Bpod device

.. toctree::
:titlesonly:

hardware
20 changes: 20 additions & 0 deletions docs/source/api_reference/pybpodapi/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
*************************************
:mod:`pybpodapi`--- pybpod-api module
*************************************

.. module:: pybpodapi
:synopsis: top-level module

.. toctree::
:titlesonly:

bpod
state_machine
session
trial
hardware/index
com/index

**Start Bpod Sequence Diagram**

.. image:: /_images/sd_bpod_start.png
18 changes: 18 additions & 0 deletions docs/source/api_reference/pybpodapi/session.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
*************************
:mod:`session`--- Session
*************************

.. module:: session
:synopsis: session to run on bpod

Overview
--------

TODO

Implementation
--------------

.. autoclass:: pybpodapi.model.session.Session
:members:
:private-members:
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
*************
State Machine
*************
*************************************
:mod:`state_machine`--- State Machine
*************************************

.. contents:: Contents
:local:
.. module:: state_machine
:synopsis: modules related to state machine

Overview
========
Expand Down
19 changes: 19 additions & 0 deletions docs/source/api_reference/pybpodapi/trial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
*********************
:mod:`trial`--- Trial
*********************

.. module:: trial
:synopsis: A session trial

Overview
========

TODO

Implementation
==============


.. automodule:: pybpodapi.model.trial
:members:
:private-members:
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@
# built documents.
#
# The short X.Y version.
version = '0.1'
version = '0.2'
# The full version, including alpha/beta/rc tags.
release = '0.1'
release = 'v0.2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Welcome to pybpod-api's documentation!

.. toctree::
:maxdepth: 4
:includehidden:

getting_started
writing_protocols
Expand Down
10 changes: 9 additions & 1 deletion pybpodapi/model/bpod.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

class Bpod(object):
"""
Bpod main class
Bpod is the main entity.
"""

#########################################
Expand All @@ -43,6 +43,14 @@ def hardware(self):
def hardware(self, value):
self._hardware = value # type: Hardware

@property
def bpod_protocol(self):
return self._bpod_protocol # type: Protocol

@bpod_protocol.setter
def bpod_protocol(self, value):
self._bpod_protocol = value # type: Protocol

#########################################
############ PUBLIC METHODS #############
#########################################
Expand Down

0 comments on commit 0ddcd1e

Please sign in to comment.