Skip to content

Commit

Permalink
Merge pull request #8645 from PumasAI/jk/quartonotebookrunner
Browse files Browse the repository at this point in the history
Native Julia engine based on QuartoNotebookRunner.jl
  • Loading branch information
cscheid authored Apr 9, 2024
2 parents 2537808 + 082f7fe commit de208d3
Show file tree
Hide file tree
Showing 13 changed files with 826 additions and 36 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/test-smokes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
run: |
if (!requireNamespace('renv', quietly = TRUE)) install.packages('renv')
renv::restore()
# Install dev versions for our testing
# Install dev versions for our testing
# Use r-universe to avoid github api calls
try(install.packages('knitr', repos = 'https://yihui.r-universe.dev'))
try(install.packages('rmarkdown', repos = 'https://rstudio.r-universe.dev'))
Expand Down Expand Up @@ -164,7 +164,7 @@ jobs:
run: |
# Setup IJulia with the jupyter from the Python environment
# https://julialang.github.io/IJulia.jl/stable/manual/installation/
export JUPYTER=$(find $(dirname $(pipenv run which jupyter))/ -type f -name "jupyter.exe" -o -name "jupyter")
export JUPYTER=$(find $(dirname $(pipenv run which jupyter))/ -type f -name "jupyter.exe" -o -name "jupyter")
pipenv run julia --color=yes --project=. -e "import Pkg; Pkg.instantiate(); Pkg.build(\"IJulia\"); Pkg.precompile()"
echo "Julia Jupyter:"
julia --project=. -e "import IJulia;println(IJulia.JUPYTER);println(IJulia.find_jupyter_subcommand(\"notebook\"))"
Expand All @@ -174,6 +174,9 @@ jobs:
run: |
echo "QUARTO_TEST_TIMING=timing-for-ci.txt" >> "$GITHUB_ENV"
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3

- name: Run all Smoke Tests Windows
if: ${{ runner.os == 'Windows' && format('{0}', inputs.buckets) == '' && matrix.time-test == false }}
env:
Expand All @@ -197,6 +200,7 @@ jobs:
env:
# Useful as TinyTeX latest release is checked in run-test.sh
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
QUARTO_LOG_LEVEL: DEBUG
run: |
haserror=0
readarray -t my_array < <(echo '${{ inputs.buckets }}' | jq -rc '.[]')
Expand Down
5 changes: 4 additions & 1 deletion src/execute/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { mergeConfigs } from "../core/config.ts";
import { ProjectContext } from "../project/types.ts";
import { pandocBuiltInFormats } from "../core/pandoc/pandoc-formats.ts";
import { gitignoreEntries } from "../project/project-gitignore.ts";
import { juliaEngine } from "./julia.ts";

const kEngines: Map<string, ExecutionEngine> = new Map();

Expand All @@ -40,7 +41,9 @@ export function executionEngine(name: string) {
return kEngines.get(name);
}

for (const engine of [knitrEngine, jupyterEngine, markdownEngine]) {
for (
const engine of [knitrEngine, jupyterEngine, markdownEngine, juliaEngine]
) {
registerExecutionEngine(engine);
}

Expand Down
Loading

0 comments on commit de208d3

Please sign in to comment.