Changelog
Source:NEWS.md
pegboard 0.7.7 (2024-11-11)
NEW FEATURES
- Add support and validation for
caution
fenced divs introduced in https://github.com/carpentries/varnish/pull/149 (@froggleston #160)
pegboard 0.7.6 (2024-06-25)
BUGFIX
- Hotfix for {tinkr} upcoming bump to 0.3.0 that changes yarn$show() arguments: https://github.com/ropensci/tinkr/pull/108. (reported @froggleston https://github.com/carpentries/pegboard/issues/156, fixed: @froggleston, #157)
- Remove support and checks for Windows R 3.6
pegboard 0.7.5 (2024-04-10)
NEW FEATURES
- Add support for tabbed content in lessons (reported: @astroDimitrios, implemented: @astroDimitrios, @froggleston, https://github.com/carpentries/pegboard/pull/148
https://github.com/carpentries/sandpaper/pull/571, https://github.com/carpentries/varnish/pull/121, ).
pegboard 0.7.4 (2024-03-06)
BUGFIX
- Hotfix for R 4.3.3 bump that results in trailing commas in glue function causing argument errors: https://github.com/tidyverse/glue/issues/320 (reported: @ns-rse, #149; fixed: @Bisaloo, #150). Required for sandpaper CSS fix
pegboard 0.7.3 (2023-11-22)
DOCUMENTATION
- New
vignette("intro-lesson", package = "pegboard")
provides information about working withpegboard::Lesson
objects. - Documentation for
Episode
andLesson
objects have been updated to be a bit more descriptive and point to the vignettes.
pegboard 0.7.2 (2023-11-17)
BUGFIX
-
validate_links()
now differentiates between links and images in reporting (reported: @joelnitta, #143; fixed: @zkamvar, #144)
pegboard 0.7.1 (2023-10-03)
- child chunk options that would fail out of context no longer cause a failure. (reported: @trhallam, https://github.com/carpentries/workbench/issues/74, #139; fixed: @zkamvar, #140)
pegboard 0.7.0 (2023-10-02)
This release introduces automated processing of {knitr} child files, which enables them to be automatically available for validation and processing.
NEW FEATURES
-
Episode
class objects gain thechildren
,parents
, andbuild_parents
fields which will contain the known relationships between files. Bothchildren
andparents
represent immediate relationships whilebuild_parents
represent the most distant ancestor of the object that would trigger it to build. Note that theparents
fields are only populated for anEpisode
in the context of aLesson
object. -
Lesson
class objects gain thechildren
field which is a list that storesEpisode
objects derived from child files. -
Episode
objects gain the$has_parents
active binding reporting if the object has a parent object. This is only used in the context of aLesson
. - Both
Episode
andLesson
objects gain the$has_children
active binding, reporting if there are any child episodes in the lesson or episode. -
Lesson
objects gain the$trace_lineage()
method to return the absolute paths to all child files from the source path of a given episode if they exist. -
make_link_table()
now has a new column calledparents
which contains a list column of the parents (if any) of the files checked -
$validate_links()
,$validate_divs()
, and$validate_headings()
will now all process child files by default. Note that$validate_links()
will report missing files relative to the build parents.
pegboard 0.6.1 (2023-09-06)
NEW FEATURES
-
$validate_divs()
method now recognises thespoiler
class of fenced divs which allow optional/expandable items that are not automatically shown to the learner (implemented: @tobyhodges, #134)
pegboard 0.6.0 (2023-08-29)
NEW FEATURES
- Workshop overview pages are now able to be processed into
Lesson
objects. For Jekyll- based lessons, the directory name must end with-workshop
(as is the standard for workshop overview lessons without episodes), for sandpaper- based lessons, theconfig.yaml
file must contain theoverview: true
tag (reported: @zkamvar, #118; fixed: @zkamvar, #132, reviewed by @klbarnes20). These pages are indicated by the$overview
field in theLesson
object. For lessons that are not workshop overview lessons, nothing will change.
pegboard 0.5.3 (2023-07-08)
BUG FIX
-
$validate_links()
no longer throws an error when there are HTML images embedded in comments (reported: @beastyblacksmith, #130; fixed: @zkamvar, #131, reviewed by @ErinBecker) - (transition)
$move_objectives()
and$move_questions()
methods no longer place these blocks as the second element in the markdown. This was originally implemented when we thought {dovetail} would be our solution to the lesson infrastructure (and thus needed a setup chunk before any blocks). - (transition) liquid-formatted links with markdown inside them are now parsed correctly. This leads lessons to be more accurately transitioned to use {sandpaper} (reported: @uschille, https://github.com/carpentries/lesson-transition/issues/46; fixed: @zkamvar, #121)
- (transition) images with kramdown attributes that are on a new line are now more accurately transitioned to use {sandpaper} (reported: @uschille, https://github.com/carpentries/lesson-transition/issues/46; fixed: @zkamvar, #121)
pegboard 0.5.0 (2023-03-31)
NEW FEATURES
-
Lesson
object validators now validate non-episode files (reported: @zkamvar #110; fixed: @zkamvar #113). -
$validate_links()
will now respect links to anchors in spans. - validators will no longer truncate on GitHub actions (reported: @zkamvar #111, fixed: @zkamvar: #114).
- validators will provide full context for invalid links (not just link or text, but link with text).
DEPENDENCIES
- tinkr’s minimum version has been set to 0.2.0 to recognise the release to CRAN and bring in new bugfixes.
pegboard 0.4.3 (2023-01-26)
BUG FIX
- A bug where attributes following an image would cause missing alt text to not be reported was fixed. (discovered: @dpshelio and @karenword; reported: @zkamvar #106; fixed: @zkamvar #108). This fix also makes the alt text parsing and validation more robust
- A bug where an unknown protocol was not recognised as invalid was fixed. (discovered: @ndporter; reported: @zkamvar, #107; fixed: @zkamvar, #109)
INTERNALS
- New internal function
find_between_nodes()
will get all nodes between two sibling nodes.
pegboard 0.4.2 (2023-01-10)
TESTS
- A test that depended on an upstream resource was once again fixed.
- Tests were modified to account for a new case for image fixing.
DOCUMENTATION
- Internal
fix_links()
function has improved documentation.
pegboard 0.4.0 (2023-01-06)
DEPENDENCIES
- The {tinkr} minimum version has been upgraded to 0.1.0.9000 to address the square bracket protection implemented in that version.
pegboard 0.3.2 (2022-09-14)
DEPENDENCIES
- Soft dependencty {cli} has been recommended at 0.3.4 to prevent reporting issues (see #97)
- Soft dependencies ggraph, ggplot2, and tidygraph have been removed. These dependencies were only needed for producing a now-out-of-date survey document
pegboard 0.3.1 (2022-08-16)
MISC
In preparation for {tinkr} 0.1.0, which changes the path of the default stylesheet, we are using the tinkr::stylesheet()
convenience function to access it.
pegboard 0.3.0 (2022-05-25)
NEW FEATURES
Episode class objects
-
$summary()
method which can summarise counts of elements in the episode. - fixes for
$error
and$output
active bindings - new
$warning
active binding that will show code blocks with thewarning
class.
Lesson class objects
- new public field “built” that will contain XML representations of markdown files built from RMarkdown files in sandpaper lessons.
- new public field “sandpaper” is a boolean that indicates if a lesson can be built with sandpaper.
- new
$load_built()
method will load the built files if they exist in a sandpaper lesson. - new
$get()
method which will get any element from any Episode class object contained within. - new
$summary()
method which will call the$summary()
method for any Episode class object.
Messages
-
muffle_messages()
is an internal function that will muffle any messages that originate from the {cli} or {pegboard} packages. - If the {cli} package is not available, messages will have the class of
pbMessage
, which will allow end users/package authors to catch and manipulate any messages that originate from {pegboard}
pegboard 0.2.7 (unreleased, no user-visible changes)
TRANSFORMATION
-
make_pandoc_alt()
(an internal converter function) will no longer create alt text from a caption if it contains a URL. This messes with the downstream validation of image links. -
fix_sandpaper_links()
now also fixes links that use{{ site.baseurl }}
.
pegboard 0.2.6 (2022-05-11)
BUG FIX
-
fix_links()
now processes links in headers and links with unescaped ampersands- internal function
text_to_links()
now processes unescaped ampersands - internal function
find_lesson_links()
no longer expects links to be strictly in paragraph elements.
- internal function
pegboard 0.2.5 (2022-05-10)
MISC
-
validate_links()
will no longer flagalt=""
as errors. These indicate decorative images. That being said, these should be rare in our lessons, but this is here just in case it’s needed. Source: https://webaim.org/techniques/alttext/#decorative
pegboard 0.2.4 (2022-02-25)
DEPENDENCIES
- The {fs} package needs to be >= 1.5.0 (#83, @sstevens2)
pegboard 0.2.2 (2022-02-23)
pegboard 0.2.1 (2022-02-18)
MISC
- The inline messages for link validation errors are more verbose (@tobyhodges, #79)
pegboard 0.2.0 (2022-02-17)
NEW FEATURES
-
validate_divs()
will validate that the divs in an Episode are ones we expect.
pegboard 0.1.0 (2022-02-01)
This is a soft release of {pegboard} to coincide with the first announcement of The Carpentries Workbench.
IMPORTS
- {lifecycle} is no longer an imported package. We were not using it, so it makes more sense to leave it out in production.
BUG FIX
-
get_list_block()
will now select the last block if there are multiple “keypoints” blocks (@zkamvar, #75) -
get_list_block()
will now throw a warning if a block does not contain any list elements (@zkamvar, #74)
pegboard 0.0.0.9031
BUG FIX
Images that had attributes added are now post-processed in use_sandpaper()
and will retain their original attributes.
pegboard 0.0.0.9026
BUG FIX
- We now use the
_config.yml
file to parse site-specific liquid template links to fix #60
pegboard 0.0.0.9024
NEW FEATURES
-
Episode$handout()
will create trimmed-down R Markdown document with only challenge blocks and code chunks withpurl = TRUE
, that can be passed toknitr::purl()
for processing into an R code handout. -
Lesson$handout()
will create a concatenated version ofEpisode$handout()
.
pegboard 0.0.0.9023
MISC
- validation messages have been revamped to be more consistent across messages.
- All validation methods in
Episode
andLesson
now return data frames that contain detailed information for each element and what tests were passed and what were failed for downstream analysis. Importantly, they all will contain a column called “node”, which points to the exact XML node containing the link/image/heading for inspection/manipulation. - validation reporting is no longer grouped by error
- link validation information has been switched to show the error message and then the problematic aspect/fix
- heading validation now works on continuous integration
- these functions no longer rely on dplyr being installed
pegboard 0.0.0.9022
NEW FEATURES
- The
Episode
class now gains the$confirm_sandpaper()
method to bypass the assumption that all Episodes start as kramdown-formatted documents and will attempt to label divs in the episode (with a warning if there is no success). - The
Lesson
class will now run the$confirm_sandpaper()
method for all markdown files ifjekyll = FALSE
. -
Lesson$new()
will now default to the current working directory.
MISC
- The internal
get_list_block()
will no longer auto-label divs.
pegboard 0.0.0.9021
NEW FEATURES
- Link validation now checks for more general uninformative link text and empty links (@zkamvar, #49)
-
make_link_table()
will treat linebreaks in link text as a space character.
pegboard 0.0.0.9019
NOTE: All of these are from (@zkamvar, #44)
NEW FEATURES
- The Episode class now has the
$links
and$images
active bindings that extracts the links and images (markdown and HTML) from the document. -
make_link_table()
creates a table of links parsed viaxml2::url_parse()
with additional information about caption and alternative text (for images). - The Episode class now has the
$validate_links()
method, which will validate links and images for common errors such as not using https and unresolved relative links. -
Episode$use_sandpaper()
now converts images to use alt text over captions. Images that had![alt](link)
are converted to![](link){alt='alt'}
because pandoc uses everything in square brackets to be caption text. NOTE: this now makes a copy of the XML document.
BUG FIXES
-
Episode$new()
gains the argumentfix_liquid
, which fixes liquid variables in relative links before they are passed to {tinkr} (https://github.com/carpentries/pegboard/issues/46) - Post-processed links via
fix_links()
retains theirsourcepos
attribute (fixed in e5508cc9c9a3821381293bdac12647edfbc0608e). -
Episode$lesson
no longer assumes that the episode is inside a sub-folder (fixed in 63432ef83ecc41a6aab53fe768e8eaec107278d5).
pegboard 0.0.0.9014
- Innocent block quotes that have not been sullied by the ruthless kramdown postfix operators are kept as block quotes instead of failing on
$unblock()
conversion.
pegboard 0.0.0.9012
- Lesson class will now work with {sandpaper} (#24) with a new parameter
jekyll
- Episode class gains new slot called
extras
to handle the sandpaper non-episodic things - A better error message is thrown with
Episode$label_divs()
.
pegboard 0.0.0.9011
- Swap {git2r} dependency for {gert}, which has a smoother interface and matches with the dependencies of {sandpaper}.
pegboard 0.0.0.9010
- Missing questions, objectives, or keypoints will no longer fail with a cryptic error. An informative warning will be thrown and an empty character vector will be returned. This addresses an issue in {sandpaper}: https://github.com/carpentries/sandpaper/issues/79
- The URI for pegboard tags is now “http://carpentries.org/pegboard/”, which fixes https://github.com/carpentries/pegboard/issues/18
pegboard 0.0.0.9009
- Several Bug fixes, see https://github.com/carpentries/pegboard/pull/21 for details.
- Travis hopefully banished
pegboard 0.0.0.9008
-
$label_divs()
no longer modifies the fenced divs. -
@dtag
labels attached tohtml_block
andparagraph
elements are now replaced by<dtag>
elements that live within a custom namespace called “pegboard”. This allows us to avoid manipulating the document paragraph structure in the case of fenced divs. -
$get_divs()
now includes the div tags/fences in the output. - Internally, namespace handling has gotten marginally better where the default namespace prefix is modified to
md:
. - fenced divs are no longer manipulated on labelling.
- A new test expectation,
expect_moved_yaml()
tests that a yaml element was successfully moved to the body of the document.
pegboard 0.0.0.9007
-
$keypoints
and$objectives
now are available and act like$questions
- The
$move_*()
methods will now add an h2 header to the block - The
$move_*()
methods will use pandoc syntax instead of html div blocks. - Internal changes to creation of elements no longer relies on complex namespace juggling
pegboard 0.0.0.9006
-
$label_divs()
method now will label any div tags in the episode -
$move_*
methods will now auto-label div tags -
$questions
field now returns the questions block or yaml header as a character vector.
pegboard 0.0.0.9005
- pandoc-style fenced divs are now processed the same as native div tags
-
@dtag
labels are now in the formatdiv-{n}-{class}
where {n} is the sequential number in the document and {class} is the type of div. - labelling of
@dtags
is more straightforward and will label the tags sequentially.
pegboard 0.0.0.9004
The changes in this version largely are enhancements for handling div tags and conversion. See #9 for details
-
$unblock()
defaults to converting to div tags unless$use_sandpaper()
has been called. -
$unblock()
will auto-name ALL the divs with {class}-div-{number} -
$move_*
functions will now name the html_blocks -
$get_divs()
returns div tags in a named list -
$challenges
will now find either blocks, divs or code, depending on the mutations -
$soltuions
same as challenges (see above) -
$use_dovetail()
will warn the user if the body is empty -
$use_sandpaper()
will do the same
pegboard 0.0.0.9003
Jekyll-specific and relative links are now converted as part of use_sandpaper()
.
NEW FUNCTION
-
fix_sandpaper_links()
will fix relative paths and jekyll-specific links inside of lessons that have not yet otherwise been converted.
pegboard 0.0.0.9002
This version introduces conversions that work together and can be chained to convert an episode from the old Jekyll style to the new {sandpaper} style. Things are still very much in development though.
- conversions for sandpaper and dovetail are clearly separated
- the Episode class understands what conversions have been performed with a private logical vector that tracks changes.
- pkgdown site is now built automatically from github actions
NEW EPISODE METHODS
-
use_dovetail()
inserts a setup chunk at the top of the file -
use_sandpaper()
converts chunks from their liquid/kramdown syntax to the commonmark or RMD syntax -
move_*()
will generate a dovetail block or just a plain div block depending on whether or notuse_dovetail()
has been called. -
remove_output()
does what it says on the tin -
remove_error()
removes error code blocks -
$output
and$error
can now grab output and error chunks that were converted viause_sandpaper()