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

Repository code organization needs improvement #4

Closed
nyama8 opened this issue Oct 20, 2024 · 1 comment · Fixed by #8
Closed

Repository code organization needs improvement #4

nyama8 opened this issue Oct 20, 2024 · 1 comment · Fixed by #8
Assignees

Comments

@nyama8
Copy link
Contributor

nyama8 commented Oct 20, 2024

Structure of the qdl-utils repository is disorganized which complicates understanding and slows further development.

Current repository structure is:

qt3utils/
    hardware_type_1/
    hardware_type_2/
    ... [I.e. a list of various hardware types...]
    applications/
        controllers/
            [Random hardware controllers and YAML config files]
        application_1/
            [source code of various types]
        application_2/
    datagenerators/
        spectrometers/
        [Various application controllers]
    experiments/
        [Source code for epxeriments]

In this structure the main level of the repository is cluttered with various hardware types which are mixed in with other non-hardware subdirectories. Low-level hardware controllers are scattered throughout different parts of the repository due to conflation of the qt3utils.applications.controllers directory and the various hardware specific levels in qt3utils.hardware_type_X.

This will need to be discussed before committing to a final revised structure but I propose doing something along the lines of

qt3utils/
    hardware/
        hardware_type_1/    # e.g. `spectrometers` or `nidaq`
            [Classes for interfacing directly with the specific hardware 
             of type 1 (e.g. `andor` or `princeton`)]
        hardware_type_2/
            ...
        ...
    applications/
        application_1/
            config/
                [YAML config files, these are generally not shared between 
                 applications anyway?]
            [Source code files, possibly further separated into sub-directories
             e.g. `application_1/gui` and `application/controller` if complex?]
            main.py    # What actually launches the application
        application_2/
            ...
    experiments/
        [Source code for epxeriments]

With this structure, the low-level hardware controllers are separated and can be accessed straightforwardly by reference such as qt3utils.hardware.spectrometers.andor. Furthermore, this would completely separate specific applications and their components with hardware-specific code that is shared amongst different applications and experiments.

@nyama8 nyama8 self-assigned this Oct 24, 2024
@nyama8
Copy link
Contributor Author

nyama8 commented Oct 24, 2024

After our discussion today, I will move forward with this reorganization process, more or less as described above. I might be able to update the name of the package as well to qdlutils in addition to cleaning up some of the existing code.

The aim of this process will be to rename and reorganize most of the base code. The first pull request will be after the names are changed.

@nyama8 nyama8 linked a pull request Oct 25, 2024 that will close this issue
NnguyenHTommy added a commit that referenced this issue Oct 28, 2024
…lutils-repo

#4 qdlutils restructure, new base classes for hardware control
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 a pull request may close this issue.

1 participant