Opened 2 years ago

Closed 2 years ago

#29205 closed defect (fixed)

character art fails for LieAlgebra elements

Reported by: gh-mwageringel Owned by:
Priority: major Milestone: sage-9.2
Component: algebra Keywords: ascii_art, unicode_art
Cc: tscrim, vbraun Merged in:
Authors: Travis Scrimshaw Reviewers: Matthias Koeppe
Report Upstream: N/A Work issues:
Branch: 5dd390b (Commits, GitHub, GitLab) Commit: 5dd390be9548614afbca0ed56cc433c87e423841
Dependencies: Stopgaps:

Status badges

Description

sage: L.<x,y> = LieAlgebra(QQ)
sage: ascii_art(x)
...
AttributeError: 'FreeLieAlgebra.Lyndon_with_category' object has no attribute '_ascii_art_term'

This could be fixed by implementing _ascii_art_term or by implementing an appropriate fallback for cases where _ascii_art_term is not defined. The latter would be desirable in any case.

The same applies to the unicode art representation.

Change History (20)

comment:1 Changed 2 years ago by mkoeppe

  • Milestone changed from sage-9.1 to sage-9.2

Moving tickets to milestone sage-9.2 based on a review of last modification date, branch status, and severity.

comment:2 Changed 2 years ago by mkoeppe

  • Cc tscrim added

comment:3 Changed 2 years ago by tscrim

  • Dependencies set to #30119

I am doing a full overhaul of the acii and unicode art for Lie algebras.

comment:4 Changed 2 years ago by tscrim

  • Authors set to Travis Scrimshaw
  • Branch set to public/lie_algebras/fix_ascii_unicode_art-29205
  • Commit set to e2be7c452d3738a5fc6c13d07dffeab7c5b4edf3
  • Status changed from new to needs_review

Here is a branch that fixes up a bunch of issues with ascii/unicode art across the Lie algebra code and adds some improved displays.


New commits:

3433479Creating functions for converting numbers into unicode sub/superscripts.
3fc2bdbAdding support for negative numbers and superscript fractions.
830d2f1Fixing ascii/unicode art for free Lie algebras.
8710b0bAdd ascii and unicode art for compact real forms.
bcdd907Streamline repr for wrapped Lie algebra elements.
a454ac5Better ascii/unicode art representative for Lie alg w/ structure coeffs.
89182a3Unicode art for Heisenberg Lie algebras.
080907eUnicode art for rank 2 Heisenberg Virasoro Lie algebras.
e2be7c4Adding unicode art for Virasoro Lie algebras.

comment:5 Changed 2 years ago by git

  • Commit changed from e2be7c452d3738a5fc6c13d07dffeab7c5b4edf3 to cd7440056cd69ef10344aacf58de1d28b16a322b

Branch pushed to git repo; I updated commit sha1. New commits:

0d244b5Fixing unicode pdf build issues.
d834c56Merge branch 'public/typeset/unicode_sub_super-30119' into public/lie_algebras/fix_ascii_unicode_art-29205
cd74400Adding unicode art for affine Lie algebra elements.

comment:6 Changed 2 years ago by tscrim

I merged in the latest fixes from #30119 and added one more unicode art with fixing the generic Lie algebra element one with multiline unicode art (that is a more general problem for another day).

comment:7 Changed 2 years ago by mkoeppe

Not sure about this superscript comma.

comment:8 Changed 2 years ago by tscrim

I am not sure either. That was the best thing I could find for that one. I don't know what else to use.

comment:9 Changed 2 years ago by mkoeppe

Perhaps t⁽²⏐⁻⁴⁾ instead of t⁽²˴⁻⁴⁾, but neither is ideal.

comment:10 Changed 2 years ago by tscrim

I think the current version looks closer to a comma and is more human readable without explanation. I agree neither is ideal.

comment:11 Changed 2 years ago by mkoeppe

I agree, I just noticed that the appearance of what I suggested is very much font-dependent and not suitable.

comment:12 Changed 2 years ago by tscrim

So is this a positive review then?

comment:13 Changed 2 years ago by chapoton

is the patchbot plugin about (non-ascii characters without encoding top-line) obsolete ?

comment:14 Changed 2 years ago by git

  • Commit changed from cd7440056cd69ef10344aacf58de1d28b16a322b to 5dd390be9548614afbca0ed56cc433c87e423841

Branch pushed to git repo; I updated commit sha1. New commits:

5dd390bAdding utf-8 encoding header to files.

comment:15 Changed 2 years ago by tscrim

Probably safer just to add them.

comment:16 Changed 2 years ago by mkoeppe

Are you using u'₀' instead of '₀' to appease some style checker?

comment:17 Changed 2 years ago by tscrim

Some leftover stuff from Python2 that is ignored by Python3.

comment:18 Changed 2 years ago by mkoeppe

  • Reviewers set to Matthias Koeppe
  • Status changed from needs_review to positive_review

comment:19 Changed 2 years ago by tscrim

  • Cc vbraun added
  • Dependencies #30119 deleted
  • Priority changed from minor to major

Hi Volker, it would be nice to get this into 9.2.

comment:20 Changed 2 years ago by vbraun

  • Branch changed from public/lie_algebras/fix_ascii_unicode_art-29205 to 5dd390be9548614afbca0ed56cc433c87e423841
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.