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

Project-wide execution directory not respected #182

Open
pat-alt opened this issue Sep 12, 2024 · 3 comments
Open

Project-wide execution directory not respected #182

pat-alt opened this issue Sep 12, 2024 · 3 comments

Comments

@pat-alt
Copy link

pat-alt commented Sep 12, 2024

This might be related to quarto-dev/quarto-cli#3157: I've noted that specifying the project-wide execution directory has no effect when using the julia engine.

Example

I've added a reproducible example here. You'll notice that in _quarto.yml I specified the project directory as the execution directory. Doing so with the Jupyter kernel for Julia sets the working directory to the project root as expected, but not when using the julia engine.

Motivation

In my experience, setting the execution directory to the project root makes it easier to handle large projects (e.g. when generating package documentation using both Quarto and Documenter.jl). The reason is that in this scenario every .qmd starts from the same working directory, independent of where in the project the file is placed.

Ideal scenario

Ideally, the execution flags would also respect this global option, i.e. if I've specified execute-dir: project in my global _quarto.yml then I can specify the project directory relative to that. Suppose, for example, I have a special environment in my docs/ folder that I want to use as the default environment for all of my .qmd files inside docs/src. Then I would like to be able to simply specify exeflags: ["--project=docs/"] for all of them (so docs/ relative to the root directory as opposed to ../**/docs/ relative to the notebook).

@MichaelHatherly
Copy link
Collaborator

Yes, closely related to that upstream issue. What we can do here is support execute-dir within the frontmatter we do receive from the quarto process and execute in the directory provided.

@asinghvi17
Copy link

For what it's worth, even when I supply execute-dir in the Quarto front matter on each page, it doesn't seem to apply (using the Julia engine) either.

@MichaelHatherly
Copy link
Collaborator

Correct, execute-dir just hasn't been implemented yet anywhere in this package. Probably a relatively straightforward addition though.

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