-
Notifications
You must be signed in to change notification settings - Fork 10
Lab Installation
Each experiment uses two git repositories: Haeffner-Lab-LabRAD-Tools for common servers and clients and one containing code that is only useful for that experiment. To achieve this, we use the following directory structure
LabRAD\
__init__.py
\common\...
\experiment_name\...
where common is the cloned Haeffner-Lab-LabRAD-Tools repository and experiment_name is the experiment-specific repository. Having __init__.py there indicates that this is a package. This allows for easy import of files from either directory using:
import common.folder.file
To achieve this, add the LabRAD directory to PYTHONPATH
The Registry belongs in the /experiment_name/ folder. One can place it there and update the location in LabRAD Manager
We run any of the common code directly from the /common/ folder, without making additional copies. For example: the node server looks inside /common/ for available servers, and the central GUI imports widgets from /common/clients/ . With this method, we avoid unnecessary duplication and version-tracking. The common files can easily be updated by running
git pull
from the /common/ directory.
When a server or a client requires additional settings, these will be contained in a separate configuration file, i.e ''config.py''. When this is the case an example file for the configuration will be provided and names ''config.py'.example''. The experiment should then make a copy of this file and rename it to ''config.py''. In order to avoid pushing the experiment-specific file back to git, add it the list of files ignored by git ''.gitignore''.