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

Avoid creating hello.py in existing projects #6750

Open
zanieb opened this issue Aug 28, 2024 · 0 comments
Open

Avoid creating hello.py in existing projects #6750

zanieb opened this issue Aug 28, 2024 · 0 comments
Labels
projects Related to project management capabilities

Comments

@zanieb
Copy link
Member

zanieb commented Aug 28, 2024

e.g. in uv-fastapi-example I don't want a hello.py when I regenerate the pyproject.toml

@zanieb zanieb added the projects Related to project management capabilities label Aug 28, 2024
@zanieb zanieb mentioned this issue Aug 30, 2024
charliermarsh pushed a commit that referenced this issue Aug 30, 2024
## Summary

- Fixed the directory structure and commands for the second scenario
#6833
- Added a headline "Migrating an existing FastAPI project" because the
first part looks like a migration scenario, but didn't have its own
section before.
- Added explicit `--app` flags to commands to emphasize that the
commands create an Application project. Although maybe unnecessary
considering that `--app` is now default.
- Added instructions for testing that the dev server and Docker image
work correctly
- Took the liberty of adding a `project` at the root of all directory
structures and appropriate commands.
- With explicitly defined root directory it is easier to differentiate
between the `project` root directory and FastAPI's `app` directory.
- Without it it could be less obvious for developers less familiar with
FastAPI. Had a similar issue when started using Django several years
ago.
- If I left `app` in the command, then after copying the **app
directory** from https://github.com/astral-sh/uv-fastapi-example the
path would be `app/app/...`.
- Cleaned up glyphs in tree sctructures that were copied from FastAPI
docs.

## Caveats

- On project initialization `hello.py` is created. It is not reflected
in directory structure trees in this PR and may be slightly confusing
for developers less familiar with uv.
- I believe it will be soon addressed in #6750 and after that the docs
will reflect actual directory structure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
projects Related to project management capabilities
Projects
None yet
Development

No branches or pull requests

1 participant