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

collection-2021-1.0 #16

Draft
wants to merge 7 commits into
base: collection-2020-2.0rc9
Choose a base branch
from
Draft
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
50 changes: 33 additions & 17 deletions azure-linux.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
jobs:
- job: run_profile_collection_testing
- job: run_profile_collection_2021_1_0

pool:
vmImage: 'ubuntu-latest'
Expand All @@ -9,11 +9,11 @@ jobs:
variables:
MPLBACKEND: Qt5Agg
TEST_PROFILE: test
CONDA_ENV_NAME: collection-2020-2.0rc9
# DOI: https://doi.org/10.5281/zenodo.4279773
# URL: https://zenodo.org/record/4279773/files/collection-2020-2.0rc9.tar.gz?download=1
ZENODO_ID: 4279773
MD5_CHECKSUM: ffa1b683da9e3dcd4c051ec7341ff158
CONDA_ENV_NAME: collection-2021-1.0
# DOI: https://doi.org/10.5281/zenodo.4421721
# URL: https://zenodo.org/record/4421721/files/collection-2021-1.0.tar.gz?download=1
ZENODO_ID: 4421721
MD5_CHECKSUM: 12fa67ad0ed60bc7eeac8a2765109ab4
# Ophyd/EPICS vars
OPHYD_TIMEOUT: 60
EPICS_CA_AUTO_ADDR_LIST: NO
Expand All @@ -22,14 +22,16 @@ jobs:

strategy:
matrix:
py37_pyepics:
collection_2021_1_0:
OPHYD_CONTROL_LAYER: pyepics
CONDA_CHANNEL_NAME: nsls2forge
PYTHON_VERSION: 3.7
py37_caproto:
OPHYD_CONTROL_LAYER: caproto
CONDA_CHANNEL_NAME: nsls2forge
PYTHON_VERSION: 3.7
# Commenting out caproto OPHYD_CONTROL_LAYER test due to
# https://github.com/caproto/caproto/issues/696.
# py37_caproto:
# OPHYD_CONTROL_LAYER: caproto
# CONDA_CHANNEL_NAME: nsls2forge
# PYTHON_VERSION: 3.7

steps:

Expand Down Expand Up @@ -67,6 +69,16 @@ jobs:

mkdir -v -p ~/.ipython/profile_${TEST_PROFILE}

# TODO: remove the condition below once all repos are compliant.
# This is a temporary step, and is needed for the non-compliant BL
# profiles:
# - https://github.com/NSLS-II-HXN/ipython_ophyd/tree/master/profile_collection
# - https://github.com/NSLS-II-IXS/.ipython/tree/master/profile_collection
# - https://github.com/NSLS-II-CSX/xf23id1_profiles/tree/master/profile_collection
if [ -d "profile_collection/" ]; then
cd profile_collection/
fi

# Copy the entire "startup" directory to the test profile.
cp -rv startup ~/.ipython/profile_${TEST_PROFILE}/
# Remove the top-level .py files as they will be loaded separately from
Expand Down Expand Up @@ -145,6 +157,7 @@ jobs:
fi
env | sort -u
echo "##vso[task.setvariable variable=USE_EPICS_IOC]${USE_EPICS_IOC}"
echo "##vso[task.setvariable variable=AZURE_TESTING]${AZURE_TESTING}"
displayName: "* perform beamline-specific actions"
condition: succeeded()

Expand All @@ -167,7 +180,10 @@ jobs:

if [ -z "$(USE_EPICS_IOC)" -o "$(USE_EPICS_IOC)" -eq 0 ]; then
# Start caproto "black-hole" IOC:
echo -e "\n" | caproto-spoof-beamline &

# TODO: revert it once https://github.com/caproto/caproto/pull/695 is merged/released.
# echo -e "\n" | caproto-spoof-beamline &
echo -e "\n" | python -m caproto.ioc_examples.pathological.spoof_beamline &

# Solve a missing "caRepeater" binary (same reason as in
# https://github.com/bluesky/tutorial/blob/master/binder/postBuild#L14-L15):
Expand All @@ -178,11 +194,11 @@ jobs:

# Monkey-patch the default timeout for the ophyd signals:
if [ "$OPHYD_CONTROL_LAYER" == "pyepics" ]; then
connection_timeout="
import ophyd
import functools
ophyd.signal.EpicsSignalBase.wait_for_connection = functools.partialmethod(ophyd.signal.EpicsSignalBase.wait_for_connection, timeout=${OPHYD_TIMEOUT})
print(ophyd.signal.EpicsSignalBase.wait_for_connection.__dict__)"
connection_timeout=""
# import ophyd
# import functools
# ophyd.signal.EpicsSignalBase.wait_for_connection = functools.partialmethod(ophyd.signal.EpicsSignalBase.wait_for_connection, timeout=${OPHYD_TIMEOUT})
# print(ophyd.signal.EpicsSignalBase.wait_for_connection.__dict__)"
fi

# This is what IPython does internally to load the startup files:
Expand Down