Skip to content

Commit

Permalink
Merge pull request #391 from tangkong/tst_path_consistency
Browse files Browse the repository at this point in the history
TST: update path consistency, adjust documentation
  • Loading branch information
tangkong authored Nov 1, 2024
2 parents b978c6e + 4460b4a commit 3e22a18
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
22 changes: 22 additions & 0 deletions docs/source/upcoming_release_notes/391-tst_path_consistency.rst
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions docs/source/yaml_files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions hutch_python/tests/conf.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion hutch_python/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 3e22a18

Please sign in to comment.