Skip to content

Merlins instrument drivers#190

Merged
MerlinSmiles merged 68 commits into
masterfrom
Merlins-instrument-drivers
Jul 7, 2016
Merged

Merlins instrument drivers#190
MerlinSmiles merged 68 commits into
masterfrom
Merlins-instrument-drivers

Conversation

@alexcjohnson

Copy link
Copy Markdown
Contributor

@MerlinSmiles replaces #74 but merging to master

Merlin and others added 30 commits April 15, 2016 18:51
…y2400 (super-basic), triton fridge, patches for loop.py and ip.py

loop.py and ip.py needed fixes for things to work
for keithley_2600 and mercuryIPS magnet power supply
works without InstrumentServer - problem with daemonic processes not
allowed to create children
This reverts commit 6952c75.
…s-instrument-drivers

# ResolvedConflicts:
#	qcodes/instrument/visa.py
…s-instrument-drivers

# Resolved Conflicts:
#	qcodes/loops.py
@giulioungaretti

Copy link
Copy Markdown
Contributor

Not to be annoying, but documentation on these driver is severely lacking IMHO. Looking from the outside, it's impossible to understand why things exist. Idk, maybe it is just me but it seems like documenting things is just taken as an afterthought, which is most likely the best way to make people not to use this. It's fine it things were like this in the past, but I have the feeling that having the same approach going forward is maybe not the best thing to do.

try:
return float(re.findall("[-+]?\d*\.\d+|\d+", msg)[0])
except:
except Exception:

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 think this is the same as before :D

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

not according to @MatthieuDartiailh 's comment

Of course we should do better if we can :)

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.

This is modern python so all exceptions inherit from BaseException, so it's the same.
It could maybe fool static code checkers.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All exception inherit from BaseException true. But KeyboardInterrupt and SystemExit do not inherit from Exception. Using except catch everything, using except Exception let KeyboardInterrupt and SystemExit propagate.

@alexcjohnson

Copy link
Copy Markdown
Contributor Author

This is ready to 💃 from my perspective, do you agree @MerlinSmiles ?

@alexcjohnson

Copy link
Copy Markdown
Contributor Author

Re: documentation, let's have a separate discussion about how drivers should be documented, certain parts are needed but we don't want to replicate the manual...

@alexcjohnson

Copy link
Copy Markdown
Contributor Author

Actually, looking at this a little closer - the parameters I think are largely self-explanatory, but there are a few places where particularly the constructors should be documented better, otherwise people won't be able to get to the parameters. I'll add specific comments.



class CurrentParameter(Parameter):
def __init__(self, measured_param, camp_ins, name=None):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These constructor args need docs, including requirements: what measured_param would you use and why, from what instrument? does camp_ins need to be exactly an Ithaco_1211 or can it be used with other amplifiers?

alexcjohnson and others added 4 commits July 7, 2016 13:04
Also a little cleanup in CurrentParameter and VoltageParameter,
just cosmetics and robustness but they should probably both get tested IRL
@MerlinSmiles MerlinSmiles merged commit dce3a7d into master Jul 7, 2016
@MerlinSmiles MerlinSmiles deleted the Merlins-instrument-drivers branch July 7, 2016 15:12
giulioungaretti pushed a commit that referenced this pull request Jul 7, 2016
Merge: 8de34ac ed72fa1
Author: MerlinSmiles <MerlinSmiles@users.noreply.github.com>

    Merge pull request #190 from qdev-dk/Merlins-instrument-drivers
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