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

SimMotor is not importable without dev dependencies #502

Open
callumforrester opened this issue Jul 31, 2024 · 2 comments
Open

SimMotor is not importable without dev dependencies #502

callumforrester opened this issue Jul 31, 2024 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@callumforrester
Copy link
Contributor

I can't do: from ophyd_async.sim.demo import SimMotor in a project that depends on ophyd-async.

File ~/projects/bluesky/bluesky-stomp/venv/lib64/python3.10/site-packages/ophyd_async/sim/demo/_pattern_detector/_pattern_generator.py:4
      1 from pathlib import Path
      2 from typing import AsyncGenerator, AsyncIterator, Dict, Optional
----> 4 import h5py
      5 import numpy as np
      6 from bluesky.protocols import DataKey, StreamAsset

ModuleNotFoundError: No module named 'h5py'

h5py is a dev dependency, so it should move into primary dependencies?

@callumforrester callumforrester added the bug Something isn't working label Jul 31, 2024
@coretl coretl added this to the 1.0 milestone Jul 31, 2024
@coretl
Copy link
Collaborator

coretl commented Jul 31, 2024

I'm erring on the side of a ophyd_async[sim] extra that includes h5py

@jwlodek
Copy link
Member

jwlodek commented Jul 31, 2024

Should we re-organize imports to allow for importing SimMotor without needing h5py? As I understand h5py is only necessary for the pattern generator sim device. So SimMotor maybe should be importable w/o needing this library?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants