Skip to content

Create rmd.yml #50

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

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from
Draft

Create rmd.yml #50

wants to merge 22 commits into from

Conversation

tschm
Copy link
Contributor

@tschm tschm commented Apr 4, 2025

Convert all notebooks into rmd files and publish them on a separate branch. Do not remove the rmd files from the main branch yet.

PR Order

Convert all notebooks into rmd files and publish them on a separate branch
@tschm
Copy link
Contributor Author

tschm commented Apr 4, 2025

The generated rmd files can be seen here: https://github.com/tschm/ISLP_labs/tree/rmd-files

@jonathan-taylor
Copy link
Collaborator

jonathan-taylor commented Apr 9, 2025

So, the idea is to run this action on a commit or tag and have these automatically generated? That seems fine, then we can leave a link in the README.md to this branch?

This makes sense as it will really make the .ipynb the single source as opposed to having both in the repo. I imagine most people in the course are simply going to use .ipynb

@tschm
Copy link
Contributor Author

tschm commented Apr 10, 2025

There is also a new release job. Go to

Actions => Bump version and publish (on left).

It will introduce a new tag and a release.

@jonathan-taylor
Copy link
Collaborator

jonathan-taylor commented Apr 10, 2025 via email

@tschm
Copy link
Contributor Author

tschm commented Apr 11, 2025

@jonathan-taylor So, I have never worked with Rmd files. I assume you can run them using RStudio? However, the files (e.g. auto.csv, etc.) are not copied with them to the new branch. I think it would be good if we put all files needed by the notebooks into a folder data and copy this folder also for the “rmd-files” branch?

@jonathan-taylor
Copy link
Collaborator

jonathan-taylor commented Apr 11, 2025 via email

@tschm
Copy link
Contributor Author

tschm commented Apr 11, 2025

@jonathan-taylor I am introducing a “data” folder and copy it over during ci/cd. Currently the tests are running.

tschm added 4 commits April 13, 2025 15:17
# Conflicts:
#	Ch02-statlearn-lab.ipynb
#	Ch03-linreg-lab.Rmd
#	Ch04-classification-lab.Rmd
#	Ch05-resample-lab.Rmd
#	Ch06-varselect-lab.Rmd
#	Ch07-nonlin-lab.Rmd
#	Ch08-baggboost-lab.Rmd
#	Ch09-svm-lab.Rmd
#	Ch10-deeplearning-lab.Rmd
#	Ch10-deeplearning-lab.ipynb
#	Ch11-surv-lab.Rmd
#	Ch12-unsup-lab.Rmd
#	Ch13-multiple-lab.Rmd
@tschm tschm marked this pull request as draft April 13, 2025 19:03
@tschm
Copy link
Contributor Author

tschm commented Apr 15, 2025

I have added an example how I think about using the ipynb files as templates. I have added the file ChXX (you can remove it later) with {{ author }} somewhere in a Markdown cell. I then have two different config files. One for rmd files and one for LaTeX files. In render.py I use Jinja to inject the desired values. Please check the rmd files branch in my fork of your repo to see the results... Please try to merge #61 and #65

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.

2 participants