Skip to content

Conversation

@thierry-martinez
Copy link
Collaborator

  • Add dedicated pretty-printing functions for patterns.
  • Improve str() and repr() for circuits, patterns, and core data types (Sign, Axis, Plane, Command, Instruction).

This is a focused extract from PR #245, removing any external dependencies:

  • Render patterns as ASCII, Unicode, or LaTeX snippets (PDF/image output removed).
  • Provide evaluable representations for patterns, circuits, and other core types.

Per Shinichi’s suggestion (#245 (comment)), move most code from pattern.py into a new module pretty_print.py.

Per EarlMilktea’s suggestion (#245 (comment)), add type checking to pretty_print.py and its tests (test_pretty_print.py).

thierry-martinez added a commit to thierry-martinez/graphix that referenced this pull request May 14, 2025
thierry-martinez added a commit to thierry-martinez/graphix that referenced this pull request May 14, 2025
thierry-martinez added a commit to thierry-martinez/graphix that referenced this pull request May 14, 2025
thierry-martinez added a commit to thierry-martinez/graphix that referenced this pull request May 14, 2025
thierry-martinez added a commit to thierry-martinez/graphix that referenced this pull request May 19, 2025
thierry-martinez added a commit to thierry-martinez/graphix that referenced this pull request May 19, 2025
EarlMilktea reported that Iterable does not implement __bool__.
TeamGraphix#277 (comment)
thierry-martinez added a commit to thierry-martinez/graphix that referenced this pull request May 19, 2025
- Add dedicated pretty-printing functions for patterns.
- Improve str() and repr() for circuits, patterns, and core data types
  (Sign, Axis, Plane, Command, Instruction).

This is a focused extract from PR TeamGraphix#245, removing any external dependencies:
- Render patterns as ASCII, Unicode, or LaTeX snippets (PDF/image output removed).
- Provide evaluable representations for patterns, circuits, and other core types.

Per Shinichi’s suggestion
(TeamGraphix#245 (comment)),
move most code from `pattern.py` into a new module `pretty_print.py`.

Per EarlMilktea’s suggestion
(TeamGraphix#245 (comment)),
add type checking to `pretty_print.py` and its
tests (`test_pretty_print.py`).
EarlMilktea reported that Iterable does not implement __bool__.
TeamGraphix#277 (comment)
@thierry-martinez thierry-martinez force-pushed the pretty-print_only_string branch from cbdae7e to 38c7d16 Compare May 19, 2025 12:26
@codecov
Copy link

codecov bot commented May 19, 2025

Codecov Report

Attention: Patch coverage is 94.40789% with 17 lines in your changes missing coverage. Please review.

Project coverage is 81.36%. Comparing base (f657712) to head (d111615).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
graphix/pretty_print.py 93.66% 9 Missing ⚠️
graphix/pattern.py 89.47% 4 Missing ⚠️
graphix/transpiler.py 93.02% 3 Missing ⚠️
graphix/instruction.py 98.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #277      +/-   ##
==========================================
+ Coverage   80.34%   81.36%   +1.02%     
==========================================
  Files          35       36       +1     
  Lines        5245     5432     +187     
==========================================
+ Hits         4214     4420     +206     
+ Misses       1031     1012      -19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@thierry-martinez thierry-martinez merged commit ed7de34 into TeamGraphix:master May 21, 2025
20 checks passed
@thierry-martinez thierry-martinez mentioned this pull request Oct 1, 2025
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.

3 participants