APS-4ID-POLAR / polartools

Python package to read and process data from the APS Polar beamline.
https://polartools.readthedocs.io/en/latest/
Other
2 stars 2 forks source link

Use databroker>=1.2.1 and updates to testing #32

Closed gfabbris closed 3 years ago

gfabbris commented 3 years ago

This intake version breaks something in databroker, see https://github.com/bluesky/databroker/issues/645.

gfabbris commented 3 years ago

By the way, this will be fixed with databroker 1.2.1.

gfabbris commented 3 years ago

It turns out the bluesky team was much faster than me. This issue is fixed in databroker>=1.2.1, which is the required version now.

With the new intake version, running catalog() does not reload the catalogs list anymore, replaced it to catalog.force_reload.

gfabbris commented 3 years ago

I don't understand why the CI keeps failing. I ran the exact same steps in my machine and it works fine. Maybe a mac vs. linux issue?

codecov-io commented 3 years ago

Codecov Report

Merging #32 (cb1b53c) into main (2484a8f) will increase coverage by 0.03%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #32      +/-   ##
==========================================
+ Coverage   62.21%   62.24%   +0.03%     
==========================================
  Files           6        6              
  Lines         442      445       +3     
==========================================
+ Hits          275      277       +2     
- Misses        167      168       +1     
Impacted Files Coverage Δ
polartools/manage_database.py 89.47% <100.00%> (-1.27%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2484a8f...cb1b53c. Read the comment docs.

gfabbris commented 3 years ago

The CIs run fine only if I run databroker-unpack in the command line before running pytest (here).

I suspect this has something to do with creating/finding the intake catalog folder, which can be read from databroker as databroker.catalog_search_path. This problem doesn't come up if I run pytest in my machine. Also, note that the catalog created by databroker-unpack is not used in the tests.

I'm going to leave this as is for now.