Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: update path consistency, adjust documentation #391

Merged
merged 3 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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