Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear how to configure Python environment for Quarto template #10

Open
geoffreyyip opened this issue Oct 1, 2023 · 5 comments
Open

Comments

@geoffreyyip
Copy link
Member

geoffreyyip commented Oct 1, 2023

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 #11

@kbjarkefur
Copy link
Member

kbjarkefur commented Oct 2, 2023

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
Copy link
Member Author

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
Copy link
Member

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
Copy link
Contributor

BBieri commented Oct 3, 2023

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
Copy link
Member Author

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants