snu-quiqcl / qiwis

QuIqcl Widget Integration Software
MIT License
6 stars 2 forks source link

Improved handling of app and bus information introducing dataclasses `AppInfo` and `BusInfo` #80

Closed kangz12345 closed 1 year ago

kangz12345 commented 1 year ago

dataclasses.dataclass is useful when dealing with structured data with default values, etc. I applied this to apps and buses initialization information in swift. This makes things easier to check if the data has a proper structure. Moreover, I implemented converter functions (parse() and strinfo()).

In addition, I removed some comments that seems merely repeating the codes.

Please freely give me your opinions!

Currently, pylint complains about type hints. The main reason is that typing.Self is introduced in Python 3.11. Also, the | in type hints is introduced in Python 3.10. I will look for the workaround for this issue...

This closes #72 and closes #73.

kangz12345 commented 1 year ago

If you think this PR is too large, I will split this into two.

BECATRUE commented 1 year ago

First of all, what do you think of updating Python version to 3.11?

kangz12345 commented 1 year ago

First of all, what do you think of updating Python version to 3.11?

Hmm, it's really tempting to do so, but at the same time, I am worried about potential bugs, since Python 3.11 is quite new.

Status of Python Versions would be helpful reference to decide this.

Python 3.10 seems stable enough (in terms of bugs) since the bugfix release schedule is almost ended.

I am not familiar to such version stability issues, so we have to search for good references about this.

Please create an issue about this and let's discuss it further.

BECATRUE commented 1 year ago

First of all, what do you think of updating Python version to 3.11?

Hmm, it's really tempting to do so, but at the same time, I am worried about potential bugs, since Python 3.11 is quite new.

Status of Python Versions would be helpful reference to decide this.

Python 3.10 seems stable enough (in terms of bugs) since the bugfix release schedule is almost ended.

I am not familiar to such version stability issues, so we have to search for good references about this.

Please create an issue about this and let's discuss it further.

I agree with you very much. Let's create a new issue.

kangz12345 commented 1 year ago

I resolved the Pylint warnings regarding to type hints. See #89 for more details.

kangz12345 commented 1 year ago

Please check @BECATRUE @Ahrrri