diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 837956bb..554c6346 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,12 +24,11 @@ jobs: - name: Cache pip uses: actions/cache@v2 with: - # This path is specific to Ubuntu - path: ~/.cache/pip + path: ${{ env.pythonLocation }} # Look to see if there is a cache hit for the corresponding requirements file - key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} + key: ${{ runner.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('requirements.txt') }} restore-keys: | - ${{ runner.os }}-pip- + ${{ runner.os }}-py${{ matrix.python-version }}-pip- ${{ runner.os }}- - name: Install dependencies run: | @@ -76,6 +75,8 @@ jobs: C:\msys64\usr\bin\wget.exe https://github.com/usnistgov/PyHyperScattering/releases/download/0.0.0-example-data/CMS_giwaxs_series.zip unzip CMS_giwaxs_series.zip - name: Test with pytest + env: + TILED_API_KEY: ${{ secrets.TILED_API_KEY }} run: | #pytest -v #temporarily disabling coverage for memory usage diff --git a/requirements-bluesky.txt b/requirements-bluesky.txt index 594caea8..d7471fc2 100644 --- a/requirements-bluesky.txt +++ b/requirements-bluesky.txt @@ -1,2 +1,3 @@ -tiled[client]>=0.1.0a74 +tiled[all]>=0.1.0a74 databroker[all]>=2.0.0b10 +bottleneck diff --git a/requirements.txt b/requirements.txt index ed62f736..6107d9d1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ astropy fabio h5py nodejs -numpy +numpy<2 pandas # pygix fails to improt if silx > 2.0.0 silx==2.0.0 diff --git a/tests/test_SST1DBLoader.py b/tests/test_SST1DBLoader.py index 067881b1..ec51c9b7 100644 --- a/tests/test_SST1DBLoader.py +++ b/tests/test_SST1DBLoader.py @@ -10,8 +10,10 @@ SKIP_DB_TESTING=False except tiled.profiles.ProfileNotFound: try: - client = tiled.client.from_uri('https://tiled-demo.blueskyproject.io') - SKIP_DB_TESTING=True # waiting on test data to be posted to this server + import os + api_key = os.environ['TILED_API_KEY'] + client = tiled.client.from_uri('https://tiled.nsls2.bnl.gov',api_key=api_key) + SKIP_DB_TESTING=False except Exception: SKIP_DB_TESTING=True except ImportError: @@ -32,10 +34,12 @@ @pytest.fixture(autouse=True,scope='module') def sstdb(): try: - catalog = tiled.client.from_profile('rsoxs') + client = tiled.client.from_profile('rsoxs') except tiled.profiles.ProfileNotFound: - catalog = tiled.client.from_uri('https://tiled-demo.blueskyproject.io')['rsoxs']['raw'] - sstdb = SST1RSoXSDB(catalog=catalog,corr_mode='none') + import os + api_key = os.environ['TILED_API_KEY'] + client = tiled.client.from_uri('https://tiled.nsls2.bnl.gov',api_key=api_key)['rsoxs']['raw'] + sstdb = SST1RSoXSDB(catalog=client,corr_mode='none') return sstdb @must_have_tiled