bluesky / hklpy

Diffractometer computation library with ophyd pseudopositioner support
https://blueskyproject.io/hklpy
BSD 3-Clause "New" or "Revised" License
3 stars 11 forks source link

report versions of software packages #187

Closed prjemian closed 3 years ago

prjemian commented 3 years ago

FIX #160

prjemian commented 3 years ago

Some CI fails when

>           assert v_package >= version.parse(minimum_version)
E           AssertionError: assert <Version('0+untagged.1.g4688ad4')> >= <Version('0.3.16')>
E            +  where <Version('0.3.16')> = <function parse at 0x7fc570042ca0>('0.3.16')
E            +    where <function parse at 0x7fc570042ca0> = version.parse

Need to generalize test of this package to version >= "0" for testing

prjemian commented 3 years ago

@ambarb: With these changes, you could determine which version of the libhkl C library you are using:

        In [1]: import gi
        ...: 
        ...: gi.require_version("Hkl", "5.0")
        ...: 
        ...: import hkl

        In [2]: hkl.software_versions()
        Out[2]: 
        {'hkl': '5.0.0.2173',
        'hklpy': '0.3.16+131.ga5a449a.dirty',
        'gobject-introspection': '1.68.0'}

Here, it shows (albeit indirectly) Hkl 5.0.0 tag 2173. Proceed to the Hkl source repository, list of tags, and find tag 2173.

prjemian commented 3 years ago

@mrakitin Ready for review after much argument with black over code style.

prjemian commented 3 years ago

@mrakitin Made those changes and added shortcut (& test) for software_versions()

prjemian commented 3 years ago

@mrakitin -- Great! Thanks for the quick turnaround.

mrakitin commented 3 years ago

My pleasure, @prjemian! Zero unmerged PRs!