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

Guard dxpy imports so dnanexus and swift can actually be optional #143

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jtratner
Copy link
Contributor

@jtratner jtratner commented Jan 7, 2022

dxpy pulls in a wide array of (often legacy) packages, skipping the import means
we only need to pull it in as necessary which hopefully makes library
more useful to others.

Tests should just continue to pass so shouldn't be a big deal

Showing this works for now:

>>> import stor
>>> stor.Path("/whatever")
PosixPath('/whatever')
>>> stor.Path("dx://whatever")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/jtratner/git/stor/stor/base.py", line 47, in __new__
    cls = utils.find_dx_class(path)
  File "/Users/jtratner/git/stor/stor/utils.py", line 272, in find_dx_class
    from stor.dx import DXPath, DXCanonicalPath, DXVirtualPath
  File "/Users/jtratner/git/stor/stor/dx.py", line 9, in <module>
    import dxpy
ModuleNotFoundError: No module named 'dxpy'
>>>

dxpy pulls in a wide array of (often legacy) packages, skipping the import means
we only need to pull it in as necessary which hopefully makes library
more useful to others.
@jtratner jtratner changed the title Guard dxpy imports so dnanexus can actually be optional Guard dxpy imports so dnanexus and swift can actually be optional Jan 7, 2022
@jtratner jtratner removed the request for review from srijyothsna April 23, 2024 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant