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

"fold" option unified across drawers #3108

Merged
merged 29 commits into from
Oct 4, 2019
Merged

Conversation

1ucian0
Copy link
Member

@1ucian0 1ucian0 commented Sep 17, 2019

Fixes partially #2797

On top of PR #3105, so on hold until #3105 gets merged.

Deprecates line_length in favor a fold.

Luciano Bello added 2 commits September 26, 2019 15:12
@1ucian0
Copy link
Member Author

1ucian0 commented Sep 26, 2019

Since #3105 got merged, removing on hold

@1ucian0 1ucian0 removed the on hold Can not fix yet label Sep 26, 2019
@1ucian0 1ucian0 requested a review from ajavadia October 3, 2019 14:13
ajavadia
ajavadia previously approved these changes Oct 4, 2019
Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

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

LGTM, 2 little comments inline about the docstrings, but easy enough to fix in a follow up too.

@@ -604,6 +604,12 @@ def draw(self, scale=0.7, filename=None, style=None, output=None,
idle_wires (bool): Include idle wires. Default is True.
with_layout (bool): Include layout information, with labels on the physical
layout. Default is True.
fold (int): Sets pagination. It can be disabled using -1.
In `text`, sets the length of the lines. This useful when the
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
In `text`, sets the length of the lines. This useful when the
In `text`, sets the length of the lines. This is useful when the

drawing does not fit in the console. If None (default), it will try to
guess the console width using `shutil.get_terminal_size()`. However, if
running in jupyter, the default line length is set to 80 characters.
In `mpl` is the amount of operations before folding. Default is 25.
Copy link
Member

Choose a reason for hiding this comment

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

It might be worth saying explicitly that for latex and latex_source this does nothing

drawing does not fit in the console. If None (default), it will try to
guess the console width using `shutil.get_terminal_size()`. However, if
running in jupyter, the default line length is set to 80 characters.
In `mpl` is the amount of operations before folding. Default is 25.
Copy link
Member

Choose a reason for hiding this comment

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

Same comments as above

@1ucian0 1ucian0 added the Changelog: API Change Include in the "Changed" section of the changelog label Oct 4, 2019
@1ucian0 1ucian0 merged commit 00e434c into Qiskit:master Oct 4, 2019
@1ucian0 1ucian0 deleted the 2797_line_length branch October 4, 2019 19:09
mergify bot added a commit that referenced this pull request Jun 18, 2020
* remove line_length

* release note

Co-authored-by: Julien Gacon <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
faisaldebouni pushed a commit to faisaldebouni/qiskit-terra that referenced this pull request Aug 5, 2020
* test

* cast in insinstance

* style

* layouts are already layouts :)

* style['plotbarrier'] is being deprecated

* internal param for text drawer renamed to plot_barriers

* error when style contains unknown options

* better error message

* deprecated style option

* mp karg fold

* text fold

* lint

* docstring

* cregbundle text option

* Revert "cregbundle text option"

This reverts commit bba055f.

* revert 3100

* new pickles

* cleaning up the diff

* docstring

* pickles
faisaldebouni pushed a commit to faisaldebouni/qiskit-terra that referenced this pull request Aug 5, 2020
…skit#4507)

* remove line_length

* release note

Co-authored-by: Julien Gacon <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: API Change Include in the "Changed" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants