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

Annotypes #226

Merged
merged 84 commits into from Jul 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
ebac9f3
Clean icons
coretl Oct 31, 2017
6f9c677
Changes for web gui
coretl Nov 8, 2017
c69e18b
Changes for initial version of web gui
coretl Jan 2, 2018
f479101
Coverted all Models and some Parts to use annotypes
coretl Jan 9, 2018
65d1d7a
More refactoring
coretl Jan 12, 2018
ba2054b
Converted some mroe builtin modules
coretl Jan 18, 2018
4b8dcde
Refactored more areaDetector drivers
coretl Jan 19, 2018
15c7bb9
Finished conversion of builtin and scanning and made tests pass
coretl Jan 30, 2018
d3950aa
Fixed the rest of the tests
coretl Feb 15, 2018
8caef8e
Bump annotypes requirement
coretl Feb 16, 2018
56d6a91
Fix some errors with the demo
coretl Feb 16, 2018
567031b
Fix another serialization test
coretl Feb 16, 2018
4548149
Fixed timing issues on non-cothread systems
coretl Feb 16, 2018
3a52c7b
Added tests for simultaneousAxesPart
coretl Feb 19, 2018
19cc034
Exclude Python 3.4 on travis as we would need typing module
coretl Feb 19, 2018
d063f0b
Cleanups for panda
coretl Feb 23, 2018
e47567f
Added changes to support new PMAC CS deferred moves
coretl Mar 6, 2018
61129ab
Fix update handling for rawmotorcspart
coretl Mar 7, 2018
fafe7c7
Changed trajectory scanning support to be edge triggered, not level
coretl Mar 14, 2018
da7135d
Added support for MRI.ATTR pvs in pvaservercomms
coretl Mar 14, 2018
8444fdc
Fixed error message sending for pva, and monitor dotted fields
coretl Mar 15, 2018
f552fc3
Fixed pva system test
coretl Mar 15, 2018
56e51c3
Remove unnecessary element from MapMeta
coretl Mar 15, 2018
2f57946
Make Health attribute have default value "OK"
coretl Mar 15, 2018
e548460
Fix proxy controller
coretl Mar 15, 2018
d228ed7
Set error type in pvaclientcomms
coretl Mar 15, 2018
f6384fb
Add logging message for every pva request
coretl Mar 15, 2018
7c2873c
Fix restful server part to work with new changes
coretl Mar 20, 2018
4eba64f
Started fixing up docs
coretl Mar 26, 2018
d17e573
Allow yaml files to have dashes in them
coretl Mar 26, 2018
aabdfed
Remove resolution and offset from pmac trajectory driver for pmac 2-0
coretl Mar 26, 2018
acff071
Fixup Enum and np.bool_ support in pvAccess
coretl Mar 26, 2018
637f004
Fix proxy block to set correct timeStamp if given
coretl Mar 26, 2018
34ccc8c
Merge branch 'master' into annotypes
coretl Mar 29, 2018
baa7e22
Update excalibur support, no tests yet
coretl Mar 29, 2018
4ed241c
Fix docs
coretl Apr 9, 2018
8063003
Separate out Exposure deadtime calculation into a separate Part
coretl Apr 9, 2018
199e2eb
Cut down excalibur VDS and make a start on the tests
coretl Apr 9, 2018
39ac3c2
Fix pvaservercomms to act on serialized RPC result
coretl Apr 9, 2018
9b02458
Fix aravis deadtime to use new part
coretl Apr 10, 2018
30c5855
Added widget descriptions to Docs
Apr 23, 2018
40f94ed
Bump annotypes requirement for docs
coretl Apr 24, 2018
7f4da45
Fix more docs
coretl Apr 25, 2018
3c54dee
Fixed Excalibur VDS wrapper part and added unit test for it (#228)
Apr 30, 2018
79db61c
Improved error handling in Websocket server (#229)
blondejamtart Apr 30, 2018
e71b98f
See if the intermittant errors on travis are due to tornado 5.0
coretl May 3, 2018
de883ce
Fix use_cothread bug and use on_hook to avoid in future
coretl May 16, 2018
5b35d9b
Add timeouts to add_controller so we fail fast
coretl May 16, 2018
c55c215
Publish in one go at the end of process.start
coretl May 16, 2018
9b10d98
Added event_timeout to context
coretl May 16, 2018
424cee3
Add event_timeout to HDF writer to catch if no frames appear in 60s
coretl May 17, 2018
8794f81
Improve context future error messages in Timeout and Abort
coretl May 17, 2018
7bc7fbf
Fix simDetector to work with ExposureDeadtimePart
coretl May 17, 2018
c12ffec
Fix python3 tests
coretl May 17, 2018
83ed432
Feature/subscription handling (#230)
blondejamtart May 17, 2018
75a3e78
Make BlockMeta be writeable by default
coretl May 17, 2018
5de9981
Merge branch 'annotypes' of github.com:dls-controls/pymalcolm into an…
coretl May 17, 2018
24e3c3f
Add xadc support to pandablocks
coretl May 31, 2018
b0db464
Merge branch 'master' into annotypes
coretl Jun 12, 2018
1ffad76
Delete subscribe_* from everything apart from Attribute.subscribe_value
coretl Jun 12, 2018
a99081f
Fix Table fields to be writeable only when explicitly told to.
coretl Jun 12, 2018
26f6b41
Fix problem with generating Validate returns (duplicate from configure)
coretl Jun 12, 2018
b8d3c34
Stop updating method parameter takes arguments, and check this behaviour
coretl Jun 12, 2018
e2343fd
Remove PyQt gui
coretl Jun 13, 2018
de5ab4d
Diagnose/Fix travis build issues
Jun 13, 2018
6b7fdbc
Check what hdf5 version is being used
Jun 13, 2018
848c062
Update h5py requirement for tests
Jun 13, 2018
c273b46
Update to latest h5py and vdsgen
Jun 13, 2018
55a988e
Put PandA poll period back to 0.1s
coretl Jun 14, 2018
535b13f
Put PandA bit_mux and pos_mux labels in a more sensible order
coretl Jun 14, 2018
3e0cf75
Change stale websocket errors into info
coretl Jun 14, 2018
2c22c82
Format icons for new version of GUI
coretl Jun 14, 2018
ddc108b
Correct websocket server part to correctly respond to deltas on .blocks
coretl Jun 15, 2018
96bd293
Move coverage to codecov
coretl Jun 15, 2018
89612ae
Set PandA to update its attributes on a Put
Jun 26, 2018
bc2b462
Fix missing notifiers for meta objects
Jun 26, 2018
44674e7
Add tag to say when single element returns on methods will be unpacked
Jun 26, 2018
09012f7
Fix tests for no cothread
coretl Jun 26, 2018
53f65b2
Make the PandA XADC also a read
coretl Jul 3, 2018
0d24972
Add PandA support for enums in tables
coretl Jul 3, 2018
91d66ed
Add in *DESC for PandA table fields as server fixed
coretl Jul 5, 2018
052bed9
Sort PandA block names in get_blocks_data()
coretl Jul 12, 2018
5221623
Rename FileServerPart to GuiServerPart and fix for MalcolmJS 1.0
coretl Jul 12, 2018
e8fd3d7
Fix GuiServerPart
coretl Jul 12, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 5 additions & 12 deletions .travis.yml
Expand Up @@ -2,20 +2,16 @@ sudo: false
language: python
python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "3.6"

env:
- PYMALCOLM_USE_COTHREAD=YES
- PYMALCOLM_USE_COTHREAD=NO
- PYMALCOLM_USE_COTHREAD=YES
- PYMALCOLM_USE_COTHREAD=NO

addons:
apt:
packages:
- qt4-qmake
- libqt4-dev
- libhdf5-serial-dev

cache:
Expand All @@ -28,13 +24,10 @@ install:
- env
- ls -al ${VIRTUAL_ENV}/lib/python${TRAVIS_PYTHON_VERSION}/site-packages
- ls -al ${VIRTUAL_ENV}/bin
- ci/install_pyqt.sh
- python -c "import PyQt4;print(PyQt4)"
- pip install "setuptools>=36"
- pip install -r requirements/test.txt
- pip install coveralls
- pip install codecov
- ls -al ${VIRTUAL_ENV}/lib/python${TRAVIS_PYTHON_VERSION}/site-packages
- ldd ${VIRTUAL_ENV}/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/PyQt4/*.so
- ls -al ${VIRTUAL_ENV}/bin
- python setup.py bdist_egg

Expand All @@ -44,7 +37,7 @@ script:

# submit coverage
after_script:
- coveralls
- codecov --token=0fc7b8ca-201c-4f0f-938b-ac26f79d26ed

deploy:
provider: pypi
Expand All @@ -56,4 +49,4 @@ deploy:
tags: true
# As we are doing a source dist, only deploy for one python in matrix
python: "3.6"
condition: $PYMALCOLM_USE_COTHREAD = YES
condition: $PYMALCOLM_USE_COTHREAD = YES
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -7,6 +7,9 @@ This project adheres to `Semantic Versioning <http://semver.org/>`_ after 2-1.
`Unreleased`_
-------------

Added:
- Web gui (malcolmjs 0.4)

Changed:

- Nothing yet
Expand Down
10 changes: 1 addition & 9 deletions CONTRIBUTING.rst
Expand Up @@ -27,14 +27,6 @@ While 100% code coverage does not make a library bug-free, it significantly
reduces the number of easily caught bugs! Please make sure coverage is at 100%
before submitting a pull request!

Code Quality
------------

For code quality, please run flake8::

$ pip install flake8
$ flake8 .

Code Styling
------------
Please arrange imports with the following style
Expand All @@ -52,7 +44,7 @@ Please arrange imports with the following style

Please follow `Google's python style`_ guide wherever possible.

.. _Google's python style: http://google-styleguide.googlecode.com/svn/trunk/pyguide.html
.. _Google's python style: https://google.github.io/styleguide/pyguide.html

Building the docs
-----------------
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Expand Up @@ -47,8 +47,8 @@ APACHE License. (see `LICENSE`_)
:target: https://travis-ci.org/dls-controls/pymalcolm
:alt: Build Status

.. |coverage| image:: https://coveralls.io/repos/github/dls-controls/pymalcolm/badge.svg?branch=master
:target: https://coveralls.io/github/dls-controls/pymalcolm?branch=master
.. |coverage| image:: https://codecov.io/gh/pymalcolm/annotypes/branch/master/graph/badge.svg
:target: https://codecov.io/gh/dls-controls/pymalcolm
:alt: Test coverage

.. |pypi_version| image:: https://img.shields.io/pypi/v/malcolm.svg
Expand Down
39 changes: 0 additions & 39 deletions ci/install_pyqt.sh

This file was deleted.

242 changes: 0 additions & 242 deletions docs/api/core_api.rst
Expand Up @@ -5,245 +5,3 @@ This is the core of Malcolm

.. automodule:: malcolm.core
:members:

.. autoclass:: Alarm
:members:

.. autoclass:: AlarmSeverity
:members:

.. autoclass:: AlarmStatus
:members:

.. autoclass:: AttributeModel
:members:

An Attribute holds a value such as an Int, Float or Enum Table representing
the current state of a block.

Hold the current value of a piece of data of a fixed simple type
like Int, Float, String, Enum, IntArray or Table. You can Get and Subscribe to
changes in all Attributes, and Put to Attributes with a defined setter. In a
client Block, Attributes will mirror the value of the Block acting as a
server, with a Put operation being forwarded to the server Block. For example,
the State of a Block would be an Attribute, as would the CurrentStep of a
scan.

Subclasses serialize differently.

.. autoclass:: Attribute
:members:

An Attribute holds a value such as an Int, Float or Enum Table representing
the current state of a block.

Hold the current value of a piece of data of a fixed simple type
like Int, Float, String, Enum, IntArray or Table. You can Get and Subscribe to
changes in all Attributes, and Put to Attributes with a defined setter. In a
client Block, Attributes will mirror the value of the Block acting as a
server, with a Put operation being forwarded to the server Block. For example,
the State of a Block would be an Attribute, as would the CurrentStep of a
scan.

Subclasses serialize differently.

.. autoclass:: BlockMeta
:members:

.. autoclass:: Block
:members:

An object consisting of a number of Attributes and Methods.



It should
be designed to be as small and self contained as possible, and complex logic
should be implemented by nesting Blocks. For example, a detector driver would
be a Block, as would an HDF writer, but there would also be a higher level
detector Block to co-ordinate the low level Blocks. Any Block may be
synchronized among a number of Processes, the Block acting as the server will
perform the logic, and the client copies will expose the same API as the
server Block to the end user.

.. autoclass:: BlockModel
:members:

.. autoclass:: Context
:members:

.. autoclass:: Controller
:members:

Controller: A State Machine just exposes the list of allowed transitions
between StatefulStates. The Controller provides the logic that goes behind those
transitions. It creates a number of Methods fixing the external interface of
how to control the blocks, creates some Attributes for monitoring
configuration and runtime variables, and then exposes a number of hooks that
Parts can utilise to be executed and control transition to other states. For
example, there will be an AreaDetectorController with hooks for
PreRunDriverStart, PreRunPluginStart, and Running.

A Controller implements the logic for changing states and contains Hooks for
allow Parts to run any functions that are relevant to the current transition

.. autoexception:: TimeoutError

.. autoexception:: AbortedError

.. autoexception:: ResponseError

.. autoexception:: UnexpectedError

.. autoexception:: BadValueError

.. autoclass:: Future
:members:

.. autoclass:: Hook
:members:

Hooks are used to link a Parts' Methods to the relevant state transition of
the controller:

.. autoclass:: Info
:members:

Infos are used to report things from Hook runs

.. autoclass:: Loggable
:members:

.. autoclass:: MapMeta
:members:

.. autoclass:: Map
:members:

.. autoclass:: Meta
:members:

.. autoclass:: MethodModel
:members:

A Method exposes a function call for a Block:

Expose a function call. You can Call a Method with a (possibly empty)
Map of arguments, and it will return a (possibly empty) Map of return values.
In a client Block, the Call will be forwarded to the server Block, and the
return value returned to the caller. For example, configure() and run() would
be Methods of a Blocks used in a mapping scan.

.. data:: REQUIRED

Used to mark an argument in method_takes() or method_returns() as required

.. data:: OPTIONAL

Used to mark an argument in method_takes() or method_returns() as optional

.. autofunction:: method_takes

.. autofunction:: method_returns

.. autoclass:: Method
:members:

A Method exposes a function call for a Block:

Expose a function call. You can Call a Method with a (possibly empty)
Map of arguments, and it will return a (possibly empty) Map of return values.
In a client Block, the Call will be forwarded to the server Block, and the
return value returned to the caller. For example, configure() and run() would
be Methods of a Blocks used in a mapping scan.

.. autoclass:: Part
:members:

These provide the logic for using a particular child Block with a
particular Controller. It can register to use a number of hooks that the
Controller provides, and the Controller will wait for all using that hook to
run concurrently before moving to the next State. Parts can also create
Attributes on the parent Block, as well as contribute Attributes that should
be taken as arguments to Methods provided by the Controller. For example,
there will be an HDFWriterPart that knows how to set PVs on the HDFWriter in
the right order and expose the FilePath as an Attribute to the configure()
method.

A Part contains the logic for a Controller to interact with a child Block to
perform more device-specific actions:


.. autoclass:: Process
:members:

A Malcolm instance containing a number of Blocks along with various
communication modules to communicate with other Malcolm instances. A Process
can be a client of or a server to a number of other Processes.

A Process is a host for Block instances and allows communication between them:



.. autoclass:: Request
:members:

Request objects are used to interact with another block:

.. autoclass:: Get
:members:

.. autoclass:: Put
:members:

.. autoclass:: Post
:members:

.. autoclass:: Subscribe
:members:

.. autoclass:: Unsubscribe
:members:


.. autoclass:: Response
:members:

Response objects are received when a requested action is complete:

.. autoclass:: Return
:members:

.. autoclass:: Error
:members:

.. autoclass:: Update
:members:

.. autoclass:: Delta
:members:


.. autoclass:: Serializable
:members:

Objects that need to be sent over json implement the Serializable class:

.. autoclass:: Spawned
:members:


.. autoclass:: StringArray
:members:

.. autoclass:: Table
:members:

.. autoclass:: TimeStamp
:members:

.. autoclass:: VArrayMeta
:members:

.. autoclass:: VMeta
:members:
8 changes: 0 additions & 8 deletions docs/api/tags_api.rst

This file was deleted.