Skip to content

Commit 6fb8b72

Browse files
committed
feat: Remove PDF generation and optimize documentation system
- Remove all PDF/LaTeX build logic and dependencies - Update CI pipeline to support only HTML and Markdown formats - Fix Sphinx configuration warnings and cleanup - Remove duplicate RST files and orphaned documentation - Optimize build scripts for macOS compatibility - Reduce Sphinx warnings from 300+ to 5 harmless theme warnings - Update documentation packaging and manifest generation - Streamline CI workflow with proper artifact management - Add enhanced error handling and validation Changes: - Removed PDF build steps from python-docs.yml workflow - Cleaned up doc/CodeDocs/conf.py configuration - Deleted redundant RST files and conf_messy.py - Updated scripts/build-docs.sh for pandoc markdown conversion - Fixed scripts/generate-docs.py to prevent config duplication - Updated documentation-output structure and manifest - Added proper :no-index: directives to prevent duplicate documentation
1 parent c6e6e3d commit 6fb8b72

File tree

95 files changed

+19199
-1044
lines changed

Some content is hidden

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

95 files changed

+19199
-1044
lines changed

.github/workflows/python-docs.yml

Lines changed: 17 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Comprehensive Documentation Generation Pipeline
2-
# Generates HTML, Markdown, and PDF documentation with proper cleanup
2+
# Generates HTML and Markdown documentation with enhanced features
33
name: Documentation Generation & Deployment
44
permissions:
55
contents: read
@@ -48,11 +48,7 @@ jobs:
4848
sudo apt-get update -qq
4949
sudo apt-get install -y --no-install-recommends \
5050
graphviz \
51-
pandoc \
52-
texlive-latex-recommended \
53-
texlive-fonts-recommended \
54-
texlive-latex-extra \
55-
latexmk
51+
pandoc
5652
5753
- name: Set documentation version
5854
id: version
@@ -65,76 +61,30 @@ jobs:
6561
run: |
6662
echo "🧹 Cleaning previous documentation builds..."
6763
rm -rf doc/codeDocs/_build/ || true
68-
rm -rf doc/codeDocs/_static/diagrams/*.png || true
69-
rm -rf doc/codeDocs/_static/diagrams/*.dot || true
70-
find doc/codeDocs/ -name '*.rst' -not -name 'index.rst' -not -name 'overview.rst' -delete || true
64+
rm -rf documentation-output/ || true
7165
mkdir -p ${{ env.DOCS_OUTPUT }}
7266
7367
- name: Build comprehensive documentation
7468
run: |
69+
echo "🚀 Building enhanced documentation with warning fixes..."
7570
cd ${{ github.workspace }}
76-
./scripts/build-docs.sh
77-
78-
# Update manifest with CI information
79-
if [ -f documentation-output/manifest.json ]; then
80-
python3 -c "import json; manifest = json.load(open('documentation-output/manifest.json')); manifest.update({'ci_run_number': '${{ github.run_number }}', 'ci_sha': '${{ github.sha }}', 'ci_ref': '${{ github.ref }}', 'repository': '${{ github.repository }}'}); json.dump(manifest, open('documentation-output/manifest.json', 'w'), indent=2)"
81-
fi
82-
83-
- name: Build HTML documentation
84-
run: |
85-
echo "🌐 Building HTML documentation..."
86-
cd ${{ env.DOCS_SOURCE }}
87-
sphinx-build -W -b html . _build/html
88-
echo "HTML documentation built successfully"
89-
90-
- name: Build Markdown documentation
91-
run: |
92-
echo "📝 Building Markdown documentation..."
93-
cd ${{ env.DOCS_SOURCE }}
94-
sphinx-build -b markdown . _build/markdown
95-
# Create comprehensive README
96-
cat > _build/markdown/README.md << 'EOF'
97-
# unstructuredDataHandler Documentation
98-
99-
**Version:** ${{ steps.version.outputs.version }}
100-
**Generated:** $(date -u '+%Y-%m-%d %H:%M:%S UTC')
101-
**Repository:** ${{ github.repository }}
102-
**Branch:** ${{ github.ref_name }}
103-
104-
This directory contains the complete documentation in Markdown format.
10571
106-
## Navigation
72+
# Set Python path for imports
73+
export PYTHONPATH=.
10774
108-
- [Main Documentation](index.md) - Start here
109-
- [System Overview](overview.md) - Architecture and design
110-
- [API Reference](modules.md) - Complete API documentation
111-
112-
## Module Documentation
113-
114-
EOF
115-
find _build/markdown -name '*.md' -not -name 'README.md' | sort | while read file; do
116-
basename="$(basename "$file" .md)"
117-
echo "- [$basename]($file)" >> _build/markdown/README.md
118-
done
119-
echo "Markdown documentation built successfully"
75+
# Build using our improved build script
76+
./scripts/build-docs.sh
12077
121-
- name: Build PDF documentation
78+
echo "✅ Documentation build completed successfully"
79+
80+
- name: Update manifest with CI information
12281
run: |
123-
echo "📄 Building PDF documentation..."
124-
cd ${{ env.DOCS_SOURCE }}
125-
sphinx-build -b latex . _build/latex
126-
cd _build/latex
127-
# Build PDF with error handling
128-
make all-pdf || {
129-
echo "⚠️ PDF generation failed, creating fallback PDF from HTML"
130-
cd ../html
131-
# Fallback: convert HTML to PDF using pandoc
132-
find . -name '*.html' -exec basename {} .html \; | head -1 | xargs -I {} \
133-
pandoc {}.html -o ../../_build/unstructuredDataHandler-docs.pdf --pdf-engine=xelatex || \
134-
echo "⚠️ PDF generation skipped - LaTeX not fully configured"
135-
}
136-
echo "PDF documentation processing completed"
137-
82+
if [ -f documentation-output/manifest.json ]; then
83+
echo "📝 Adding CI metadata to manifest..."
84+
python3 -c "import json; m=json.load(open('documentation-output/manifest.json')); m.update({'ci_run_number':'${{ github.run_number }}','ci_sha':'${{ github.sha }}','ci_ref':'${{ github.ref }}','repository':'${{ github.repository }}','ci_build_url':'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'}); json.dump(m,open('documentation-output/manifest.json','w'),indent=2)"
85+
echo "✅ Updated manifest with CI information"
86+
fi
87+
13888
- name: Package documentation artifacts
13989
run: |
14090
echo "📦 Packaging documentation artifacts..."
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)