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

add APS POLAR geometry #338

Merged
merged 18 commits into from
Aug 7, 2024
Merged

add APS POLAR geometry #338

merged 18 commits into from
Aug 7, 2024

Conversation

prjemian
Copy link
Contributor

@prjemian prjemian commented Aug 7, 2024

@prjemian prjemian added this to the v1.1.1 milestone Aug 7, 2024
@prjemian prjemian self-assigned this Aug 7, 2024
@prjemian
Copy link
Contributor Author

prjemian commented Aug 7, 2024

Aack! Common CI failures (Py3.11) today at this line:

return databroker.temp().v2

Exception trace (fragment):

2024-08-07T14:50:13.8430400Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
2024-08-07T14:50:13.8430784Z 
2024-08-07T14:50:13.8431047Z descriptor = <slot wrapper '__call__' of 'type' objects>
2024-08-07T14:50:13.8431682Z obj = <property object at 0x7fde9025bd80>
2024-08-07T14:50:13.8431976Z 
2024-08-07T14:50:13.8432327Z     def _descriptor_get(descriptor, obj):
2024-08-07T14:50:13.8432770Z         if isclass(descriptor):
2024-08-07T14:50:13.8433213Z             return descriptor
2024-08-07T14:50:13.8433721Z         get = getattr(type(descriptor), '__get__', _sentinel)
2024-08-07T14:50:13.8434205Z         if get is _sentinel:
2024-08-07T14:50:13.8434673Z             return descriptor
2024-08-07T14:50:13.8435081Z >       return get(descriptor, obj, type(obj))
2024-08-07T14:50:13.8435789Z E       TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object
2024-08-07T14:50:13.8436350Z 
2024-08-07T14:50:13.8436728Z ../../../micromamba/envs/hklpy-test-py-3.11/lib/python3.11/inspect.py:2432: TypeError
2024-08-07T14:50:13.8437451Z ___________________ ERROR at setup of test_no_primary_stream ___________________
2024-08-07T14:50:13.8437879Z 
2024-08-07T14:50:13.8438007Z     @pytest.fixture
2024-08-07T14:50:13.8438406Z     def cat():
2024-08-07T14:50:13.8438763Z >       return databroker.temp().v2
2024-08-07T14:50:13.8439026Z 
2024-08-07T14:50:13.8439173Z hkl/tests/test_save_restore_UB.py:30: 

Occurs in many places:

=========================== short test summary info ============================
FAILED hkl/tests/test_util.py::test_RE_documents[None] - TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object
FAILED hkl/tests/test_util.py::test_RE_documents[short] - TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object
FAILED hkl/tests/test_util.py::test_RE_documents[long] - TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object
ERROR hkl/tests/test_save_restore_UB.py::test_fourc_orientation_save - TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object
ERROR hkl/tests/test_save_restore_UB.py::test_fourc_run_orientation_info - TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object
ERROR hkl/tests/test_save_restore_UB.py::test_list_orientation_runs - TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object
ERROR hkl/tests/test_save_restore_UB.py::test_no_primary_stream - TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object
ERROR hkl/tests/test_save_restore_UB.py::test_missing_energy_key - TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object
ERROR hkl/tests/test_save_restore_UB.py::test_restore_orientation - TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object
ERROR hkl/tests/test_save_restore_UB.py::test_restore_sample - TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object
ERROR hkl/tests/test_util.py::test_issue215 - TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object
============= 3 failed, 481 passed, 1 warning, 8 errors in 36.04s ==============

This is a new failure. Something different upstream?

@prjemian
Copy link
Contributor Author

prjemian commented Aug 7, 2024

note:

2024-08-07T14:48:52.7701679Z   databroker                        2.0.0b45      pyhd8ed1ab_0             conda-forge

Just might be the common factor. These tests should be revised:

hkl/tests/test_save_restore_UB.py:    return databroker.temp().v2
hkl/tests/test_util.py:    yield databroker.temp().v2
hkl/tests/test_util.py:    cat = databroker.temp().v2

And some docs will need attention, as well.

docs/source/examples/notebooks/geo_e4cv.ipynb:    "db = databroker.temp().v1\n",
docs/source/examples/notebooks/geo_e6c.ipynb:    "db = databroker.temp().v1\n",
docs/source/examples/notebooks/geo_k4cv.ipynb:    "db = databroker.temp().v1\n",
docs/source/examples/notebooks/tst_UB_in_descriptor_document.ipynb:    "Use a local, temporary, file-based databroker.  It will reset after each restart of the notebook.  Prepare to define the diffractometers needed here plus some items from the ophyd simulators."
docs/source/examples/notebooks/tst_UB_in_descriptor_document.ipynb:    "cat = databroker.temp().v2\n",
docs/source/examples/notebooks/tst_UB_in_stream.ipynb:    "cat = databroker.temp().v2\n",

@prjemian
Copy link
Contributor Author

prjemian commented Aug 7, 2024

Also, upstream package dask is not ready for numpy v2

../../../../../../micromamba/envs/hklpy-test-py-3.11/lib/python3.11/site-packages/dask/array/routines.py:1569: in <module>
    @implements(np.round, np.round_)
../../../micromamba/envs/hklpy-test-py-3.11/lib/python3.11/site-packages/numpy/__init__.py:397: in __getattr__
    raise AttributeError(
E   AttributeError: `np.round_` was removed in the NumPy 2.0 release. Use `np.round` instead.

@prjemian
Copy link
Contributor Author

prjemian commented Aug 7, 2024

2024-08-07T15:19:34.3789947Z hkl/tests/test_util.py:11: in <module>
2024-08-07T15:19:34.3790495Z     from tiled.utils import safe_json_dump
2024-08-07T15:19:34.3791122Z E   ModuleNotFoundError: No module named 'tiled'

and

(bluesky_2024_2) prjemian@arf:~/.../Bluesky/hklpy$ git grep tiled
hkl/tests/test_util.py:from tiled.utils import safe_json_dump
hkl/tests/tools.py:from tiled.utils import safe_json_dump
pyproject.toml:  "tiled",

tiled is not needed by the hklpy source code, only the safe_json_dump() function for testing. Can it be vendored?

@prjemian
Copy link
Contributor Author

prjemian commented Aug 7, 2024

@padraic-shafer @mrakitin - This is ready for review!

Copy link
Contributor

@padraic-shafer padraic-shafer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable. I'm wondering about the unusual version spec for dependencies though.

Comment on lines +68 to +69
"databroker <=1.999",
"numpy <=1.999",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not <2 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Python version comparisons: 2.0.0b46 < 2, we need to be below anything with a 2 in the major position, even pre-releases such as 2.0.0b46.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, pre-releases. I thought that would not be used without explicitly requesting --allow-prerelease.

I suppose it comes by default because 2.0 is only available as a pre-release. That behavior will presumably go away when 2.0 gets released.

Copy link
Contributor Author

@prjemian prjemian Aug 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's on conda-forge. Might be that pip respects pre-releases. Certainly, conda has stepped firmly into that pothole.

Comment on lines +18 to +20
- databroker <=1.999
- hkl
- numpy
- numpy <=1.999
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not <2 ?

@prjemian prjemian merged commit cd32ae3 into main Aug 7, 2024
8 checks passed
@prjemian prjemian deleted the 337-add-APS-POLAR branch August 7, 2024 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add APS POLAR geometry
2 participants