Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: use kebab-case instead of snake_case for guide URLs #3942

Merged
merged 6 commits into from
Mar 9, 2024

Conversation

davidhewitt
Copy link
Member

Builds on #3941

We have a fair bit of inconsistency on the guide as to the URL structure. Some pages (like async-await) use kebab case. The URL fragments for headings also use kebab case.

A lot of pages were using snake case.

This PR moves those to kebab case and leaves some redirects from the old URLs for backwards compatibility.

Copy link
Contributor

@Icxolu Icxolu left a comment

Choose a reason for hiding this comment

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

Making this consistent makes a lot of sense 👍

@@ -33,7 +33,7 @@ struct MyClass {}
struct MyClass {}
```

[params-1]: https://docs.rs/pyo3/latest/pyo3/struct.PyAny.html
[params-1]: https://docs.rs/pyo3/latest/pyo3/types/struct.PyAny.html
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this also use {{#PYO3_DOCS_URL}}?

Copy link
Member Author

Choose a reason for hiding this comment

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

This one can't, purely because this fragment is also included in rustdoc for #[pyclass]. I did that for re-use but it was not the best idea maybe.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, makes sense 👍

@@ -33,7 +33,7 @@ You can read more about `pyenv`'s configuration options [here](https://github.co

### Building

There are a number of build and Python package management systems such as [`setuptools-rust`](https://github.com/PyO3/setuptools-rust) or [manually](https://pyo3.rs/latest/building_and_distribution.html#manual-builds). We recommend the use of `maturin`, which you can install [here](https://maturin.rs/installation.html). It is developed to work with PyO3 and provides the most "batteries included" experience, especially if you are aiming to publish to PyPI. `maturin` is just a Python package, so you can add it in the same you already install Python packages.
There are a number of build and Python package management systems such as [`setuptools-rust`](https://github.com/PyO3/setuptools-rust) or [manually](https://pyo3.rs/latest/building-and-distribution.html#manual-builds). We recommend the use of `maturin`, which you can install [here](https://maturin.rs/installation.html). It is developed to work with PyO3 and provides the most "batteries included" experience, especially if you are aiming to publish to PyPI. `maturin` is just a Python package, so you can add it in the same you already install Python packages.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this also use {{#PYO3_DOCS_URL}}?

Copy link
Member Author

Choose a reason for hiding this comment

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

This should even just be a ./building-and-distribution.md relative link 👍

src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
guide/pyclass_parameters.md Outdated Show resolved Hide resolved
@davidhewitt
Copy link
Member Author

Thanks for catching all my egregious errors here! I will aim to fixup in the morning.

@davidhewitt
Copy link
Member Author

Ok, the benchmarks are broken for seemingly an unrelated reason, I think this is otherwise ready for a second look 😁

@davidhewitt davidhewitt added this pull request to the merge queue Mar 9, 2024
@davidhewitt
Copy link
Member Author

Thanks for the reviews! 👍

I'll have a few hours tomorrow to finish the docs while travelling, and I'll prep the beta release on top of those docs too (I don't think it matters if the docs for the beta don't get reviewed before pushing beta, I just would like there to be a general sense of Bound API and fewer GIL Refs in there 😁)

Merged via the queue into PyO3:main with commit 75af678 Mar 9, 2024
39 of 41 checks passed
@davidhewitt davidhewitt deleted the guide-urls branch March 9, 2024 20:49
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