Skip to content

docs(api): examples that run on the entry points, with their errors, and CI runs the doctests (#872) - #900

Merged
DrunkOnJava merged 11 commits into
mainfrom
docs/entry-point-examples
Oct 23, 2026
Merged

DrunkOnJava merged 11 commits into
mainfrom
docs/entry-point-examples

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

Part of #872 (1.0 criteria S3, the Rust half). CI never ran a documentation example: there was no cargo test --doc step, so the 7 runnable and 9 no_run examples were never executed. This PR adds that step, makes the crate root's three examples run, and gives the user entry points an example and a # Errors section. Every example opens the synthetic project file the repository ships, corpus/tier1/architectural-2024/architectural-2024.rvt.

Entry point Example # Errors
crate root (identity, elements, IFC + glTF) now run, not no_run
RevitFile::open yes yes
RevitFile::open_bytes (had one) yes
RevitFile::summarize_strict yes
metadata::read_metadata yes yes
walker::iter_elements yes, with provenance yes
RvtDocExporter::export_with_diagnostics yes (it had no doc) yes
ifc::write_step, gltf::model_to_glb, schedule_csv::elements_csv yes n/a (infallible)

Two doc corrections found on the way: the crate root's first example called the deprecated summarize, and summarize_strict's doc said a missing PartAtom fails it, which the code does not do. iter_elements's doc no longer lists the name-only Rooms and plan-loop Floors removed in #308.

Depends on #898 (the # Errors sections name Error::MissingClass); until it merges this diff includes #898's.

Changes

  • src/lib.rs, src/reader.rs, src/metadata.rs, src/walker.rs, src/ifc/mod.rs, src/ifc/step_writer.rs, src/ifc/gltf.rs, src/ifc/schedule_csv.rs: docs.
  • .github/workflows/ci.yml: cargo test --profile ci --doc on the Linux stable entries; tools/check-local.sh mirrors it.
  • CHANGELOG.md.

Not in this PR (the rest of #872): running docs/python.md's blocks, and separating user examples from the research probes in examples/.

Testing

The examples are the test: the new CI step runs them. Their assertions are only ones the code guarantees (write_step output starts ISO-10303-21;, a GLB starts glTF); counts are printed, not asserted. If one of the older, never-run examples fails, it is fixed here.

  • CI, including the new doctest step

Audit-honesty checklist

  • Docs match the code (both corrections checked against the source)
  • No emojis, private paths or internal jargon

Legal and contribution hygiene

  • Apache-2.0; the examples use the synthetic fixture only

Breaking changes

None.

Screenshots or output samples

N/A.

# Conflicts:
#	src/elements/arc_wall.rs
#	src/error.rs
#	src/reader.rs
#	src/walker.rs
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review October 23, 2026 14:01

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 67869202c4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/walker.rs Resolved
Comment thread src/metadata.rs Resolved
Comment thread CHANGELOG.md Resolved
Comment thread src/lib.rs Resolved
Comment thread src/reader.rs Resolved
…summarize_strict, the example writes to its own directory, one changelog entry
@DrunkOnJava
DrunkOnJava merged commit 809c9d5 into main Oct 23, 2026
29 checks passed
@DrunkOnJava
DrunkOnJava deleted the docs/entry-point-examples branch October 23, 2026 14:17
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant