Skip to content

Commit 8cb8ded

Browse files
Merge pull request #403 from openstax/core-660-additive-manufacturing-updates
Core 660 additive manufacturing updates
2 parents 80b697e + db33900 commit 8cb8ded

File tree

7 files changed

+165
-251
lines changed

7 files changed

+165
-251
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [v2.25.0] - 2025-01-16
910

11+
* Bake `glossary` in `additive-manufacturing`
12+
* Do not bake `chapter solutions` in `additive-manufacturing`
13+
* Bake `answer key` in `additive-manufacturing`
14+
* Add section title links to `key terms` in `additive-manufacturing`
15+
* Remove empty `answer key` sections in `data-science`
1016

1117
## [v2.24.0] - 2024-10-24
1218

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
en:
22
eoc:
33
review-questions: Review Questions
4-
case-questions: Case Questions
4+
practice: Case Questions
55
free-response: Discussion Questions
6+
key-terms: Key Terms
67
exercises:
78
exercise: Exercise

lib/recipes/additive-manufacturing/recipe.rb

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
AddInjectedExerciseId.v1(book: book)
2626

27+
answer_key = BookAnswerKeyContainer.v1(book: book)
28+
2729
book.chapters.each do |chapter|
2830
BakeNonIntroductionPages.v1(chapter: chapter)
2931

@@ -37,10 +39,13 @@
3739
number: "#{chapter.count_in(:book)}.#{table.count_in(:chapter)}")
3840
end
3941

40-
BakeChapterGlossary.v1(chapter: chapter, metadata_source: metadata)
42+
BakeChapterGlossary.v2(chapter: chapter)
4143

