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

OxfordInstruments Proteox driver #301

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Conversation

abioxinst
Copy link

  • In the driver directory, we have changed the directory name from Oxford to OxfordInstruments.
  • Within OxfordInstruments, you will now find our QCoDeS driver, Proteox.py, and a README.md file to explain how to use it.
  • To use Proteox.py, our decs-visa application is required. Therefore, this has been added as a submodule within the OxfordInstruments directory.
  • Within the docs/examples directory, you will find an example Jupyter Notebook, titled OxfordInstruments_Proteox.ipynb.

@astafan8 astafan8 changed the title pull request for OxfordInstruments Proteox driver OxfordInstruments Proteox driver Mar 1, 2024
Copy link
Collaborator

@jenshnielsen jenshnielsen left a comment

Choose a reason for hiding this comment

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

@abioxinst Thanks for the contribution and sorry for the slow reply. Overall, we are very happy to see this driver added here. I think we would like to improve the infrastructure a bit so that users can consume the code directly without modifying the src and having to clone the repo directly. I have tried to outline some of the changes below but I am happy to work more closely with you to see how this can be done

@@ -0,0 +1,3 @@
[submodule "src/qcodes_contrib_drivers/drivers/OxfordInstruments/decsvisa"]
path = src/qcodes_contrib_drivers/drivers/OxfordInstruments/decsvisa
url = git@github.com:decs-visa/decsvisa.git
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it be possible to release decsvisa as a python package? We can probably help with advice on how to setup the infrastructure to make this possible.

Until then I think we should change the directory to _decsvisa to make it clear that this is not public api

Copy link
Author

Choose a reason for hiding this comment

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

We would like to keep decsvisa as a submodule for the meantime, as the idea is users are able to add additional commands in the command_dictionary. We have renamed this directory to _decsvisa to make it clear that this is not public API as you suggested.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would prefer not to have images in src folder. Are these needed? It seems like the same images are in the example folder?

Copy link
Author

Choose a reason for hiding this comment

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

The images in the src folder have been removed. All images are now in the example folder.

"import qcodes as qc\n",
"from qcodes.logger.logger import start_all_logging\n",
"\n",
"sys.path.append(\"../../src/qcodes_contrib_drivers/drivers/OxfordInstruments/\")\n",
Copy link
Collaborator

Choose a reason for hiding this comment

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

qcodes_contrib_drivers is a package so rather than adding it to path like this one should replace the imports with

from qcodes_contrib_drivers.drivers.OxfordInstruments.Proteox import oiDECS

Copy link
Author

Choose a reason for hiding this comment

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

The file has been updated to replace paths with imports for qcodes_contrib_driver.

from src.decs_visa_tools.decs_visa_settings import PORT
from src.decs_visa_tools.decs_visa_settings import HOST
from src.decs_visa_tools.decs_visa_settings import SHUTDOWN
from src.decs_visa_tools.decs_visa_settings import WRITE_DELIM
Copy link
Collaborator

Choose a reason for hiding this comment

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

Rather than modifying the path again this should be imported as a module. As mentioned elsewhere preferably decs_visa_tools should be a package but until then the imports should be

from qcodes_contrib_drivers.drivers.OxfordInstruments.Proteox.decsvisa.src.decs_visa.src.decs_visa_tools.decs_visa_settings import PORT

Copy link
Author

Choose a reason for hiding this comment

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

The file has been updated to replace paths with imports for qcodes_contrib_driver.

````python
if running_on.startswith("Windows"):
print(f"Running on {running_on} - start subprocess without PIPEd output")
subprocess.Popen(["python", decs_visa_path])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Rather than having to start the server manually like this one could add an entry point script that can be run directly. See for example this server for the Dynacool PPMS https://github.com/microsoft/Qcodes/blob/main/pyproject.toml#L124

Copy link
Author

@abioxinst abioxinst May 23, 2024

Choose a reason for hiding this comment

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

decsvisa can be used independently from QCoDeS, which requires the user to modify some settings in decsvisa.

We are happy to look into how we might be able to automatically start this server for QCoDeS users, but still keep it flexible for other users.

For the meantime, starting the server with the subprocess package seems to work well for accommodating both use cases.

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.

None yet

3 participants