LaurentRDC / pandoc-plot

Render and include figures in Pandoc documents using your plotting toolkit of choice
https://laurentrdc.github.io/pandoc-plot/
GNU General Public License v2.0
216 stars 8 forks source link

Support Asymptote diagrams #61

Closed mgajda closed 8 months ago

mgajda commented 10 months ago

Fixes #55 by adding supported for Asymptote.

LaurentRDC commented 10 months ago

Thank you for your contribution!

Can you also modify the continuous integration script to install Asymptote? You'll also need to modify the 'integration tests' step to test pandoc-plot on issue55.md

mgajda commented 10 months ago

The CI issues are with Python Bokeh. I could not find an asymptote installation GitHub action, so it is hard to test.

mgajda commented 10 months ago

@LaurentRDC I have added installation instructions for Asymptote using apt-get on Linux, Chocolatey on Windows, and Homebrew on MacOS.

Please let me know if it runs :-)

mgajda commented 10 months ago

It seems that Asymptote works on all platforms.

If you approve this and #62, I may check how much to add to MacOS tests that would still work.

mgajda commented 10 months ago

Please merge!

mgajda commented 10 months ago
  1. I have added testing of all output formats for all available toolkits.
  2. I have added declaring output format for Asymptote: PDF, EPS, and PNG work.
  3. Unfortunately SVG, JPG output do not work in default Debian installation due to stringent ImageMagick security policy.
mgajda commented 10 months ago

Previous round of tests was success with Asymptote on Mac: https://github.com/LaurentRDC/pandoc-plot/actions/runs/6174543606/job/16759375009?pr=61#step:20:175 Unfortunately the executables are undetected on Ubuntu and Windows. For unknown reasons.

mgajda commented 10 months ago

Since asymptote tests work now, I suggest we merge this, and I continue fighting CI in a separate PR.

LaurentRDC commented 10 months ago

I'm not merging until all the CI tests pass.

I committed earlier today and the tests all passed. Therefore, the source of breakage is in this PR.

Looks like some versions toolkits (e.g.MATLAB and ggplot2) installed in Github CI specifically don't support all save formats. E.g. I can save SVGs in MATLAB on my laptop, but apparently not in GitHub CI. Therefore, your update to the tests is too optimistic.

If you undo that change, I think the CI tests will all pass

mgajda commented 10 months ago

Thanks for feedback!

I agree that I should undo CI changes, and ensure all tests pass.

LaurentRDC commented 10 months ago

This is looking really good. I've made one last comment to clean up the PR a bit and remove CI debugging commands.

Once that's done, I'll merge your PR.

LaurentRDC commented 8 months ago

I'll be cleaning up the PR directly in the master branch.

Thank you for your contribution!