PumasAI / QuartoNotebookRunner.jl

MIT License
61 stars 8 forks source link

support REPL modes #121

Closed MHellmund closed 4 months ago

MHellmund commented 5 months ago

support REPL help-, shell-, and pkg-mode, similar to IJulia for one-line input cells only,
see https://github.com/PumasAI/QuartoNotebookRunner.jl/issues/56

Examples:

```{julia}
;ls
```

```{julia}
?for
```

```{julia}
]status
```
MichaelHatherly commented 4 months ago

Thanks @MHellmund. This'll need some tests prior to merging. Let me know if you're unsure at all about the test folder structure.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.33%. Comparing base (a003fa8) to head (de4f669).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #121 +/- ## ======================================= Coverage 87.33% 87.33% ======================================= Files 5 5 Lines 663 663 ======================================= Hits 579 579 Misses 84 84 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

MHellmund commented 4 months ago

I added a test. I had to add REPL to test/Project.toml. Without it, the test produces an error: repl_modes.docx ?

MHellmund commented 4 months ago

New version still operates on with the code string, but more efficient; problem with missing REPL module solved (thanks!). The old version allowed whitespace in front of '?' and ';' . Since the REPL itself doesn't, I changed that.