Commit graph

7 commits

Author SHA1 Message Date
Zanie Blue
7ec68e1dda
Allow opt-in to .python-version in uv init with --pin-python (#11265)
For use with `--bare`
2025-02-05 17:21:58 -06:00
Zanie Blue
acbbb2b82a
Add --bare option to uv init (#11192)
People are looking for a less opinionated version of `uv init`. The goal
here is to create a `pyproject.toml` and nothing else. With the `--lib`
or `--package` flags, we'll still configure a build backend but we won't
create the source tree. This disables things like the default
`description`, author behavior, and VCS.

See

- https://github.com/astral-sh/uv/issues/8178
- https://github.com/astral-sh/uv/issues/7181
- https://github.com/astral-sh/uv/issues/6750
2025-02-05 10:12:27 -06:00
Kevin Marchais
a2a2662d43
Fix ruff linting warnings from generated template files for extension modules (#10371)
## Summary

This PR fixes two ruff linting issues in the generated template files
when using: `uv init --build-backend` for extension modules.

1. Removes unnecessary `from __future__ import annotations` imports from
generated .pyi files
([PYI044](https://docs.astral.sh/ruff/rules/future-annotations-in-stub/))
2. Adds missing blank line after `hello_from_bin` import to comply with
isort formatting
([I001](https://docs.astral.sh/ruff/rules/unsorted-imports/))

## Test Plan

```bash
cargo run -- init --build-backend scikit-build-core example-ext
uvx ruff check example-ext --select ALL

cargo run -- init --build-backend maturin example-ext
uvx ruff check example-ext --select ALL
```

## Remaining warnings

There are still warnings remainings in the generated `__init__.py`
files:
- [D104](https://docs.astral.sh/ruff/rules/undocumented-public-package/)
Missing docstring in public package
-
[D103](https://docs.astral.sh/ruff/rules/undocumented-public-function/)
Missing docstring in public function
- [T201](https://docs.astral.sh/ruff/rules/print/) `print` found
2025-01-07 17:07:44 +00:00
Zanie Blue
83c5eae1f3
Avoid referencing scikit-build (#9320)
It is different than `scikit-buid-core`
2024-11-21 08:42:47 -06:00
Zanie Blue
d391961fa5
Touchup the extension module guide (#9293)
Co-authored-by: pantheraleo-7 <159872817+pantheraleo-7@users.noreply.github.com>
2024-11-21 14:24:21 +00:00
Zanie Blue
110c38e549
Improve the project creation documentation (#9236) 2024-11-20 08:50:14 -06:00
Zanie Blue
ca9aaf1c48
Reorganize the project concept documentation (#9121)
- Adds a collapsible section for the project concept
- Splits the project concept document into several child documents.
- Moves the workspace and dependencies documents to under the project
section
- Adds a mkdocs plugin for redirects, so links to the moved documents
still work

I attempted to make the minimum required changes to the contents of the
documents here. There is a lot of room for improvement on the content of
each new child document. For review purposes, I want to do that work
separately. I'd prefer if the review focused on this structure and idea
rather than the content of the files.

I expect to do this to other documentation pages that would otherwise be
very nested.

The project concept landing page and nav (collapsed by default) looks
like this now:

<img width="1507" alt="Screenshot 2024-11-14 at 11 28 45 AM"
src="https://github.com/user-attachments/assets/88288b09-8463-49d4-84ba-ee27144b62a5">
2024-11-19 13:52:12 -06:00