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

Fix dir #15

Merged
merged 3 commits into from
Feb 1, 2016
Merged

Fix dir #15

merged 3 commits into from
Feb 1, 2016

Conversation

alexcjohnson
Copy link
Contributor

@AdriaanRol replaces the safe_getattr function with a mixin class DelegateAttributes that handles delegation to both dictionary keys (and can handle multiple dictionaries, like parameters and functions) and objects (making DataArray behave like a numpy.ndarray) and updates __dir__ so dir() and autocomplete work.

Also (sorry, right after saying PRs should be single-topic 😱 ) two small fixes: I had forgotten Station.snapshot, and I broke the tests with my last addition to the subprocess PR.

apparently I didn't rerun these tests after adding the in_notebook test...
@AdriaanRol
Copy link
Contributor

Awesome! I'll try to check this out tomorrow, I'll be very happy with this.

msg = "'{}' object has no attribute or {} item '{}'".format(
obj.__class__.__name__, attr_dict, key)
raise AttributeError(msg) from None
class DelegateAttributes(object):
Copy link
Contributor

Choose a reason for hiding this comment

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

Much better name than safe_getatrr.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's because it's doing much better things 😄
If you're happy with this, give it a 💃 and I'll merge it in.

@AdriaanRol
Copy link
Contributor

Just tested it out on my laptop. Got to say I'm very happy with it, I'll pull it in today 💃

alexcjohnson added a commit that referenced this pull request Feb 1, 2016
@alexcjohnson alexcjohnson merged commit e04568e into master Feb 1, 2016
@alexcjohnson alexcjohnson deleted the fix-dir branch February 1, 2016 07:51
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Apr 3, 2017
* 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
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Apr 10, 2017
* 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
jenshnielsen referenced this pull request in jenshnielsen/Qcodes May 2, 2017
* 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
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Jun 1, 2017
* 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
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Jun 22, 2017
* 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
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Jun 27, 2017
* 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
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Jul 7, 2017
* 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
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Jul 18, 2017
* 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
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Aug 3, 2017
* 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
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Aug 3, 2017
* 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
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Aug 7, 2017
* 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
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Aug 9, 2017
* 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
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Aug 10, 2017
* 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
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Aug 16, 2017
* 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
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Aug 18, 2017
* 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
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Aug 22, 2017
* 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
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Sep 11, 2017
* 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
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Sep 21, 2017
* 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
nataliejpg pushed a commit to nataliejpg/Qcodes that referenced this pull request Oct 11, 2017
* 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
WilliamHPNielsen pushed a commit that referenced this pull request Oct 16, 2017
* Feature/monitor (#15)

* 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

* fix: Include static, add init

* move server to onw  scripts

* feat: make monitor server standalone

* fix: Sleep before thread starts!

* fix: Update monitor GUI

* Fix monitor for channel parameters (#61)

* The monitor does not work correctly with ws34

* make websockets a soft dependency

Everything but the monitor can be used without it

* remove unused pass statment

* add simple monitor readme
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.

2 participants