Changes
@Tina815 已经在做这个了。
开始于 2025年11月19日。
评估
这个 Issue 还没有评估数据。
描述
Suggested changes:
- Add package requirements in README file. The gradethis package needs to be installed from github because of R 4.4.2 PWB compatibility
- install.packages("reticulate")
- devtools::install_github("rstudio/gradethis")
- Add Python venv creation in README file. You can link my repo https://github.com/Public-Health-Scotland/vscode_prep
- You need to create your Python venv environment. Remember the name and path location
- Specify your Python version and package ones too (For compatibility purposes) e.g. pip install pandas==2.3.1
- Change the logo for a png with transparent background (to be compatible with dark mode). You can do for the other images too
- Remove all the install.packages comments from intro.Rmd. They should be in README
- You need to use Sys.unsetenv("RETICULATE_PYTHON") in your intro.Rmd r setup chunk before library(reticulate). I noticed reticulate has been set as a environment variable (ONLY for PWB). If you will publish on shiny app you need to comment that line.
- You have to use reticulate to create your Python environment (PWB or shiny app). This package will detect if it is already created and skip the creation.
# Sys.unsetenv("RETICULATE_PYTHON")
library(learnr)
library(gradethis)
library(reticulate)
knitr::opts_chunk$set(echo = FALSE)
tutorial_options(
exercise.checker = gradethis::grade_learnr
)
reticulate::virtualenv_create(envname = "pyenv")
reticulate::virtualenv_install("pyenv", packages = c("pandas==2.3.1"))
reticulate::use_virtualenv("pyenv", required = TRUE)
- You can add dark theme feature for accessibility purposes. You have to modify your CSS file and add these lines of code at the button part. A CSS file has the capability to detect your browser windows theme preference. You have to add the rest of your CSS elements depending on the theme light/dark.
@media (prefers-color-scheme: dark) {
body {
background-color: #121212;
color: #ffffff;
}
}
@media (prefers-color-scheme: light) {
body {
background-color: #ffffff;
color: #000000;
}
}
- 主要语言
- R
- 星标
- 0
- 派生
- 1
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Public-Health-Scotland/python-training 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 45/100
-
bug
难度 4/5 3-5 天 新手友好度 45/100
-
enhancement
难度 3/5 1-2 天 新手友好度 48/100
-
bug enhancement
难度 3/5 1-2 天 新手友好度 35/100
-
bug enhancement
难度 5/5 一周以上 新手友好度 15/100
查看 Public-Health-Scotland/python-training 的全部 Issue
相似的 Issue
-
bug new windows
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
Python can't be used from R for Windows on ARM64 because the architecture check returns "Unknown"未关闭
难度 2/5 1-3 小时 新手友好度 72/100
rstudio/reticulate#1934 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 65/100