2bndy5 / sphinx-social-cards

A Sphinx extension that generates images for social media cards.
https://2bndy5.github.io/sphinx-social-cards/
MIT License
0 stars 0 forks source link

switch to Pyside6 #11

Closed 2bndy5 closed 1 year ago

2bndy5 commented 1 year ago

The main change that everything is centered around is moving to PySide6. This removes the dependency on ImageMagick to handle SVG files because PySide6 is much more consistent and reliable (and faster than using CLI). Additionally, using PySide6 also replaces the need for pillow as a image processing library.

Breaking changes

  1. Jinja syntax is customized to be YAML friendly. Now also includes a yaml filter to represent complex color specs in layouts/templates.
  2. Solid colors are validated using pydantic_extra_types
  3. Colors from mkdocs-material (fetched from sphinx-immaterial html_theme_options) are only used during config loading. This means that any colors specified in layout and the social_cards config must be valid RGB/HSL strings or known color names
  4. Re-prioritized rectangles to be rendered before ellipses
  5. Polygon's points are clamped to layer size while also respecting any border specified
  6. Renamed validators.base_model module to common.py as it houses all commonly used/referenced models in other validator modules.

Other changes

codecov-commenter commented 1 year ago

Codecov Report

Merging #11 (c30673c) into main (c036986) will increase coverage by 1.28%. The diff coverage is 99.67%.

@@            Coverage Diff             @@
##             main      #11      +/-   ##
==========================================
+ Coverage   98.14%   99.43%   +1.28%     
==========================================
  Files          14       14              
  Lines        1187     1418     +231     
==========================================
+ Hits         1165     1410     +245     
+ Misses         22        8      -14     
Files Changed Coverage Δ
src/sphinx_social_cards/validators/layers.py 98.00% <92.59%> (-2.00%) :arrow_down:
src/sphinx_social_cards/colors.py 100.00% <100.00%> (ø)
src/sphinx_social_cards/fonts.py 98.92% <100.00%> (+0.07%) :arrow_up:
src/sphinx_social_cards/generator.py 100.00% <100.00%> (+0.33%) :arrow_up:
src/sphinx_social_cards/images.py 99.14% <100.00%> (+10.59%) :arrow_up:
src/sphinx_social_cards/validators/__init__.py 98.55% <100.00%> (+0.39%) :arrow_up:
src/sphinx_social_cards/validators/common.py 100.00% <100.00%> (ø)
src/sphinx_social_cards/validators/contexts.py 100.00% <100.00%> (ø)
src/sphinx_social_cards/validators/layout.py 100.00% <100.00%> (ø)