dime-worldbank / quarto-dime-theme

DIME theme for Quarto Reveal.js Presentations
https://dime-worldbank.github.io/quarto-dime-theme/
MIT License
10 stars 3 forks source link

Unclear how to configure Python environment for Quarto template #10

Open geoffreyyip opened 10 months ago

geoffreyyip commented 10 months ago

Hi all, I started using the Quarto DIME template and had some trouble getting the reticulate and Python packages to work on my machine. I ended up deleting the sections out from my template and once I did, the Quarto template finally compiled.

I think this should be excluded from the default template or commented out. Python package management is notoriously tricky to work with.

I'm opening up an opinionated PR to propose deleting the sections, but I imagine you all may have better ideas

Edit: Here is is https://github.com/dime-worldbank/quarto-dime-theme/pull/11

kbjarkefur commented 10 months ago

Hi @geoffreyyip , thanks for this contribution. It was not straightforward for me either to set up reticulate to make Python code run. Without making a decision on what to do, I talked about it with @BBieri who is the author.

@geoffreyyip, you are perhaps the first user of this template, and therefore I am extra interested in what would be the most helpful from your user perspective. What do you think of these options?

  1. Remove it completely like you did. Simplest solution for R users but the template is less helpful for someone also using Python
  2. Keep the lines of code in the template file but have them all be commented out. That will make the file render for pure R users, but some pointers are there for someone needing Python code.
  3. Keep it as is, but add instructions on how to set up the Python environment using reticulate

Since I am not an expert and @BBieri started a PhD we might not have time for the option that is best in the long run at this point.

I also appreciate that you sent a PR. Happy to review it but would love to hear your input on my question above first.


Edit:

  1. Create a Python template in the _alt folder, the way we have a WB template there. In the main template we can have a comment that points to this file.
geoffreyyip commented 10 months ago

I like option (2). I think giving instructions to setup Python in R is just too difficult and bespoke.

Keep the lines of code in the template file but have them all be commented out. That will make the file render for pure R users, but some pointers are there for someone needing Python code.

Option (4), keeping a separate Python template in the _alt folder, is certainly ideal! But that might be more work than you all can do right now.

kbjarkefur commented 10 months ago

Ok, lets go with (2).

@geoffreyyip , do you want to update the PR with this so that you get the contribution credits?

If you do not have time, then I can do it.

BBieri commented 10 months ago

Thanks for testing things @geoffreyyip and reporting back and to @kbjarkefur for laying out the options.

I agree with option 2 for now. I have a bit of capacity today to look at a better way to integrate Python chunks for users who may be unfamiliar with the use of Python environments. Will report back :)

geoffreyyip commented 10 months ago

@kbjarkefur I have plenty on my plate at the moment so I won't be updating the PR. But I will keep raising these issues as I come across them