-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add a "no quizzes" handling ability as well as some merge conflict resolutions #480
Conversation
No spelling errors! 🎉 |
Re-rendered previews from the latest commit:
Updated at 2022-02-18 with changes from ea83b43 |
This will not work before |
…nsavvy/no-quiz-option
run: | | ||
git config --local user.email "actions@github.com" | ||
git config --local user.name "GitHub Actions" | ||
git remote set-url origin https://${GH_PAT}@github.com/${GITHUB_REPOSITORY} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This gives the render permission to push straight to main
@@ -138,6 +143,10 @@ jobs: | |||
# Create screenshots | |||
- name: Run the screenshot creation | |||
run: | | |||
# Remove old folder | |||
rm -rf resources/chapt_screen_images |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ensures a refresh of the images each time so no old files hang around
@@ -147,6 +156,16 @@ jobs: | |||
run: rm -rf manuscript/ | |||
|
|||
- name: Run ottrpal::bookdown_to_embed_leanpub | |||
if: needs.yaml-check.outputs.toggle_quiz_check == 'no' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If quizzes aren't being checked here, we can set quiz_dir = NULL and assume there are not quizzes here.
@@ -184,15 +205,17 @@ jobs: | |||
|
|||
# Run Coursera version | |||
- name: Convert Leanpub quizzes to Coursera | |||
if: needs.yaml-check.outputs.toggle_leanpub == 'yes' | |||
if: needs.yaml-check.outputs.toggle_leanpub == 'yes' && needs.yaml-check.outputs.toggle_quiz_check == 'yes' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This step for coursera is really only needed if there's quizzes AND if Leanpub is being published.
runs-on: ubuntu-latest | ||
file-quizzes-pr: | ||
name: File _Quizzes Transfer PR | ||
needs: [yaml-check] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wasn't running properly because I forgot to specify it needed yaml-check
@@ -54,7 +54,7 @@ if (is.null(opt$base_url)) { | |||
base_url <- cow::get_pages_url(repo_name = opt$repo, git_pat = opt$git_pat) | |||
} | |||
|
|||
chapt_df <- ottrpal::get_chapters(base_url = file.path(base_url, "no_toc")) | |||
chapt_df <- ottrpal::get_chapters(base_url = file.path(base_url, "no_toc/")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This /
is needed or else the image names get messed up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It all looks good! but we are getting rid of the template quizzes?
Ah, that was to test that it would work without quizzes, but I will restore them now. |
sounds good! |
Also when we go with "their" history - is that the main branch history? |
Yes. Honestly the main issues come up with binary files like .docx and .rds files. Now I'm wondering if we should default on keeping the current branch's though so |
hmmm good question. I think I agree that |
Yes, I think I agree. Will switch |
Purpose/implementation Section
What changes are being implemented in this Pull Request?
Addresses #478 which involves allowing render-all to run but skip handling quizzes.
This is needed for folks who never want quizzes, or if they want their quizzes to be hidden aka they will use a
_Quizzes
repository.There are other little bugs and things that I found needed polishing. See the comments I made for explaining each add.
I've been testing these on https://github.com/jhudsl/Adv_Reproducibility_in_Cancer_Informatics/ and https://github.com/jhudsl/Reproducibility_in_Cancer_Informatics/ by sending the changes individually to those repos.
If we think this is reasonable, I think we should send out a sync with these changes right away because it does solve a lot of those merge conflict problems that we inconsistently encounter on various repos.