42-
eoc_with_exercise = %w[review-questions case-questions free-response]
43-
eoc_with_exercise.each do |section_key|
44+
eoc_sections = %w[summary
45+
review-questions
46+
free-response
47+
practice]
48+
eoc_sections.each do |section_key|
4449
MoveCustomSectionToEocContainer.v1(
4550
chapter: chapter,
4651
metadata_source: metadata,
@@ -52,19 +57,40 @@
5257
end
5358
end
5459

55-
selectors = 'section.review-questions, section.case-questions, section.free-response'
60+
sections_with_module_links = %w[key-terms]
61+
sections_with_module_links.each do |eoc_section|
62+
MoveCustomSectionToEocContainer.v1(
63+
chapter: chapter,
64+
metadata_source: metadata,
65+
container_key: eoc_section,
66+
uuid_key: ".#{eoc_section}",
67+
section_selector: "section.#{eoc_section}"
68+
) do |section|
69+
RemoveSectionTitle.v1(section: section)
70+
title = EocSectionTitleLinkSnippet.v1(page: section.ancestor(:page))
71+
section.prepend(child: title)
72+
end
73+
end
74+
75+
selectors = 'section.review-questions, section.practice, section.free-response'
5676

5777
chapter.composite_pages.search(selectors).injected_questions.each do |question|
5878
BakeInjectedExerciseQuestion.v1(question: question, number: question.count_in(:chapter))
5979
end
6080

61-
BakeAllChapterSolutionsTypes.v1(
62-
chapter: chapter,
63-
within: chapter.search(selectors),
64-
metadata_source: metadata
81+
answer_key_inner_container = AnswerKeyInnerContainer.v1(
82+
chapter: chapter, metadata_source: metadata, append_to: answer_key
6583
)
84+
85+
exercises = %w[review-questions practice free-response]
86+
exercises.each do |klass|
87+
Kitchen::Directions::MoveSolutionsFromExerciseSection.v1(
88+
within: chapter, append_to: answer_key_inner_container, section_class: klass
89+
)
90+
end
6691
end
6792

93+
AnswerKeyCleaner.v1(book: book)
6894
BakeFootnotes.v1(book: book)
6995
BakeIndex.v1(book: book)
7096
BakeCompositePages.v1(book: book)

lib/recipes/data-science/recipe.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@
141141
BakeAppendix.v1(page: page, number: appendix_letter)
142142
end
143143

144+
AnswerKeyCleaner.v1(book: book)
144145
BakeTableColumns.v1(book: book)
145146
BakeEquations.v1(book: book)
146147
BakeIndex.v1(book: book)

spec/recipes_spec/books/additive-manufacturing/expected_output.xhtml

Lines changed: 104 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -112,18 +112,31 @@ Introduction to Additive Manufacturing
112112
</li>
113113
<li class="os-toc-chapter-composite-page" cnx-archive-shortid="" cnx-archive-uri="composite-page-3" data-toc-type="book-content" data-toc-target-type="composite-page">
114114
<a href="#composite-page-3">
115-
<span class="os-text">Solutions</span>
115+
<span class="os-text">Summary</span>
116+
</a>
117+
</li>
118+
<li class="os-toc-chapter-composite-page" cnx-archive-shortid="" cnx-archive-uri="composite-page-4" data-toc-type="book-content" data-toc-target-type="composite-page">
119+
<a href="#composite-page-4">
120+
<span class="os-text">Key Terms</span>
116121
</a>
117122
</li>
118123
</ol>
119124
</li>
120-
<li class="os-toc-index" cnx-archive-shortid="" cnx-archive-uri="composite-page-4" data-toc-type="book-content" data-toc-target-type="index">
121-
<a href="#composite-page-4">
125+
<li class="os-toc-index" cnx-archive-shortid="" cnx-archive-uri="composite-page-5" data-toc-type="book-content" data-toc-target-type="index">
126+
<a href="#composite-page-5">
122127
<span class="os-text">Index</span>
123128
</a>
124129
</li>
125-
<li class="os-toc-index" cnx-archive-shortid="" cnx-archive-uri="composite-page-5" data-toc-type="book-content" data-toc-target-type="index">
126-
<a href="#composite-page-5">
130+
<li class="os-toc-composite-chapter" cnx-archive-shortid="" cnx-archive-uri="" data-toc-type="sub-book-tree">
131+
<a href="#">
132+
<span class="os-text">Answer Key</span>
133+
</a>
134+
<ol class="os-chapter">
135+
136+
</ol>
137+
</li>
138+
<li class="os-toc-index" cnx-archive-shortid="" cnx-archive-uri="composite-page-6" data-toc-type="book-content" data-toc-target-type="index">
139+
<a href="#composite-page-6">
127140
<span class="os-text">Index</span>
128141
</a>
129142
</li>
@@ -520,12 +533,6 @@ Introduction to Additive Manufacturing
520533
</div>
521534
<p id="auto_ff1e599f-36e0-4276-9079-1f36a4591333_para-00015" data-sm="./modules/m00003/index.cnxml:42:5">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.</p>
522535
</section>
523-
<section data-depth="1" class="key-terms" id="auto_ff1e599f-36e0-4276-9079-1f36a4591333_sect-00005" data-sm="./modules/m00003/index.cnxml:44:5">
524-
<ul id="auto_ff1e599f-36e0-4276-9079-1f36a4591333_list-00002" data-sm="./modules/m00003/index.cnxml:45:7">
525-
<li data-sm="./modules/m00003/index.cnxml:45:29">STL</li>
526-
<li data-sm="./modules/m00003/index.cnxml:46:9">Build file</li>
527-
</ul>
528-
</section>
529536
<section data-depth="1" class="review" id="auto_ff1e599f-36e0-4276-9079-1f36a4591333_sect-00002" data-sm="./modules/m00003/index.cnxml:49:5">
530537
<h3 data-type="title" data-sm="./modules/m00003/index.cnxml:50:7">Review Questions</h3>
531538
<div data-type="injected-exercise" class="os-embed autogenerated-content" data-injected-from-nickname="AM-01-02-001" data-injected-from-version="1" data-injected-from-url="https://exercises.openstax.org/api/exercises?q=nickname:AM-01-02-001" data-tags="book:stax-amfg context-cnxmod:ff1e599f-36e0-4276-9079-1f36a4591333" data-is-vocab="false">
@@ -714,18 +721,6 @@ Layer &#x2013; The layer is made by selectively and precisely depositing the mat
714721
<li data-sm="./modules/m00004/index.cnxml:54:1"><em data-effect="italics" data-sm="./modules/m00004/index.cnxml:54:7">Energy</em> &#x2013; Focused energy in the form of a laser or focused light.</li>
715722
<li data-sm="./modules/m00004/index.cnxml:55:1"><em data-effect="italics" data-sm="./modules/m00004/index.cnxml:55:7">Material</em> &#x2013; Polymers, composites, and metals in photo curable polymers</li>
716723
</ul>
717-
<section data-depth="1" class="key-terms" id="auto_c2a83532-de3b-4068-848e-40af48db7389_sect-00004" data-sm="./modules/m00004/index.cnxml:57:1">
718-
<ul id="auto_c2a83532-de3b-4068-848e-40af48db7389_list-00002" data-sm="./modules/m00004/index.cnxml:58:7">
719-
<li data-sm="./modules/m00004/index.cnxml:59:9">Binder Jetting</li>
720-
<li data-sm="./modules/m00004/index.cnxml:60:9">Material Extrusion</li>
721-
<li data-sm="./modules/m00004/index.cnxml:61:9">Directed Energy Deposition</li>
722-
<li data-sm="./modules/m00004/index.cnxml:62:9">Material Jetting</li>
723-
<li data-sm="./modules/m00004/index.cnxml:63:9">Powder Bed Fusion</li>
724-
<li data-sm="./modules/m00004/index.cnxml:64:9">Sheet Lamination</li>
725-
<li data-sm="./modules/m00004/index.cnxml:65:9">Vat Photopolymerization
726-
</li>
727-
</ul>
728-
</section>
729724
<section data-depth="1" class="review" id="auto_c2a83532-de3b-4068-848e-40af48db7389_sect-00002" data-sm="./modules/m00004/index.cnxml:69:5">
730725
<h3 data-type="title" data-sm="./modules/m00004/index.cnxml:70:7">Review Questions</h3>
731726
<div data-type="injected-exercise" class="os-embed autogenerated-content" data-injected-from-nickname="AM-01-03-001" data-injected-from-version="1" data-injected-from-url="https://exercises.openstax.org/api/exercises?q=nickname:AM-01-03-001" data-tags="book:stax-amfg context-cnxmod:c2a83532-de3b-4068-848e-40af48db7389" data-is-vocab="false">
@@ -1052,11 +1047,6 @@ Layer &#x2013; The layer is made by selectively and precisely depositing the mat
10521047
<span data-sm="./modules/m00006/index.cnxml:95:3" class="os-caption">Industries using Additive Manufacturing</span>
10531048
</div>
10541049
</div>
1055-
<section data-depth="1" class="summary" id="auto_ea1fab58-2057-4c8f-b791-6d31e9b18ad4_sect-00014" data-sm="./modules/m00006/index.cnxml:98:3">
1056-
<p id="auto_ea1fab58-2057-4c8f-b791-6d31e9b18ad4_para-00024" data-sm="./modules/m00006/index.cnxml:99:5">
1057-
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.
1058-
</p>
1059-
</section>
10601050
<section data-depth="1" class="review" id="auto_ea1fab58-2057-4c8f-b791-6d31e9b18ad4_sect-00002" data-sm="./modules/m00006/index.cnxml:104:5">
10611051
<h3 data-type="title" data-sm="./modules/m00006/index.cnxml:105:7">Review Questions</h3>
10621052
<div data-type="injected-exercise" class="os-embed autogenerated-content" data-injected-from-nickname="AM-01-05-001" data-injected-from-version="1" data-injected-from-url="https://exercises.openstax.org/api/exercises?q=nickname:AM-01-05-001" data-tags="book:stax-amfg context-cnxmod:ea1fab58-2057-4c8f-b791-6d31e9b18ad4" data-is-vocab="false">
@@ -1330,12 +1320,33 @@ Layer &#x2013; The layer is made by selectively and precisely depositing the mat
13301320
</div>
13311321
</div>
13321322
</div>
1333-
<div class="os-eoc os-solutions-container" data-type="composite-page" data-uuid-key="solutions" id="composite-page-3">
1323+
<div class="os-eoc os-summary-container" data-type="composite-page" data-uuid-key=".summary" id="composite-page-3">
13341324
<h2 data-type="document-title">
1335-
<span class="os-text">Solutions</span>
1325+
<span class="os-text">Summary</span>
13361326
</h2>
13371327
<div data-type="metadata" style="display: none;">
1338-
<h1 data-type="document-title" itemprop="name">Solutions</h1>
1328+
<h1 data-type="document-title" itemprop="name">Summary</h1>
1329+
<span data-type="revised" data-value="2024-07-09T23:27:30+00:00"></span>
1330+
<span data-type="slug" data-value="additive-manufacturing-essentials"></span>
1331+
<div class="permissions">
1332+
<p class="license">
1333+
Licensed:
1334+
<a href="http://creativecommons.org/licenses/by/4.0/" itemprop="dc:license,lrmi:useRightsURL" data-type="license" target="_blank" rel="noopener nofollow">Creative Commons Attribution License</a>
1335+
</p>
1336+
</div>
1337+
</div>
1338+
<section data-depth="1" class="summary" id="auto_ea1fab58-2057-4c8f-b791-6d31e9b18ad4_sect-00014" data-sm="./modules/m00006/index.cnxml:98:3">
1339+
<p id="auto_ea1fab58-2057-4c8f-b791-6d31e9b18ad4_para-00024" data-sm="./modules/m00006/index.cnxml:99:5">
1340+
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.
1341+
</p>
1342+
</section>
1343+
</div>
1344+
<div class="os-eoc os-key-terms-container" data-type="composite-page" data-uuid-key=".key-terms" id="composite-page-4">
1345+
<h2 data-type="document-title">
1346+
<span class="os-text">Key Terms</span>
1347+
</h2>
1348+
<div data-type="metadata" style="display: none;">
1349+
<h1 data-type="document-title" itemprop="name">Key Terms</h1>
13391350
<span data-type="revised" data-value="2024-07-09T23:27:30+00:00"></span>
13401351
<span data-type="slug" data-value="additive-manufacturing-essentials"></span>
13411352
<div class="permissions">
@@ -1345,9 +1356,53 @@ Layer &#x2013; The layer is made by selectively and precisely depositing the mat
13451356
</p>
13461357
</div>
13471358
</div>
1359+
<section data-depth="2" class="key-terms" id="auto_b539408f-1736-49e0-b911-3ceaa39c4b4e_sect-00002" data-sm="./modules/m00002/index.cnxml:56:1">
1360+
<a href="#page_ff1e599f-36e0-4276-9079-1f36a4591333_titlecreatedbycookbook">
1361+
<h3 data-type="document-title">
1362+
<span class="os-number">1.2</span>
1363+
<span class="os-divider"> </span>
1364+
<span class="os-text" data-type="" itemprop="">
1365+
<span class="os-number">1.2</span>
1366+
<span class="os-divider"> </span>
1367+
<span data-type="" itemprop="" class="os-text">Core AM Concepts</span>
1368+
</span>
1369+
</h3>
1370+
</a>
1371+
<span data-type="list" data-list-type="bulleted" id="auto_b539408f-1736-49e0-b911-3ceaa39c4b4e_list-00002" data-display="inline" data-sm="./modules/m00002/index.cnxml:57:7">
1372+
<span data-type="item" data-sm="./modules/m00002/index.cnxml:57:46">STL</span>
1373+
</span>
1374+
</section>
1375+
<section data-depth="1" class="key-terms" id="auto_ff1e599f-36e0-4276-9079-1f36a4591333_sect-00005" data-sm="./modules/m00003/index.cnxml:63:5">
1376+
<a href="#page_c2a83532-de3b-4068-848e-40af48db7389_titlecreatedbycookbook">
1377+
<h3 data-type="document-title">
1378+
<span class="os-number">1.3</span>
1379+
<span class="os-divider"> </span>
1380+
<span class="os-text" data-type="" itemprop="">
1381+
<span class="os-number">1.3</span>
1382+
<span class="os-divider"> </span>
1383+
<span data-type="" itemprop="" class="os-text">Additive Manufacturing Processes</span>
1384+
</span>
1385+
</h3>
1386+
</a>
1387+
<span data-type="list" data-list-type="bulleted" id="auto_ff1e599f-36e0-4276-9079-1f36a4591333_list-00002" data-display="inline" data-sm="./modules/m00003/index.cnxml:64:7">
1388+
<span data-type="item" data-sm="./modules/m00003/index.cnxml:65:1">Binder Jetting</span>
1389+
<span class="os-divider">,</span>
1390+
<span data-type="item" data-sm="./modules/m00003/index.cnxml:66:1">Material Extrusion</span>
1391+
<span class="os-divider">,</span>
1392+
<span data-type="item" data-sm="./modules/m00003/index.cnxml:67:1">Directed Energy Deposition</span>
1393+
<span class="os-divider">,</span>
1394+
<span data-type="item" data-sm="./modules/m00003/index.cnxml:68:1">Material Jetting</span>
1395+
<span class="os-divider">,</span>
1396+
<span data-type="item" data-sm="./modules/m00003/index.cnxml:69:1">Powder Bed Fusion</span>
1397+
<span class="os-divider">,</span>
1398+
<span data-type="item" data-sm="./modules/m00003/index.cnxml:70:1">Sheet Lamination</span>
1399+
<span class="os-divider">,</span>
1400+
<span data-type="item" data-sm="./modules/m00003/index.cnxml:71:1">Vat Photopolymerization</span>
1401+
</span>
1402+
</section>
13481403
</div>
13491404
</div>
1350-
<div class="os-eob os-index-container" data-type="composite-page" data-uuid-key="index" id="composite-page-4">
1405+
<div class="os-eob os-index-container" data-type="composite-page" data-uuid-key="index" id="composite-page-5">
13511406
<h1 data-type="document-title">
13521407
<span class="os-text">Index</span>
13531408
</h1>
@@ -1445,7 +1500,23 @@ Layer &#x2013; The layer is made by selectively and precisely depositing the mat
14451500
</div>
14461501
</div>
14471502
</div>
1448-
<div class="os-eob os-index-container" data-type="composite-page" data-uuid-key="index" id="composite-page-5">
1503+
<div class="os-eob os-solutions-container" data-type="composite-chapter" data-uuid-key=".solutions">
1504+
<h1 data-type="document-title">
1505+
<span class="os-text">Answer Key</span>
1506+
</h1>
1507+
<div data-type="metadata" style="display: none;">
1508+
<h1 data-type="document-title" itemprop="name">Answer Key</h1>
1509+
<span data-type="revised" data-value="2024-07-09T23:27:30+00:00"></span>
1510+
<span data-type="slug" data-value="additive-manufacturing-essentials"></span>
1511+
<div class="permissions">
1512+
<p class="license">
1513+
Licensed:
1514+
<a href="http://creativecommons.org/licenses/by/4.0/" itemprop="dc:license,lrmi:useRightsURL" data-type="license" target="_blank" rel="noopener nofollow">Creative Commons Attribution License</a>
1515+
</p>
1516+
</div>
1517+
</div>
1518+
</div>
1519+
<div class="os-eob os-index-container" data-type="composite-page" data-uuid-key="index" id="composite-page-6">
14491520
<h1 data-type="document-title">
14501521
<span class="os-text">Index</span>
14511522
</h1>

0 commit comments

Comments
 (0)