Skip to content

Commit

Permalink
add minimal test and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
cscheid committed Aug 8, 2022
1 parent 65c8b96 commit 0580236
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ jobs:
remotes::install_local()
reticulate::virtualenv_create("r-reticulate", Sys.which("python"))
reticulate::virtualenv_install("r-reticulate",
c("docutils", "pandas", "scipy", "matplotlib",
"plotly", "psutil", "kaleido"))
c("docutils", "pandas", "scipy", "matplotlib", "ipython",
"tabulate", "plotly", "psutil", "kaleido"))
python <- reticulate::virtualenv_python("r-reticulate")
writeLines(sprintf("RETICULATE_PYTHON=%s", python),
Sys.getenv("GITHUB_ENV"))
Expand Down
17 changes: 17 additions & 0 deletions tests/testthat/resources/eng-reticulate-example.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,20 @@ import pandas as pd
pt = pd.DataFrame()
type(pt)
```

`_repr_markdown_()` methods are supported
(https://github.com/quarto-dev/quarto-cli/issues/1501):

```{python}
from IPython.display import Markdown
from tabulate import tabulate
table = [["Sun",696000,1989100000],
["Earth",6371,5973.6],
["Moon",1737,73.5],
["Mars",3390,641.85]]
Markdown(tabulate(
table,
headers=["Planet","R (km)", "mass (x 10^29 kg)"],
tablefmt="pipe"
))
```

0 comments on commit 0580236

Please sign in to comment.