mrz1988 / lilies

A cross-platform colored text formatting tool for the command line
MIT License
0 stars 0 forks source link

Rebuild coloring engine: Phase 1 #40

Closed mrz1988 closed 5 years ago

mrz1988 commented 5 years ago

This lays all of the ground work to broaden lilies into modern terminal coloring. This will support 256 color, true color, and a wide variety of compatibility versions to attempt to smooth over ALL coloring to the best approximation.

In phase 1, the goal is to make no actual changes to the lilies core, but only lay ground work. We start to add some basic terminal detection, then begin to flesh out the differences in these terminals. Phase 1 only includes only basic terminal support including no colors and ANSI-based 8-colors, but provides a lot of the ground work for all other coloring definitions, including a set of 256 color names.

The goal of this PR is to add and test all-new color rendering tools as a proof of concept, and Phase 2 will add support for as many new terminal rendering engines as possible. The integration into the Lilies core won't happen until Phase 3.

codecov-io commented 5 years ago

Codecov Report

Merging #40 into master will increase coverage by 5.19%. The diff coverage is 92.41%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #40      +/-   ##
========================================
+ Coverage    77.8%    83%   +5.19%     
========================================
  Files          10     16       +6     
  Lines         802   1106     +304     
  Branches      132    189      +57     
========================================
+ Hits          624    918     +294     
- Misses        160    161       +1     
- Partials       18     27       +9
Impacted Files Coverage Δ
lilies/style/styles.py 100% <100%> (ø)
lilies/terminal/exceptions.py 100% <100%> (ø)
lilies/terminal/ansicodes.py 100% <100%> (ø)
lilies/terminal/ansi8.py 81.81% <81.81%> (ø)
lilies/style/colors.py 90.24% <90.24%> (ø)
lilies/terminal/detect.py 92.2% <92.2%> (ø)
lilies/style/parse.py 96.42% <96.42%> (ø)
lilies/terminal/base.py 96.87% <96.87%> (ø)
lilies/__main__.py
lilies/colors.py
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b71bf44...9002252. Read the comment docs.