snu-quiqcl / iquip

Ion trap Quantum computing User Interface Project
GNU General Public License v3.0
7 stars 0 forks source link

Add code for argument information processing #242

Closed Aijuh closed 10 months ago

Aijuh commented 10 months ago

This closes issue #238.

Main part of this PR is to add code for processing argument information at _ScanEntry class.

PR description

Scannable argInfo has following information.

image

default is an dictionary that contains argument of each scan type. If scan type differs, its key and value are different. This information is called as state in this PR. unit, scale, and etc are common to all scan type. This information is called as procdesc in this PR. This information is used when widget for each scan type is created.

For this PR, I did not implemented widget for each scan type. But this widget will use state and procdesc at the following PRs.

Example image

image

BECATRUE commented 10 months ago

Oh, this PR is also too long. Could you separate it into several PRs?

Aijuh commented 10 months ago

I deleted all the scan type classes. I will add RangeScan type first at the next PR.

Aijuh commented 10 months ago

Thank you for the review @BECATRUE. Even if I double checked docstrings and fixed my codes, there were many things to improve. I changed all the point you gave me.

In terms of using layout, using QGridLayout is necessary for the design. image In the example image above, button box occupy the upper row. And QLabel and QSpinbox share one row. This design can be done by using QGridLayout. So I followed original artiq code in terms of design.

BECATRUE commented 10 months ago

I think you didn't apply all reviews such as type hintings or docstrings. Please check it again!

Aijuh commented 10 months ago

I will follow https://github.com/snu-quiqcl/artiq-proxy/discussions/111 for the order of variable in later PR's docstring.

                   "seed": None},
    "ExplicitScan": {"sequence": []}
}
if "default" in argInfo:

For this code, I just leave it because there might be the case that default is not given. If this case happens, we can select scan type and its parameters at our GUI.