Skip to content

Update docs for raw FFI use#4665

Merged
davidhewitt merged 8 commits into
PyO3:mainfrom
ngoldbaum:update-ffi-docs
Oct 30, 2024
Merged

Update docs for raw FFI use#4665
davidhewitt merged 8 commits into
PyO3:mainfrom
ngoldbaum:update-ffi-docs

Conversation

@ngoldbaum

@ngoldbaum ngoldbaum commented Oct 28, 2024

Copy link
Copy Markdown
Contributor

I noticed some issues in these docs while working on #4588. Opening this PR so that one doesn't get bogged down.

  • Updates the listing of build config variables in the top-level API doc page
  • Moves raw FFI examples into a new examples folder in the pyo3-ffi crate.
  • Updates the top-level pyo3-ffi docs to pull the content of the string-sum example from the examples folder. The content that is there now is substantially out of sync from the content in the examples folder and that seemed wrong to me.
  • Added a note in the narrative docs about the sequential example and mention multi-phase initialization in the top-level pyo3-ffi docs.

@ngoldbaum ngoldbaum added the CI-skip-changelog Skip checking changelog entry label Oct 28, 2024

@davidhewitt davidhewitt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, this is a good improvement. I spotted few small additional refinements:

Comment thread pyo3-ffi/src/lib.rs Outdated
Comment thread pyo3-ffi/src/lib.rs Outdated
Comment thread pyo3-ffi/src/lib.rs Outdated
Comment thread pyo3-ffi/src/lib.rs Outdated
@ngoldbaum ngoldbaum removed the CI-skip-changelog Skip checking changelog entry label Oct 29, 2024
@ngoldbaum

Copy link
Copy Markdown
Contributor Author

I think check-guide is failing because there isn't a tagged release yet where the new examples exist:

/Users/goldbaum/Documents/pyo3/target/doc/pyo3_ffi/index.html]:
✗ [404] https://github.com/PyO3/pyo3/tree/v0.23.0-dev/pyo3-ffi/examples/sequential | Failed: Network error: Not Found

Not sure how to work around or ignore that.

@ngoldbaum

Copy link
Copy Markdown
Contributor Author

Not sure how to work around or ignore that.

Removed the links, we can always add better cross-referencing later.

@davidhewitt davidhewitt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fair enough, sorry for the slow reply by me. The check-guide job in the noxfile has some mapping for various locally-built files; probably we could have added to that.

This looks good to me, thanks 👍

@davidhewitt davidhewitt added this pull request to the merge queue Oct 30, 2024
Merged via the queue into PyO3:main with commit 4f53704 Oct 30, 2024
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.

2 participants