Closed untzag closed 1 year ago
Whoops, the failures from the test suite are coming from the way I assumed the context would be loaded. Sorry, I didn't realize this refactor would be so involved. The change needed is pretty quick though: Also use the happi_cfg
fixture and pass that in as the obj
in any cli test.
An Example:
def test_search(client: happi.client.Client, happi_cfg: str):
res = client.search_regex(beamline="TST")
with search.make_context('search', ['beamline=TST'], obj=happi_cfg) as ctx:
res_cli = search.invoke(ctx)
assert [r.item for r in res] == [r.item for r in res_cli]
I can push some changes real quick
Description
Adding new sub-command-group
config
to CLI.happi config edit
- open config file in $EDITORhappi config init
- create new config file with default optionshappi config show
- show location & contents of config fileMotivation and Context
See #314
How Has This Been Tested?
Tested on my machine.
Where Has This Been Documented?
CLI is auto-documented.
Pre-merge checklist
docs/pre-release-notes.sh
and created a pre-release documentation page