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

Render on a separate directory #20

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Render on a separate directory #20

wants to merge 6 commits into from

Conversation

llrs-roche
Copy link
Collaborator

This works around the issue of rendering the file on the package installation directory. I think this could be the issue seen on the CI.

Note that there are two options&environmental variables to control where to copy the files and where to render the template. I hope this makes it easier on the CI than just a temporary directory for each package (my initial idea).

@llrs-roche llrs-roche requested a review from Gotfrid January 31, 2025 08:59
@Gotfrid
Copy link
Contributor

Gotfrid commented Jan 31, 2025

Hi, I installed this in a devcontainer via pak::pak('pharmar/riskreports@fix_workarounds') and now report generation fails altogether with the following error:

ERROR: NotFound: No such file or directory (os error 2): readfile '../../workspaces/pharmapkgs/_pkg_template_files/libs/quarto-html/quarto.js'
Path: ../../workspaces/pharmapkgs/_pkg_template_files/libs/quarto-html/quarto.js

Stack trace:
Path: ../../workspaces/pharmapkgs/_pkg_template_files/libs/quarto-html/quarto.js
    at readTextFileSync (ext:deno_fs/30_fs.js:864:10)
    at Object.Deno.readTextFileSync (file:///opt/quarto/bin/quarto.js:5225:25)
    at bundleModules (file:///opt/quarto/bin/quarto.js:78339:56)
    at pandocIngestSelfContainedContent (file:///opt/quarto/bin/quarto.js:78350:11)
    at eventLoopTick (ext:core/01_core.js:175:7)
    at async file:///opt/quarto/bin/quarto.js:78511:21
    at async withTimingAsync (file:///opt/quarto/bin/quarto.js:16980:25)
    at async Object.complete (file:///opt/quarto/bin/quarto.js:78506:13)
    at async Object.onPostProcess (file:///opt/quarto/bin/quarto.js:85977:36)
    at async renderFileInternal (file:///opt/quarto/bin/quarto.js:85961:5)
Warning message:
In quarto::quarto_render(template, output_format = "all", execute_params = params,  :Error running quarto cli.
Caused by error:
! System command 'quarto' failed

I think it would be beneficial if you could write tests that run on a github runner to check if the issue is resolved. Without some kind of CI it is impossible to distinguish general problem fix from your specific environment changes (specific version of quarto, certain env variables, etc). Alternatively, please consider using a devcontainer for reproducible development.

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

Successfully merging this pull request may close these issues.

3 participants