google / gf180mcu-pdk

PDK for GlobalFoundries' 180nm MCU bulk process technology (GF180MCU).
https://gf180mcu-pdk.rtfd.io
Apache License 2.0
364 stars 53 forks source link

doc: switch to sphinxcontrib.rsvgconverter #87

Closed proppy closed 1 year ago

proppy commented 1 year ago

Apparently the pdf build failure (see https://github.com/google/gf180mcu-pdk/issues/82#issuecomment-1284785504) makes the final RTD documentation push fails.

Fixes #82 (hopefully)

Also enabled PDF build in https://readthedocs.org/dashboard/gf180mcu-pdk/advanced/ image

TEST=https://gf180mcu-pdk--87.org.readthedocs.build/en/87/digital/Digital.html

/cc @cbalint13 @mkkassem

proppy commented 1 year ago

curious if @umarcor has guidance on the proper way to test readthedocs changes extensively, so that we can prevent this from happening again (pdf changes that break the html publication); found the following actions that could be useful:

cbalint13 commented 1 year ago

curious if @umarcor has guidance on the proper way to test readthedocs changes extensively, so that we can prevent this from happening again (pdf changes that break the html publication); found the following actions that could be useful:


@umarcor @proppy

To sum experience up so far:

Lets see if this sphinxcontrib.rsvgconverter now invokes proper tools (other than imagemagick). In case this here works, the trick can be enabled on skywater too, generated images would be smoother (as per the docs).

proppy commented 1 year ago

Expicit sphinx-svg2pdfconverter request still not pick up inkscape but convert, probably their docker https://github.com/readthedocs/readthedocs-docker-images/issues/70

my understanding (from reading https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter#installation) is that inkscape would only get picked if you add sphinxcontrib.inkscapeconverter to the extensions.

Here we add sphinxcontrib.rsvgconverter which seems to depends on rsvg-convert which has been added to their image w/ https://github.com/readthedocs/readthedocs-docker-images/pull/79.

proppy commented 1 year ago

can't imagine how to "automate" in PR stage.

what I was thinking is that we could mimic what the readthedocs integration is doing in an action (i.e: run the same command on top of the same container image) to proof test our changes.

cbalint13 commented 1 year ago

can't imagine how to "automate" in PR stage.

what I was thinking is that we could mimic what the readthedocs integration is doing in an action (i.e: run the same command on top of the same container image) to proof test our changes.

@proppy

uhh,

We could check / or ask them (rthdocs) why in PR stage the PDF generation is disabled. If there is no other way then yes a parallel docker build might be ultimate just to have PDF build feedback.

proppy commented 1 year ago

Q: Does that "PDF Enable" activated PDF builds too in open PR stage ?

It doesn't seems so, I suspect it's overridden by whatever is is .readthedocs.yaml.

umarcor commented 1 year ago

@proppy see:

See also manual equivalents (without using an Action):

cbalint13 commented 1 year ago

@proppy ,

Bit more on SVG backend related:

$ rsvg-convert -v rsvg-convert version 2.54.5


* I am using these build varieties to native rpm packages: https://copr.fedorainfracloud.org/coprs/rezso/VLSI/build/4962277/

---

Sticking to ```sphinx.ext.imgconverter``` (native, not ```contrib```) always works with ```imagemagick``` & ```inkscape```  (required).
The best would be in future to avoid  trow such SVG (not so legit ones) to latex/sphinx flow, we could fix that in the future.

Thanks a lot for helping,
~Cristian.