镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Backport monitor - #731

Merged
William H.P. Nielsen (WilliamHPNielsen) merged 15 commits into
microsoft:masterfrom
jenshnielsen:backport_monitor
Oct 16, 2017
Merged

William H.P. Nielsen (WilliamHPNielsen) merged 15 commits into
microsoft:masterfrom
jenshnielsen:backport_monitor

Conversation

@jenshnielsen

Copy link
Copy Markdown
Collaborator

Backport Elm based monitor from QCoDeS DK

Jana Darulova (@jana-d)

* First monitor commit, now 🍔 !

* polish things up

* types for the masses

* chore: Refactor monitor

* fix: Add todo remove space

* refactor

* silm api

* better monitor

* fix: Add static files to pacakge setup

* fix: Add websocket dependency

* fix: Use http with webbrowser open
Comment thread qcodes/__init__.py Outdated
from qcodes.loops import Loop, active_loop, active_data_set
from qcodes.measure import Measure
from qcodes.actions import Task, Wait, BreakIf
from qcodes.monitor.monitor import Monitor

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to drop this import to not make websockets a hard dependency of qcodes?

Everything but the monitor can be used without it
@peendebak

Copy link
Copy Markdown
Contributor

Jens Hedegaard Nielsen (@jenshnielsen) I just tested the PR from spyder. My system freezes after trying to start a monitor. I tried:

In [4]: m=qcodes.Monitor( gates.B0, gates.B1)

This results in the following error and my system being locked.

ERROR:asyncio:Exception in callback Monitor._create_task(<Future at 0x...state=pending>, <websockets.p...00211FE148AC8>)()
handle: <Handle Monitor._create_task(<Future at 0x...state=pending>, <websockets.p...00211FE148AC8>)()>
Traceback (most recent call last):
  File "C:\Users\eendebakpt\AppData\Local\Continuum\Anaconda3\envs\py35\lib\asyncio\events.py", line 125, in _run
    self._callback(*self._args)
  File "c:\svn\qcodes\qcodes\monitor\monitor.py", line 172, in _create_task
    task = self.loop.create_task(coro)
  File "C:\Users\eendebakpt\AppData\Local\Continuum\Anaconda3\envs\py35\lib\asyncio\base_events.py", line 261, in create_task
    task = tasks.Task(coro, loop=self)
  File "C:\Users\eendebakpt\AppData\Local\Continuum\Anaconda3\envs\py35\lib\asyncio\tasks.py", line 70, in __init__
    assert coroutines.iscoroutine(coro), repr(coro)
AssertionError: <websockets.py35.server.Serve object at 0x00000211FE148AC8>

@jenshnielsen

Copy link
Copy Markdown
Collaborator Author

I think this breaks with websockets 3.4 which is why setup.py limits it to 3.3. I initially missed that commit when backporting. Can you try with 3.3?

@peendebak

Copy link
Copy Markdown
Contributor

Jens Hedegaard Nielsen (@jenshnielsen) Thanks, using websockets 3.3 solved the issue. Will setting of parameters also be made an option? That would be important for us to make it more usefull.

@jenshnielsen

Copy link
Copy Markdown
Collaborator Author

It's an old monitor that we have used and found useful in Copenhagen for some time which others have been interested in using hence this pull request. It's not meant for setting. We are aware of that request and it will happen eventually

@jenshnielsen

Copy link
Copy Markdown
Collaborator Author

William H.P. Nielsen (@WilliamHPNielsen) added a readme with a link to the ELM repo

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve of this backport. We could consider expanding the documentation, but I wouldn't give that very high priority.

@WilliamHPNielsen
William H.P. Nielsen (WilliamHPNielsen) merged commit c036866 into microsoft:master Oct 16, 2017
Giulio Ungaretti (giulioungaretti) pushed a commit that referenced this pull request Oct 16, 2017
Author: Jens Hedegaard Nielsen <jenshnielsen@gmail.com>

    Backport monitor (#731)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants