snu-quiqcl / qiwis

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

Implment system request protocol #129

Closed BECATRUE closed 1 year ago

BECATRUE commented 1 year ago

This PR will close #119.

I implemented the system request protocol as follows.

Test

For test, I implemented the test branch, BECATRUE/119/swift-call-test.

In the test, when the generator button in numgen clicked, it emits a system request to destroy logger and create poller.

msg = {
    "destroy": ["logger"],
    "create": [{
        "name": "poller",
        "info": {
            "module": "examples.poller",
            "cls": "PollerApp",
            "show": True,
            "pos": "bottom",
            "channel": ["db"],
            "args": {
                "table": "B"
            }
        }
    }]
}
self.broadcastRequested.emit("swift", json.dumps(msg))

Before clicked

img

After clicked

img
BECATRUE commented 1 year ago

For unittest, I think it is efficient to implement tests after developing all features in v2.

kangz12345 commented 1 year ago

Hmm.. why the unittest action suffers from segmentation faults?

BECATRUE commented 1 year ago

Hmm.. why the unittest action suffers from segmentation faults?

In my experience, segmentation faults sometime occur in unittest even if it is not fatal problem.

However, in this case, I misimplemented destroyApp() and I think createApp() should be modified. I will fix and update it.

BECATRUE commented 1 year ago

I applied reviews! Please check it.

BECATRUE commented 1 year ago

I updated it.

BECATRUE commented 1 year ago

I applied all reveiws! @kangz12345