Skip to content

Truncate long block labels#254

Open
connorjward wants to merge 1 commit into
masterfrom
connorjward/truncate-long-block-labels
Open

Truncate long block labels#254
connorjward wants to merge 1 commit into
masterfrom
connorjward/truncate-long-block-labels

Conversation

@connorjward
Copy link
Copy Markdown
Contributor

This makes the tape much much more readable for cases where the __str__ of a block is too large. Since this code path is only touched during visualisation I argue that losing information here is fine.

Copy link
Copy Markdown
Contributor

@JHopeCollins JHopeCollins left a comment

Choose a reason for hiding this comment

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

This is really useful, thanks! Please can we also allow passing the width through:
Tape.visualise->Tape.visualise_*->Tape.create_graph->Block.create_graph
so it can be set by the user (with the default value you already have)?

Arguably Tape.visualise should call Tape.create_graph directly and pass the graph to each of the visualise_* methods, which would slightly simplify passing through arguments, but that's just style.

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.

2 participants