Skip to content

Commit 6bda914

Browse files
pwt-cdclaude
andcommitted
feat: Update CI/CD pipeline for unified build system
- Update GitHub workflow to use build-all.sh instead of build-spec.sh - Enhance PDF validation to check build/boost-spec.pdf location - Add validation for generated LaTeX entity tables - Update Dockerfile with texlive-science and texlive-extra-utils - Remove outdated manual LaTeX compilation logic - Improve build artifact collection and validation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent be3a498 commit 6bda914

File tree

93 files changed

+9936
-6359
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+9936
-6359
lines changed

.github/workflows/build-deploy.yml

Lines changed: 31 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ jobs:
139139
echo "🎯 Build type: ${{ github.ref == 'refs/heads/main' && 'Production (with deployment)' || 'Development (build only)' }}"
140140
echo "🔧 Using version: $RELEASE_VERSION"
141141
echo "📦 Version source: Pre-extracted outside Docker container"
142-
chmod +x build-spec.sh
143-
./build-spec.sh
142+
chmod +x build-all.sh
143+
./build-all.sh
144144
145145
- name: Validate build output
146146
working-directory: drafts/current/specifications
@@ -195,83 +195,27 @@ jobs:
195195
196196
echo "✅ Build output validation passed"
197197
198-
- name: Build PDF documentation
199-
if: always() # Generate PDF for all branches including main
198+
- name: Validate PDF generation
199+
if: always() # Check PDF for all branches including main
200200
working-directory: drafts/current/specifications
201201
run: |
202-
echo "📄 Building PDF documentation for ${{ github.ref_name }} branch..."
203-
204-
# Determine PDF filename based on branch
205-
if [ "${{ github.ref_name }}" = "main" ]; then
206-
PDF_FILENAME="boost-spec.pdf"
207-
PDF_TITLE="BOOST Data Standard"
208-
else
209-
PDF_FILENAME="boost-spec-dev-${{ github.ref_name }}.pdf"
210-
PDF_TITLE="BOOST Data Standard (Dev: ${{ github.ref_name }})"
211-
fi
212-
213-
echo "📄 Target PDF: $PDF_FILENAME"
214-
215-
# Try LaTeX build first
216-
if [ -f "boost-spec.tex" ]; then
217-
echo "🔧 Building PDF from LaTeX..."
218-
echo "📄 Running first LaTeX pass..."
219-
pdflatex -shell-escape -interaction=nonstopmode boost-spec.tex || echo "LaTeX first pass failed"
220-
echo "📄 Running second LaTeX pass (for TOC, LOF, LOT)..."
221-
pdflatex -shell-escape -interaction=nonstopmode boost-spec.tex || echo "LaTeX second pass failed"
222-
echo "📄 Running third LaTeX pass (for cross-references)..."
223-
pdflatex -shell-escape -interaction=nonstopmode boost-spec.tex || echo "LaTeX third pass failed, trying Pandoc..."
224-
225-
# Rename if LaTeX generated boost-spec.pdf but we need a different name
226-
if [ -f "boost-spec.pdf" ] && [ "$PDF_FILENAME" != "boost-spec.pdf" ]; then
227-
mv boost-spec.pdf "$PDF_FILENAME"
228-
fi
229-
fi
230-
231-
# Fallback to Pandoc HTML->PDF conversion
232-
if [ ! -f "$PDF_FILENAME" ] && [ -f "boost-spec.html" ]; then
233-
echo "🔄 Converting HTML to PDF with Pandoc..."
234-
235-
# Create clean HTML for PDF conversion
236-
python3 -c "
237-
import re
238-
with open('boost-spec.html', 'r') as f:
239-
html = f.read()
202+
echo "📄 Validating PDF generation for ${{ github.ref_name }} branch..."
203+
204+
# Check if PDF was generated by build-all.sh
205+
if [ -f "build/boost-spec.pdf" ]; then
206+
PDF_SIZE=$(wc -c < "build/boost-spec.pdf" | numfmt --to=iec-i --suffix=B)
207+
PDF_PAGES=$(pdfinfo build/boost-spec.pdf 2>/dev/null | grep Pages | awk '{print $2}' || echo 'Unknown')
208+
echo "✅ PDF generated by unified build system:"
209+
echo " 📄 File: build/boost-spec.pdf"
210+
echo " 📊 Size: $PDF_SIZE"
211+
echo " 📚 Pages: $PDF_PAGES"
240212
241-
# Remove interactive elements and styling that don't work in PDF
242-
html = re.sub(r'<script[^>]*>.*?</script>', '', html, flags=re.DOTALL)
243-
html = re.sub(r'<style[^>]*>.*?</style>', '', html, flags=re.DOTALL)
244-
html = re.sub(r'onclick=\"[^\"]*\"', '', html)
245-
html = re.sub(r'class=\"[^\"]*\"', '', html)
246-
html = re.sub(r'id=\"toc\"', '', html) # Remove TOC for cleaner PDF
247-
248-
with open('boost-spec-clean.html', 'w') as f:
249-
f.write(html)
250-
"
251-
252-
# Generate PDF with Pandoc
253-
pandoc boost-spec-clean.html \
254-
-o "$PDF_FILENAME" \
255-
--pdf-engine=xelatex \
256-
--from=html \
257-
--to=pdf \
258-
--metadata title="$PDF_TITLE" \
259-
--metadata author="BOOST Consortium" \
260-
--metadata date="$(date +%Y-%m-%d)" \
261-
--toc \
262-
--toc-depth=3 \
263-
--number-sections \
264-
|| echo "⚠️ PDF generation failed"
265-
266-
rm -f boost-spec-clean.html
267-
fi
268-
269-
# Check final result
270-
if [ -f "$PDF_FILENAME" ]; then
271-
PDF_SIZE=$(wc -c < "$PDF_FILENAME" | numfmt --to=iec-i --suffix=B)
272-
echo "✅ PDF generated: $PDF_FILENAME ($PDF_SIZE)"
213+
# Copy to root for artifact collection
214+
cp build/boost-spec.pdf ./boost-spec.pdf
273215
else
274-
echo "❌ PDF generation failed for $PDF_FILENAME"
216+
echo "❌ PDF generation failed - build/boost-spec.pdf not found"
217+
echo "🔍 Contents of build directory:"
218+
ls -la build/ || echo "build directory not found"
275219
fi
276220
277221
- name: Run documentation consistency validation
@@ -291,6 +235,18 @@ jobs:
291235
else
292236
echo "⚠️ Consistency validation script not found"
293237
fi
238+
239+
# Validate generated LaTeX content
240+
if [ -d "tex/entities" ]; then
241+
ENTITY_COUNT=$(find tex/entities -name "*-table.tex" | wc -l)
242+
echo "📊 Generated entity tables: $ENTITY_COUNT"
243+
244+
if [ "$ENTITY_COUNT" -lt 30 ]; then
245+
echo "⚠️ Entity table count lower than expected ($ENTITY_COUNT)"
246+
else
247+
echo "✅ Entity tables generated successfully"
248+
fi
249+
fi
294250
295251
- name: Generate build report
296252
working-directory: drafts/current/specifications
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# BOOST Documentation Review Feedback Template
2+
3+
## Review Information
4+
- **Reviewer Name**: ___________________________
5+
- **Reviewer Organization**: ___________________________
6+
- **Review Date**: ___________________________
7+
- **Documentation Version Reviewed**: ___________________________
8+
*(found at: https://carbondirect.github.io/BOOST/VERSION)*
9+
10+
---
11+
12+
## Feedback Items
13+
14+
### Item #1
15+
- **Component Reviewed**: ☐ HTML Documentation ☐ PDF Documentation ☐ ERD Navigator ☐ JSON Schemas
16+
- **Section/Page/Schema**: ___________________________
17+
- **Type**: ☐ Content Error ☐ Technical Inaccuracy ☐ Clarity Issue ☐ Suggestion ☐ Missing Information
18+
- **Priority**: ☐ Critical ☐ High ☐ Medium ☐ Low
19+
- **Description**:
20+
21+
22+
- **Suggested Resolution** *(if applicable)*:
23+
24+
25+
---
26+
27+
### Item #2
28+
- **Component Reviewed**: ☐ HTML Documentation ☐ PDF Documentation ☐ ERD Navigator ☐ JSON Schemas
29+
- **Section/Page/Schema**: ___________________________
30+
- **Type**: ☐ Content Error ☐ Technical Inaccuracy ☐ Clarity Issue ☐ Suggestion ☐ Missing Information
31+
- **Priority**: ☐ Critical ☐ High ☐ Medium ☐ Low
32+
- **Description**:
33+
34+
35+
- **Suggested Resolution** *(if applicable)*:
36+
37+
38+
---
39+
40+
### Item #3
41+
- **Component Reviewed**: ☐ HTML Documentation ☐ PDF Documentation ☐ ERD Navigator ☐ JSON Schemas
42+
- **Section/Page/Schema**: ___________________________
43+
- **Type**: ☐ Content Error ☐ Technical Inaccuracy ☐ Clarity Issue ☐ Suggestion ☐ Missing Information
44+
- **Priority**: ☐ Critical ☐ High ☐ Medium ☐ Low
45+
- **Description**:
46+
47+
48+
- **Suggested Resolution** *(if applicable)*:
49+
50+
51+
---
52+
53+
## Overall Assessment
54+
- **Documentation Completeness**: ☐ Excellent ☐ Good ☐ Adequate ☐ Needs Improvement
55+
- **Technical Accuracy**: ☐ Excellent ☐ Good ☐ Adequate ☐ Needs Improvement
56+
- **Clarity and Usability**: ☐ Excellent ☐ Good ☐ Adequate ☐ Needs Improvement
57+
58+
## General Comments
59+
*(Overall impressions, recommendations, or additional notes)*
60+
61+
62+
63+
---
64+
65+
**Please return completed feedback to [contact] by [deadline]**
66+
67+
**Note**: Add additional numbered items as needed. For schema-specific feedback, please include the specific entity name and field if applicable.
Lines changed: 48 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,50 @@
11
{
2-
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"$id": "https://github.com/carbondirect/BOOST/schemas/certificate.json",
4-
"title": "Certificate",
5-
"type": "object",
6-
"properties": {
7-
"certificateId": { "type": "string" },
8-
"certificateNumber": { "type": "string" },
9-
"certificationSchemeId": { "type": "string" },
10-
"cbId": { "type": "string" },
11-
"organizationId": { "type": "string" },
12-
"dateOfIssue": { "type": "string", "format": "date" },
13-
"dateOfExpiry": { "type": "string", "format": "date" },
14-
"status": {
15-
"type": "string",
16-
"enum": ["active", "expired", "revoked", "suspended", "pending"]
17-
},
18-
"scopeOfCertification": { "type": "string" },
19-
"versionNumber": { "type": "string" },
20-
"productGroups": {
21-
"type": "array",
22-
"items": {
23-
"type": "object",
24-
"properties": {
25-
"productType": { "type": "string" },
26-
"materialCategories": {
27-
"type": "array",
28-
"items": { "type": "string" }
29-
},
30-
"controlSystems": {
31-
"type": "array",
32-
"items": { "type": "string" }
33-
}
34-
},
35-
"required": ["productType"]
36-
}
37-
},
38-
"volumeTrackingRecord": {
39-
"type": "object",
40-
"properties": {
41-
"inputVolumeByCategory": {
42-
"type": "object",
43-
"additionalProperties": { "type": "number" }
44-
},
45-
"outputVolumeByCategory": {
46-
"type": "object",
47-
"additionalProperties": { "type": "number" }
48-
}
49-
}
50-
},
51-
"labelUseRecord": {
52-
"type": "array",
53-
"items": {
54-
"type": "object",
55-
"properties": {
56-
"product": { "type": "string" },
57-
"claimType": { "type": "string" },
58-
"approvalReference": { "type": "string" }
59-
}
60-
}
61-
},
62-
"supplierInfo": {
63-
"type": "object",
64-
"properties": {
65-
"name": { "type": "string" },
66-
"address": { "type": "string" }
67-
}
68-
},
69-
"supplierRiskRatingDDS": {
70-
"type": "object",
71-
"properties": {
72-
"riskRating": { "type": "string" },
73-
"mitigationMeasures": { "type": "string" }
74-
}
75-
},
76-
"attachments": {
77-
"type": "array",
78-
"items": {
79-
"type": "object",
80-
"properties": {
81-
"fileName": { "type": "string" },
82-
"fileUrl": { "type": "string", "format": "uri" },
83-
"fileType": { "type": "string" }
84-
}
85-
}
86-
},
87-
"lastUpdated": { "type": "string", "format": "date-time" }
2+
"@context": {
3+
"Certificate": "https://github.com/carbondirect/BOOST/schemas#Certificate",
4+
"certificateId": "https://github.com/carbondirect/BOOST/schemas#certificateId",
5+
"certificateNumber": "https://github.com/carbondirect/BOOST/schemas#certificateNumber",
6+
"CertificationSchemeId": "https://github.com/carbondirect/BOOST/schemas#CertificationSchemeId",
7+
"CertificationBodyId": "https://github.com/carbondirect/BOOST/schemas#CertificationBodyId",
8+
"OrganizationId": "https://github.com/carbondirect/BOOST/schemas#OrganizationId",
9+
"dateOfIssue": "https://github.com/carbondirect/BOOST/schemas#dateOfIssue",
10+
"dateOfExpiry": "https://github.com/carbondirect/BOOST/schemas#dateOfExpiry",
11+
"status": "https://github.com/carbondirect/BOOST/schemas#status",
12+
"scopeOfCertification": "https://github.com/carbondirect/BOOST/schemas#scopeOfCertification",
13+
"versionNumber": "https://github.com/carbondirect/BOOST/schemas#versionNumber",
14+
"versionYear": "https://github.com/carbondirect/BOOST/schemas#versionYear",
15+
"conditionalRequirements": "https://github.com/carbondirect/BOOST/schemas#conditionalRequirements",
16+
"suspensionHistory": "https://github.com/carbondirect/BOOST/schemas#suspensionHistory",
17+
"auditSchedule": "https://github.com/carbondirect/BOOST/schemas#auditSchedule",
18+
"certificateDocument": "https://github.com/carbondirect/BOOST/schemas#certificateDocument",
19+
"VerificationStatementId": "https://github.com/carbondirect/BOOST/schemas#VerificationStatementId",
20+
"id": "@id"
8821
},
89-
"required": [
90-
"certificateNumber",
91-
"certificationSchemeId",
92-
"cbId",
93-
"organizationId",
94-
"dateOfIssue",
95-
"dateOfExpiry",
96-
"status",
97-
"scopeOfCertification",
98-
"versionNumber"
99-
]
100-
}
22+
"@type": "Certificate",
23+
"@id": "https://github.com/carbondirect/BOOST/schemas/certificate/CERT-SFI-PACIFIC-LUMBER-001",
24+
"certificateId": "CERT-SFI-PACIFIC-LUMBER-001",
25+
"certificateNumber": "SFI-2025-12345",
26+
"CertificationSchemeId": "CERT-SCHEME-SFI-COC",
27+
"CertificationBodyId": "CB-SFI-US",
28+
"OrganizationId": "ORG-PACIFIC-LUMBER-001",
29+
"dateOfIssue": "2025-01-15",
30+
"dateOfExpiry": "2030-01-15",
31+
"status": "active",
32+
"scopeOfCertification": "Chain of Custody for lumber and wood products",
33+
"versionNumber": "v3.1",
34+
"versionYear": 2022,
35+
"conditionalRequirements": [
36+
{
37+
"type": "surveillance",
38+
"description": "Annual surveillance audit required",
39+
"dueDate": "2026-01-15"
40+
}
41+
],
42+
"suspensionHistory": [],
43+
"auditSchedule": {
44+
"nextAudit": "2026-01-15",
45+
"type": "surveillance",
46+
"auditorId": "AUD-SFI-001"
47+
},
48+
"certificateDocument": "https://sfiprogram.org/certificates/2025-12345.pdf",
49+
"VerificationStatementId": "VS-SFI-PACIFIC-001"
50+
}

0 commit comments

Comments
 (0)