Skip to content

Commit

Permalink
[QMI-102] Edited CHANGELOG.md. Removing comment lines. Note that the …
Browse files Browse the repository at this point in the history
…`args.rpc` option has more robust way to recognize the server context. The old way was not guaranteed to work if `qmi.conf` was not well set-up.
  • Loading branch information
Henri Ervasti committed Sep 23, 2024
1 parent ab590a3 commit 8173256
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- The `QMI_Instrument` and `QMI_TaskRunner` (which inherit from `QMI_RpcObject`) are now equipped with specific `__enter__` and `__exit__` methods, which in the case of `QMI_Instrument`
also open and close the instrument when run with a `with` context manager protocol. Meanwhile `QMI_TaskRunner` starts and stops then joins a QMI task thread. In practise, these context managers
can be used instead of the to-be-obsoleted `open_close` and `start_stop_join` context managers. The context manager protocol cannot be used for `QMI_RpcObject` directly.
- The Bristol FOS has now a QMI driver version that works on Windows PCs. Also the respective CLI has been added in `bin/instruments`.

### Changed
- The CI pipelines are now using reusable workflows, placed in reusable-ci-workflows.yml.
Expand Down
2 changes: 0 additions & 2 deletions bin/instruments/qmi_bristol_fos
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def main() -> None:
args = parser.parse_args()

instr: Bristol_Fos
# with start_stop(qmi, "bristol_fos_client", console_loglevel="WARNING"), parse_source(args) as instr:
with start_stop(qmi, "bristol_fos_client", console_loglevel="WARNING"):
with ExitStack() as stack:
instr = stack.enter_context(parse_source(args))
Expand Down Expand Up @@ -66,7 +65,6 @@ def parse_source(args) -> AbstractContextManager:
# get the instrument
elif args.rpc is not None:
host_port = [ctx[1] for ctx in qmi.context().discover_peer_contexts() if ctx[0] == args.rpc.split('.')[0]][0]
# return qmi.get_instrument(args.rpc, auto_connect=True, host_port=host_port)
return nullcontext(qmi.get_instrument(args.rpc, auto_connect=True, host_port=host_port))

raise ValueError("Expected an unique ID or RPC address for the instrument!")
Expand Down

0 comments on commit 8173256

Please sign in to comment.