diff --git a/CHANGELOG.md b/CHANGELOG.md index 0086f5114..587aad8be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [v2.25.0] - 2025-01-16 +* Bake `glossary` in `additive-manufacturing` +* Do not bake `chapter solutions` in `additive-manufacturing` +* Bake `answer key` in `additive-manufacturing` +* Add section title links to `key terms` in `additive-manufacturing` +* Remove empty `answer key` sections in `data-science` ## [v2.24.0] - 2024-10-24 diff --git a/lib/recipes/additive-manufacturing/locales/en.yml b/lib/recipes/additive-manufacturing/locales/en.yml index 44a71a347..b8e4c1ab2 100644 --- a/lib/recipes/additive-manufacturing/locales/en.yml +++ b/lib/recipes/additive-manufacturing/locales/en.yml @@ -1,7 +1,8 @@ en: eoc: review-questions: Review Questions - case-questions: Case Questions + practice: Case Questions free-response: Discussion Questions + key-terms: Key Terms exercises: exercise: Exercise diff --git a/lib/recipes/additive-manufacturing/recipe.rb b/lib/recipes/additive-manufacturing/recipe.rb index 41460ac68..3055756b9 100755 --- a/lib/recipes/additive-manufacturing/recipe.rb +++ b/lib/recipes/additive-manufacturing/recipe.rb @@ -24,6 +24,8 @@ AddInjectedExerciseId.v1(book: book) + answer_key = BookAnswerKeyContainer.v1(book: book) + book.chapters.each do |chapter| BakeNonIntroductionPages.v1(chapter: chapter) @@ -37,10 +39,13 @@ number: "#{chapter.count_in(:book)}.#{table.count_in(:chapter)}") end - BakeChapterGlossary.v1(chapter: chapter, metadata_source: metadata) + BakeChapterGlossary.v2(chapter: chapter) - eoc_with_exercise = %w[review-questions case-questions free-response] - eoc_with_exercise.each do |section_key| + eoc_sections = %w[summary + review-questions + free-response + practice] + eoc_sections.each do |section_key| MoveCustomSectionToEocContainer.v1( chapter: chapter, metadata_source: metadata, @@ -52,19 +57,40 @@ end end - selectors = 'section.review-questions, section.case-questions, section.free-response' + sections_with_module_links = %w[key-terms] + sections_with_module_links.each do |eoc_section| + MoveCustomSectionToEocContainer.v1( + chapter: chapter, + metadata_source: metadata, + container_key: eoc_section, + uuid_key: ".#{eoc_section}", + section_selector: "section.#{eoc_section}" + ) do |section| + RemoveSectionTitle.v1(section: section) + title = EocSectionTitleLinkSnippet.v1(page: section.ancestor(:page)) + section.prepend(child: title) + end + end + + selectors = 'section.review-questions, section.practice, section.free-response' chapter.composite_pages.search(selectors).injected_questions.each do |question| BakeInjectedExerciseQuestion.v1(question: question, number: question.count_in(:chapter)) end - BakeAllChapterSolutionsTypes.v1( - chapter: chapter, - within: chapter.search(selectors), - metadata_source: metadata + answer_key_inner_container = AnswerKeyInnerContainer.v1( + chapter: chapter, metadata_source: metadata, append_to: answer_key ) + + exercises = %w[review-questions practice free-response] + exercises.each do |klass| + Kitchen::Directions::MoveSolutionsFromExerciseSection.v1( + within: chapter, append_to: answer_key_inner_container, section_class: klass + ) + end end + AnswerKeyCleaner.v1(book: book) BakeFootnotes.v1(book: book) BakeIndex.v1(book: book) BakeCompositePages.v1(book: book) diff --git a/lib/recipes/data-science/recipe.rb b/lib/recipes/data-science/recipe.rb index 118ad6330..0426b50bd 100644 --- a/lib/recipes/data-science/recipe.rb +++ b/lib/recipes/data-science/recipe.rb @@ -141,6 +141,7 @@ BakeAppendix.v1(page: page, number: appendix_letter) end + AnswerKeyCleaner.v1(book: book) BakeTableColumns.v1(book: book) BakeEquations.v1(book: book) BakeIndex.v1(book: book) diff --git a/spec/recipes_spec/books/additive-manufacturing/expected_output.xhtml b/spec/recipes_spec/books/additive-manufacturing/expected_output.xhtml index a43ff57e9..1d7d02963 100644 --- a/spec/recipes_spec/books/additive-manufacturing/expected_output.xhtml +++ b/spec/recipes_spec/books/additive-manufacturing/expected_output.xhtml @@ -112,18 +112,31 @@ Introduction to Additive Manufacturing
Post Processing refers to a host of manufacturing processes employed after the 3D printing step. These processes serve to finish an AM part by improving the appearance or material properties after it has been printed. These processes could be, but are not limited to, material removal, thermal processing, and surface treatments. The printed shape can be dimensionally measured to ensure consistency to the original drawing or source file.
-- In chapter 1 we introduced the building block of Additive manufacturing, namely machines, materials, digital and people that are necessary to successfully manufacture using AM. The core concept of building material up layer by layer to make a shape vs legacy process that deform or remove material in order to make a shape. We then introduced the 7 standard AM processes, and a maturity model for developing AM competency within an organization. Finally, we touched on how to select an AM process to make a particular part. -
-+ In chapter 1 we introduced the building block of Additive manufacturing, namely machines, materials, digital and people that are necessary to successfully manufacture using AM. The core concept of building material up layer by layer to make a shape vs legacy process that deform or remove material in order to make a shape. We then introduced the 7 standard AM processes, and a maturity model for developing AM competency within an organization. Finally, we touched on how to select an AM process to make a particular part. +
+Post Processing refers to a host of manufacturing processes employed after the 3D printing step. These processes serve to finish an AM part by improving the appearance or material properties after it has been printed. These processes could be, but are not limited to, material removal, thermal processing, and surface treatments. The printed shape can be dimensionally measured to ensure consistency to the original drawing or source file.
-