pdftract/scripts/measure_doc_coverage.sh
jedarden 246befd8d1 feat(pdftract-2m3gl): implement PHP SDK with Packagist publishing
- Add jedarden/pdftract Composer package (sdk/php/)
- Implement Client.php with proc_open subprocess execution
- Add PSR-3 LoggerInterface integration (defaults to NullLogger)
- Add 9 contract methods: extract, extractText, extractMarkdown, extractStream, search, getMetadata, hash, classify, verifyReceipt
- Add readonly model classes: Document, Page, Metadata, Fingerprint, Classification, Match, Receipt
- Add exception classes: PdftractException base + 8 subclasses
- Add PHPUnit conformance test suite
- Add phpunit.xml configuration
- Add composer.json with jedarden/pdftract package name
- Add .ci/argo-workflows/pdftract-php-publish.yaml (Packagist auto-discovery from git tags)

Also includes Ruby SDK scaffold from parallel workflow.

Closes pdftract-2m3gl
2026-06-01 10:27:03 -04:00

28 lines
821 B
Bash
Executable file

#!/bin/sh
# Measure rustdoc coverage for pdftract-core
echo "Measuring rustdoc coverage for pdftract-core..."
echo ""
cd crates/pdftract-core
# Count public items
public_items=$(grep -r "^pub " src/ --include="*.rs" | wc -l)
# Count items with documentation
doc_items=$(grep -r "^///\|^//!" src/ --include="*.rs" | wc -l)
# Count items with worked examples
example_items=$(grep -r "^\`\\\`\\\`rust" src/ --include="*.rs" | wc -l)
echo "Public items found: $public_items"
echo "Items with docs: $doc_items"
echo "Items with examples: $example_items"
echo ""
# Count examples more accurately (looking for ```rust anywhere in doc comments)
example_items_total=$(grep -r "rust" src/ --include="*.rs" | grep -c "\`\`\`" || echo 0)
echo "Approximate example count (contains ```): $example_items_total"
echo ""
cd ../..