Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/test-redistribute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: "3.10"
# Needed to run tests
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.6"
enable-cache: true
- name: Verify uv is available
run: uv --version
- name: Install build dependencies
run: pip install build
- name: Build source distribution
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
version: "0.4.15"
version: "0.9.6"
enable-cache: true
cache-dependency-glob: |
requirements**.txt
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
version: "0.4.15"
version: "0.9.6"
enable-cache: true
cache-dependency-glob: |
requirements**.txt
Expand Down
114 changes: 107 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,114 @@
# Python-generated files
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[oc]
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# Virtual environments
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm-project.org/#use-with-ide
.pdm.toml
.pdm-python
.pdm-build/

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# Coverage
htmlcov
.coverage*
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
Copy link
Member

Choose a reason for hiding this comment

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

I'm wondering if we should add all the new stuff to the .gitignore by default, I would default to keeping it minimal and ignoring the things we explicitly know will be there.

For example, as this is created with uv, by default it won't have anything from Poetry, PDM, etc. Not sure if it's worth ignoring those files from the get go.

Also thinking about having .pyre, .pytype, etc. I imagine at some point we'll have one "blessed" type checker installed here by default (ty if it's ready, otherwise mypy).

Same with pip-log.txt, etc. We expect people will use uv with this project, maybe we don't need those.

We can also just have the minimal version to start and then grow it later if we figure it makes sense.

What do you think?

19 changes: 18 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,24 @@ classifiers = [
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = []
dependencies = [
"typer>=0.12.0",
"rich>=13.0.0",
"typing-extensions>=4.8.0",
"rich-toolkit>=0.15.1",
]

[project.optional-dependencies]
dev = [
"pytest>=8.0.0",
"coverage[toml]>=7.0.0",
"mypy>=1.8.0",
"ruff>=0.3.0",
]

[project.scripts]
fastapi-new = "fastapi_new.cli:main"

[project.urls]
Homepage = "https://github.com/fastapi/fastapi-new"
Documentation = "https://github.com/fastapi/fastapi-new"
Expand Down
3 changes: 3 additions & 0 deletions src/fastapi_new/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .cli import main

main()
11 changes: 11 additions & 0 deletions src/fastapi_new/cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import typer

from fastapi_new.new import new as new_command

app = typer.Typer(rich_markup_mode="rich")

app.command()(new_command)


def main() -> None:
app()
Empty file removed src/fastapi_new/main.py
Empty file.
Loading