Skip to content
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

Allow overview lessons #496

Merged
merged 42 commits into from
Sep 1, 2023
Merged

Allow overview lessons #496

merged 42 commits into from
Sep 1, 2023

Conversation

zkamvar
Copy link
Contributor

@zkamvar zkamvar commented Aug 8, 2023

WIP for processing workshop overview lessons

part of carpentries/workbench#65

Because the overview lessons usually have child files, I'm going to want to merge #499 and test it before I merge this PR

This will address carpentries/workbench#65
by adding fallbacks to the episodes directory criteria. I've added the
other directories we expect so that when the episodes directory does not
exist (in the case of overview pages), then we can check that the site
directory or any of the other directories exists.

I had initially attempted this by setting the config.yaml as the
criteria, but I forgot that I had also copied the config.yaml over to
the site/built folder, so there were a lot of failures from this one
change because it was getting confused where the root of the project.

Another tactic I considered was to check if `.git/` was a directory, but
then I realized this wouldn't work for submodules.
but now everything fails because I deemed it to oh well
This is causing {renv} to be angry
I've also removed the percent calculation from this function as we no
longer use it anymore
 - consolodated `not_overview` control structures
 - removed unused `chapters` variable
 - added catch for `build_home()` and `progress`
It turns out that if there is _extra_ metadata, it will be carried over
into the next lesson as the metadata is not cleared. This puts a patch
for the most important ones, but I am going to need to include something
that clears out the old metadata within the lesson validation process.
The underlying functions were already vectorized, so it makes sense that
we can do that here and reduce the need for external for/vapply loops
This was a manual process in build_markdown() that was taking valuable
mental real-estate and it was frustrating to read because when I would
look at it, it didn't immediately tell me what it was doing (copy all
assets related to the build including non-markdown files and folders).

With the addition of the overview pages, it was time to move this into a
function so that I could have a bit more room to be verbose about what I
was doing without distracting from build_markdown().
@zkamvar
Copy link
Contributor Author

zkamvar commented Aug 22, 2023

@zkamvar
Copy link
Contributor Author

zkamvar commented Aug 24, 2023

Note: this is failing in the integration test: https://github.com/carpentries/workbench-integration-test/actions/runs/5967780296/job/16190177667

The issue is that it was installing the dev version of pegboard, but not the pr version.

@zkamvar zkamvar marked this pull request as ready for review August 29, 2023 21:56
@zkamvar
Copy link
Contributor Author

zkamvar commented Sep 1, 2023

I am running one final test for this on the workbench integration test and then I will merge. Will deploy next week.

@zkamvar zkamvar merged commit 783486f into main Sep 1, 2023
12 checks passed
@zkamvar zkamvar deleted the allow-overview-lessons branch September 1, 2023 19:08
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.

1 participant