From 24343207e4a8f2ffdee7b179992c388aa3d5e65c Mon Sep 17 00:00:00 2001 From: tangkong Date: Thu, 31 Oct 2024 11:50:13 -0700 Subject: [PATCH 1/3] TST: Make test_cli.py::test_create_arg agnostic to the location pytest was invoked from --- hutch_python/tests/test_cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hutch_python/tests/test_cli.py b/hutch_python/tests/test_cli.py index e9888df8..907dc6b7 100644 --- a/hutch_python/tests/test_cli.py +++ b/hutch_python/tests/test_cli.py @@ -69,7 +69,9 @@ def test_sim_arg(no_ipython_launch): def test_create_arg(): logger.debug('test_create_arg_dev') hutch = 'temp_create' - test_dir = CFG_PATH.parent.parent.parent / hutch + # CLI invocation will create the hutch folder in the folder pytest was + # called from. We should check and clean that folder. + test_dir = Path.cwd() / hutch if test_dir.exists(): shutil.rmtree(test_dir) From f3efe05640eef13a00183436d2d1952b952de796 Mon Sep 17 00:00:00 2001 From: tangkong Date: Thu, 31 Oct 2024 11:51:15 -0700 Subject: [PATCH 2/3] DOC: add an ASCII rendition of the test beamline, fix load-level documentation rendering --- docs/source/yaml_files.rst | 2 ++ hutch_python/tests/conf.yaml | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/docs/source/yaml_files.rst b/docs/source/yaml_files.rst index 5bc1f0b8..e48b9818 100644 --- a/docs/source/yaml_files.rst +++ b/docs/source/yaml_files.rst @@ -76,8 +76,10 @@ amount of ophyd devices to load: - ``UPSTREAM``: The hutch's devices, and devices upstream from the requested hutch. If there are multiple paths to the requested hutch, all paths' devices are loaded. + - ``STANDARD``: Devices gathered via ``UPSTREAM``, plus devices that share the "beamline" field in happi with the ``UPSTREAM`` devices. (The current standard) + - ``ALL``: All devices in the happi database. Use this option at your own risk. .. code-block:: YAML diff --git a/hutch_python/tests/conf.yaml b/hutch_python/tests/conf.yaml index 2ef12195..c3b067d6 100644 --- a/hutch_python/tests/conf.yaml +++ b/hutch_python/tests/conf.yaml @@ -1,5 +1,13 @@ hutch: tst +# Our test happi database has the following configuration: +# tst_device_3 (inactive) + +# z +-> (0.8) (1.0) (2.0) +# X0 -- tst_device_5 ------ tst_device_1 -- test_device_2 -- "TST" +# \ +# Z0 -- tst_device_4 -- tst_device_6 +# z +-> (0.85) (1.85) db: happi_db.json load: tst.beamline From 4460b4ab182f9bbb257bb162567cea8d7eb49b51 Mon Sep 17 00:00:00 2001 From: tangkong Date: Thu, 31 Oct 2024 16:24:10 -0700 Subject: [PATCH 3/3] DOC: pre-release notes --- .../391-tst_path_consistency.rst | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docs/source/upcoming_release_notes/391-tst_path_consistency.rst diff --git a/docs/source/upcoming_release_notes/391-tst_path_consistency.rst b/docs/source/upcoming_release_notes/391-tst_path_consistency.rst new file mode 100644 index 00000000..9afda5aa --- /dev/null +++ b/docs/source/upcoming_release_notes/391-tst_path_consistency.rst @@ -0,0 +1,22 @@ +391 tst_path_consistency +######################## + +API Changes +----------- +- N/A + +Features +-------- +- N/A + +Bugfixes +-------- +- Make test_create_arg agnostic to where pytest was invoked from + +Maintenance +----------- +- Updates documentation formatting for device load_level, and adds an ascii beamline map to the test suite + +Contributors +------------ +- tangkong