Closed prjemian closed 1 year ago
Have not been able yet to reproduce this problem in https://github.com/prjemian/spec2nexus/issues/298#issuecomment-1361431834. Wondering if this problem is local to the beam line's environment.
Will investigate further with a similar test environment local to the beam line.
In a test environment with pysumreg installed via micromamba:
0.1.dev13+g1178b8a.d20221221
) when setuptools-scm
also installed by micromambasetuptools-scm
removed by micromambapath: ..../pysumreg/__init__.py
:
"""Configuration of pysumreg package."""
from .sum_registers import SummationRegisters
try:
from setuptools_scm import get_version
__version__ = get_version()
del get_version
except (LookupError, ModuleNotFoundError, Exception):
from importlib.metadata import version
__version__ = version("pysumreg")
Noticed that version is reported differently with respect to the ~/bluesky/
directory:
(bluesky_2023_1) [8idiuser@bcda-rhel8:bluesky]$ python -c "import pysumreg; print(f'{pysumreg.__version__=}')"
pysumreg.__version__='0.1.dev13+g1178b8a.d20221221'
(bluesky_2023_1) [8idiuser@bcda-rhel8:bluesky]$ cd .environments/
(bluesky_2023_1) [8idiuser@bcda-rhel8:.environments]$ python -c "import pysumreg; print(f'{pysumreg.__version__=}')"
pysumreg.__version__='1.0.3'
(bluesky_2023_1) [8idiuser@bcda-rhel8:.environments]$ cd ~
(bluesky_2023_1) [8idiuser@bcda-rhel8:~]$ python -c "import pysumreg; print(f'{pysumreg.__version__=}')"
pysumreg.__version__='1.0.3'
(bluesky_2023_1) [8idiuser@bcda-rhel8:~]$ cd bluesky
(bluesky_2023_1) [8idiuser@bcda-rhel8:bluesky]$ python -c "import pysumreg; print(f'{pysumreg.__version__=}')"
pysumreg.__version__='0.1.dev13+g1178b8a.d20221221'
That's because ~/bluesky
is the root of a git repository. A special case.
setuptools_scm suggests this test: python -m setuptools_scm
(bluesky_2023_1) [8idiuser@bcda-rhel8:bluesky]$ python -m setuptools_scm
Warning: could not use pyproject.toml, using default configuration.
Reason: [Errno 2] No such file or directory: '/home/beams10/8IDIUSER/bluesky/pyproject.toml'.
/home/beams10/8IDIUSER/micromamba/envs/bluesky_2023_1/lib/python3.10/site-packages/setuptools_scm/config.py:61: UserWarning: relative_to is expected to be a file, its the directory '.'
assuming the parent directory was passed
warnings.warn(
0.1.dev13+g1178b8a.d20221221
Found a way to fix the affected packages (in place in the current environment).
All affected packages have been revised. Still waiting on the next release of apstools, due by 2023-01-06. Once that is installed at the beam line, this issue may be closed with success.
Not a problem in today's Queueserver demo:
RunEngine metadata:
================== ===============================
key value
================== ===============================
beamline_id 8idi_XPCS
databroker_catalog 8idi_xpcs
instrument_name 8-ID-I XPCS
login_id 8idiuser@lapis.xray.aps.anl.gov
pid 2297299
proposal_id XPCS Development
versions =================== ========
key value
=================== ========
apstools 1.6.13
bluesky 1.10.0
bluesky_queueserver 0.0.18
databroker 1.2.5
epics 3.5.0
h5py 3.7.0
matplotlib 3.6.2
numpy 1.23.5
ophyd 1.7.0
pyRestTable 2020.0.6
spec2nexus 2021.2.4
=================== ========
================== ===============================
[I 2023-03-07 11:51:24,823 bluesky_queueserver.manager.worker] Startup code loading was completed
[I 2023-03-07 11:51:24,823 bluesky_queueserver.manager.worker] Generating lists of allowed plans and devices
[I 2023-03-07 11:51:24,830 bluesky_queueserver.manager.worker] List of allowed plans and devices was successfully generated
[I 2023-03-07 11:51:24,939 bluesky_queueserver.manager.worker] Instantiating and configuring Run Engine ...
[I 2023-03-07 11:51:24,939 bluesky_queueserver.manager.worker] RE Environment is ready
There are problems with version info of some of the packages:
This is related to use of
setuptools-scm.get_version()
in packages apstools, pyRestTable, and spec2nexus. Requires a fix (probably the same fix) in each of those.Originally posted by @prjemian in https://github.com/aps-8id-dys/bluesky/issues/1#issuecomment-1355610394