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

Add a bunch of new drivers #261

Merged
merged 50 commits into from
Oct 23, 2023
Merged

Conversation

thangleiter
Copy link
Contributor

I am finally tackling our driver backlog. Some of these are likely to be of limited broad appeal, so let me know if adding them is out of scope for the main repo.

If desired I can split up the PR into one for each new driver.

thangleiter and others added 30 commits April 5, 2023 16:41
Possible extensions:
- parse LabSpec6 config file to determine which motor sits at which
  address on the board to avoid having to manually set the IDs etc.
  at runtime.
- otherwise, use a simple Python data structure to do the same.
In case someone wants to implement a newer version of the dll in the future.
# Conflicts:
#	qcodes_contrib_drivers/drivers/msquared/__init__.py
#	qcodes_contrib_drivers/drivers/msquared/solstis_3.py
include verbose parameters if one wants to display the JSON strings
functions to get/set lock
create parameters wavelength_t/wavelength_m and lock
docs/examples/Horiba_FHR.ipynb Show resolved Hide resolved
docs/examples/Horiba_FHR.ipynb Show resolved Hide resolved
@astafan8
Copy link
Contributor

@astafan8
Copy link
Contributor

thanks for the contribution!

@thangleiter
Copy link
Contributor Author

also a few typing errors to fix, see here https://github.com/QCoDeS/Qcodes_contrib_drivers/actions/runs/6561129954/job/17820255378?pr=261

I'd appreciate if you could help me out with some of those since I don't have a lot of experience with mypy.

@astafan8
Copy link
Contributor

  • msl.loadlib you can add to pyproject.toml to tool.mypy.overrides section here
    module = [
    "cffi",
    "keysightSD1",
    "nidaqmx.*",
    "niswitch.*",
    "pandas",
    "py_header.*",
    "pyspcm",
    "spirack",
    "zhinst.*",
    "ruamel.*"
    ]
    ignore_missing_imports = true
  • types-tqdm>=4.64.6 can be added to pyproject.toml in project.optional-dependencies [test] target
  • for the classmethod property, i found a suggestion here https://stackoverflow.com/a/76047344 for using a metaclass. So you can go that route. Or, which I encourage, is to think why it's needed - why is it important to have a class-property (not an instance-property) - perhaps a simple class-attribute would work?

@astafan8
Copy link
Contributor

qcodes_contrib_drivers/drivers/M2/M2_Solstis_3.py:142:37: error: X | Y syntax for unions requires Python 3.10 [syntax]

to sovle this you could add from __future__ import annotations at the top of the module

qcodes_contrib_drivers/drivers/Thermotek/Thermotek_T255p.py:5:1: error: Module "typing" has no attribute "ParamSpec"; maybe "_ParamSpec"? [attr-defined]

to solve this, i don't remember, but perhaps the minimum version of typing_extensions needs to be bumped or so.

@astafan8
Copy link
Contributor

@thangleiter instead of 83b844b you could add this module to autodoc mock imports like here https://github.com/QCoDeS/Qcodes/blob/main/docs/conf.py#L439

@thangleiter
Copy link
Contributor Author

Mypy finally runs without errors locally on 3.9.

For reasons unclear to me, validation is performed before set_parsing,
making the latter obsolete if validation for the set_parser type
@codecov-commenter
Copy link

codecov-commenter commented Oct 19, 2023

Codecov Report

Merging #261 (d601bc2) into main (3c10e07) will decrease coverage by 0.54%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #261      +/-   ##
==========================================
- Coverage   20.17%   19.64%   -0.54%     
==========================================
  Files         146      153       +7     
  Lines       18260    18756     +496     
==========================================
  Hits         3684     3684              
- Misses      14576    15072     +496     
Files Coverage Δ
qcodes_contrib_drivers/drivers/Horiba/__init__.py 0.00% <0.00%> (ø)
...ntrib_drivers/drivers/Horiba/private/fhr_client.py 0.00% <0.00%> (ø)
...ntrib_drivers/drivers/Horiba/private/fhr_server.py 0.00% <0.00%> (ø)
...ghthousePhotonics/Lighthouse_Photonics_Sprout_G.py 0.00% <0.00%> (ø)
qcodes_contrib_drivers/drivers/M2/M2_Solstis_3.py 0.00% <0.00%> (ø)
...ntrib_drivers/drivers/Thermotek/Thermotek_T255p.py 0.00% <0.00%> (ø)
...codes_contrib_drivers/drivers/Horiba/Horiba_FHR.py 0.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@thangleiter
Copy link
Contributor Author

... Docs should also be fixed now!

@astafan8 astafan8 enabled auto-merge October 23, 2023 07:30
@astafan8 astafan8 merged commit d991e11 into QCoDeS:main Oct 23, 2023
8 checks passed
@thangleiter thangleiter deleted the feature/add_new_drivers branch October 23, 2023 07:37
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.

3 participants