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

Unpinning Plotly #85

Closed
caldwellshane opened this issue Aug 13, 2019 · 4 comments
Closed

Unpinning Plotly #85

caldwellshane opened this issue Aug 13, 2019 · 4 comments
Labels
enhancement Request for a new feature or a change to an existing feature help wanted This issue requires assistance from other developers question A question about some aspect of the project

Comments

@caldwellshane
Copy link

Hi there, I'm using pyGSTi in a project where I'd also like to use Plotly 4.1. I noticed #55 where there's a remark about unpinning the Plotly version in the future, and it looks like there was an attempt to do that before it was pinned again to 3.10. Just curious what the path to unpinning this looks like?

@caldwellshane caldwellshane added the enhancement Request for a new feature or a change to an existing feature label Aug 13, 2019
@robpkelly
Copy link
Contributor

Good question!

An API change in plotly 4.1 broke one of our tests, but I'm not sure it actually broke the underlying functionality. So for the time being, I think you should be able to just use plotly 4.1 without breaking pygsti. Please let us know if that breaks anything.

@enielse Thoughts? Here's the build that broke on import plotly.plotly. Removing that import doesn't actually break the test -- we could push a patch unpinning plotly and removing that import, but I'll want to test across python versions first.

@robpkelly robpkelly added help wanted This issue requires assistance from other developers question A question about some aspect of the project labels Aug 14, 2019
@caldwellshane
Copy link
Author

I haven't looked into this on the pyGSTi side, but I'm hitting this with Plotly 4.1.0:

>>> from pygsti.construction import std1Q_XY
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-3-f5ce25d46596> in <module>
----> 1 from pygsti.construction import std1Q_XY

~/miniconda3/envs/w/lib/python3.6/site-packages/pygsti/construction/std1Q_XY.py in <module>
     12 from . import gatestringconstruction as _strc
     13 from . import gatesetconstruction as _setc
---> 14 from . import stdtarget as _stdtarget
     15 from collections import OrderedDict as _OrderedDict
     16

~/miniconda3/envs/w/lib/python3.6/site-packages/pygsti/construction/stdtarget.py in <module>
     16
     17 from . import stdlists as _stdlists
---> 18 from .. import objects as _objs
     19 from ..tools import mpitools as _mpit
     20

~/miniconda3/envs/w/lib/python3.6/site-packages/pygsti/__init__.py in <module>
     13 from . import construction as cst
     14 from . import objects as obj
---> 15 from . import report as rpt
     16
     17 from .algorithms.core import *

~/miniconda3/envs/w/lib/python3.6/site-packages/pygsti/report/__init__.py in <module>
     10 # the package namespace
     11 from .reportables import *
---> 12 from .factory import *
     13 from .workspace import Workspace
     14 from .notebook import Notebook

~/miniconda3/envs/w/lib/python3.6/site-packages/pygsti/report/factory.py in <module>
     24 from .. import _version
     25
---> 26 from . import workspace as _ws
     27 from . import autotitle as _autotitle
     28 from . import merge_helpers as _merge

~/miniconda3/envs/w/lib/python3.6/site-packages/pygsti/report/workspace.py in <module>
     24 from ..baseobjs import CustomDigestError as _CustomDigestError
     25
---> 26 from . import plotly_plot_ex as _plotly_ex
     27 from . import merge_helpers as _merge
     28

~/miniconda3/envs/w/lib/python3.6/site-packages/pygsti/report/plotly_plot_ex.py in <module>
      9 import os as _os
     10 from plotly import tools as _plotlytools
---> 11 from plotly.offline.offline import _plot_html
     12 #from plotly.offline.offline import get_plotlyjs
     13 #from plotly.offline.offline import __PLOTLY_OFFLINE_INITIALIZED

ImportError: cannot import name '_plot_html'

@caldwellshane
Copy link
Author

Just double checked on this, and the above is due to my mistakenly being on an older tag of pyGSTi. Indeed things do seem to work on the latest tag. Sorry for the false alarm.

@caldwellshane
Copy link
Author

caldwellshane commented Aug 27, 2019

Actually I think this is still an issue, even though I'm no longer immediately blocked. Ideally we would still unpin the Plotly version, so maybe my closing it was premature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Request for a new feature or a change to an existing feature help wanted This issue requires assistance from other developers question A question about some aspect of the project
Projects
None yet
Development

No branches or pull requests

2 participants