-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Latex drawer tested using notebook in binder #6450
Changes from 125 commits
20fdbd2
88ff31f
6fb992e
ea0899f
0a8d042
bb24b28
c2a149b
8ad11e1
589c237
2567802
0fe9ae1
5238f98
37042d4
f9c1ac3
764be02
7289ce2
3ae7f24
cc9971b
d727933
f7b027b
23a8bbc
86ce4ba
1b367dd
f499859
3defef9
82a4681
0593da4
af39dd7
67d31d6
6eaad0c
ec0fb2e
14ee769
3572509
2593738
bc82a56
44c6d14
c76f207
f3712e2
45a3750
8ef988a
2eb970a
ddfd4f1
6ef8eed
86b21d8
a9f4fb4
ed47f1c
377a614
72acf71
d872a67
9367e56
0e188bc
bd018fd
9e99ae4
cb4e741
7e2d244
92447ad
dc28ff5
7d3d284
0844e9e
588554f
43f2ccd
e55ec2b
a386075
5f20ccd
96483de
91690c4
bebedeb
033deef
a5c9207
f9c9ebe
bf1805e
898f7e4
a68b8e9
dfcbd9c
64d62f3
52dbb5e
61871da
bfa2c65
5266ada
cc960b0
3e412e1
3bb1e1c
c3b9485
0438162
212baaa
966a423
11244b2
91a4173
283ea6f
407dab4
8fe8d82
4f586cd
42967ff
fb8cb70
f8083a2
5952738
1aa636d
a8b377c
722936a
4c5ac18
91fc0be
81ebaaa
adb06d0
f88cc7d
578b13f
322118a
cbc9766
1895785
d907904
5166265
251adf9
c19b3c6
82678f2
636f3d5
716fcc5
6b660bf
c1cf62e
525fbe8
3500d61
80c465b
0cd29f6
ea8b3c0
bd336d2
3bf7058
dd837f9
a2f3cdc
b51d07e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
texlive-pictures | ||
texlive-latex-recommended | ||
texlive-latex-extra | ||
texlive-fonts-recommended | ||
poppler-utils |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -251,7 +251,7 @@ stages: | |||||
image_tests/bin/pip install -U -r requirements.txt -c constraints.txt | ||||||
image_tests/bin/pip install -U -c constraints.txt -e ".[visualization]" | ||||||
image_tests/bin/python setup.py build_ext --inplace | ||||||
sudo apt install -y graphviz pandoc | ||||||
sudo apt install -y graphviz pandoc $(cat apt.txt) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why these is needed? Do this checks run in CI? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure if the comparison tests are run in CI. But I guess there is an attempt to draw and save the circuit visualization images of these tests at https://github.com/Qiskit/qiskit-terra/blob/0cdacec2ee3b26a96b1d7bbb0def6b7eb66ac5b4/azure-pipelines.yml#L255 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
image_tests/bin/pip check | ||||||
displayName: 'Install dependencies' | ||||||
- bash: image_tests/bin/python -m unittest discover -v test/ipynb | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -11,6 +11,10 @@ | |||||
pip install matplotlib pylatexenc pillow appmode seaborn | ||||||
pip install . | ||||||
|
||||||
# Install QCircuit for LaTeX drawer | ||||||
mkdir -p $(kpsewhich -var-value=TEXMFHOME)/tex/latex/qcircuit/ | ||||||
wget https://mirrors.ctan.org/graphics/qcircuit/qcircuit.sty -P $(kpsewhich -var-value=TEXMFHOME)/tex/latex/qcircuit/ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
# Activation of appmode extension | ||||||
jupyter nbextension enable --py --sys-prefix appmode | ||||||
jupyter serverextension enable --py --sys-prefix appmode |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# This code is part of Qiskit. | ||
# | ||
# (C) Copyright IBM 2021. | ||
# | ||
# This code is licensed under the Apache License, Version 2.0. You may | ||
# obtain a copy of this license in the LICENSE.txt file in the root directory | ||
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. | ||
# | ||
# Any modifications or derivative works of this code must retain this | ||
# copyright notice, and modified files need to carry a notice indicating | ||
# that they have been altered from the originals. | ||
|
||
"""Image comparison test for Latex circuit drawer. | ||
You can generate the image references with Binder | ||
in https://mybinder.org/v2/gh/<user>/<repo>/<branch>?urlpath=apps/test/ipynb/snapshot_tester.ipynb | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not able to run https://mybinder.org/v2/gh/TharrmashasthaPV/qiskit-terra/binder_test_branch?filepath=apps/test/ipynb/snapshot_tester.ipynb . Maybe binder is in a bad day? Maybe I'm doing something wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be a small error in the link you tried. 😃 We use either
...filepath=test/ipynb/snapshot_tester.py
or...urlpath=apps/test/ipynb/snapshot_tester.py
in the link. One correct link is https://mybinder.org/v2/gh/TharrmashasthaPV/qiskit-terra/binder_test_branch?urlpath=apps/test/ipynb/snapshot_tester.ipynb. This link seems to be working for me.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also was struggling to run them a few days ago. I did manage to run them in the end but they were very slow. Also wasn't sure if it was a binder issue, or maybe something to do with the changes here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested running branches with and without the change of this PR and I kind of found them both to take similar duration (around 3 mins) to open a server for the first time a branch is run after a commit. So, I think it is a binder issue.