Conversation
Unit Test Results 1 files 1 suites 5s ⏱️ Results for commit c5b9fc3. ♻️ This comment has been updated with latest results. |
Codecov Report
@@ Coverage Diff @@
## main #18 +/- ##
=======================================
Coverage ? 77.06%
=======================================
Files ? 10
Lines ? 946
Branches ? 0
=======================================
Hits ? 729
Misses ? 217
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
|
Hi lior, the json editor implementation is the additional class you added right? I Couldn't see a front end of any kind. Does it interface to somewhere? |
talshani
left a comment
There was a problem hiding this comment.
There are several things that are unclear here.
Please go over them, and lets discuss...
| lo_freq = self.data["elements"][element]["mixInputs"]["lo_frequency"] | ||
| found_entry_index = None | ||
| for entry in self.data["mixers"][mixer]: | ||
| for i, entry in enumerate(self.data["mixers"][mixer]): |
There was a problem hiding this comment.
This assumes we have a single entry per IF+LO but the data structure doesn't require it.
Also, after we find a result we are still looping
Perhaps change it to a more pythonic way
found_entry_index = next(i for i, entry in enumerate(self.data["mixers"][mixer]) if (
entry["intermediate_frequency"] == old_if
and entry["lo_frequency"] == lo_freq
))is there a test for the update_intermediate_frequency?
| def __init__(self, dbname): | ||
| self.dbname = dbname | ||
|
|
||
| def write(self, db) -> None: |
|
|
||
| class QpuEditor(abc.ABC): | ||
| @abc.abstractmethod | ||
| def write(self, db): |
There was a problem hiding this comment.
Missing type, this interface is not clear
| from persistent import Persistent | ||
|
|
||
|
|
||
| class CalState(IntEnum): |
There was a problem hiding this comment.
Moving classes and types outside the qpudatabase.py file is not clear.
the name of this file is also unclear and doesn't imply what it should contain
new features:
this version adds a simple json editor that allows viewing the contents of the DB and editiing them manually. Synchronization between the edited version and the DB version is the responsibility of the user.
fixes:
a bug in update_intermediate_frequency in quaconfig