-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring python code location, adding tests (#66)
- Loading branch information
1 parent
90f30d2
commit ef70bed
Showing
99 changed files
with
1,041 additions
and
588 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,46 @@ | ||
.DEFAULT_GOAL:=all | ||
paths = python | ||
path = src/python-fastui | ||
|
||
.PHONY: install | ||
install: | ||
pip install -U pip pre-commit pip-tools | ||
pip install -r python/requirements/all.txt | ||
pip install -r $(path)/requirements/all.txt | ||
pip install -e $(path) | ||
pre-commit install | ||
|
||
.PHONY: update-lockfiles | ||
update-lockfiles: | ||
@echo "Updating requirements files using pip-compile" | ||
pip-compile -q --strip-extras -o python/requirements/lint.txt python/requirements/lint.in | ||
pip-compile -q --strip-extras -o python/requirements/pyproject.txt pyproject.toml --extra=fastapi | ||
pip install --dry-run -r python/requirements/all.txt | ||
pip-compile -q --strip-extras -o $(path)/requirements/lint.txt $(path)/requirements/lint.in | ||
pip-compile -q --strip-extras -o $(path)/requirements/test.txt $(path)/requirements/test.in | ||
pip-compile -q --strip-extras -o $(path)/requirements/pyproject.txt $(path)/pyproject.toml --extra=fastapi | ||
pip install --dry-run -r $(path)/requirements/all.txt | ||
|
||
.PHONY: format | ||
format: | ||
ruff check --fix-only $(paths) | ||
ruff format $(paths) | ||
ruff check --fix-only $(path) | ||
ruff format $(path) | ||
|
||
.PHONY: lint | ||
lint: | ||
ruff check $(paths) | ||
ruff format --check $(paths) | ||
ruff check $(path) | ||
ruff format --check $(path) | ||
|
||
.PHONY: typecheck | ||
typecheck: | ||
pyright python/fastui | ||
pyright | ||
|
||
.PHONY: test | ||
test: | ||
coverage run -m pytest tests | ||
coverage run -m pytest | ||
|
||
.PHONY: testcov | ||
testcov: test | ||
coverage html | ||
|
||
.PHONY: dev | ||
dev: | ||
uvicorn python.demo:app --reload | ||
uvicorn demo:app --reload | ||
|
||
.PHONY: all | ||
all: testcov lint |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,17 @@ | ||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[tool.hatch.build.targets.sdist] | ||
include = ["python"] | ||
|
||
[tool.hatch.build.targets.wheel] | ||
packages = ["python/fastui"] | ||
|
||
[tool.hatch.version] | ||
path = "python/fastui/__init__.py" | ||
|
||
[project] | ||
name = "fastui" | ||
description = "Build better UIs faster." | ||
authors = [{ name = "Samuel Colvin", email = "[email protected]" }] | ||
license = "MIT" | ||
readme = "README.md" | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Topic :: Internet", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3", | ||
'Programming Language :: Python :: 3 :: Only', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
'Programming Language :: Python :: 3.11', | ||
'Programming Language :: Python :: 3.12', | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Information Technology", | ||
"Framework :: Pydantic :: 2", | ||
"Framework :: FastAPI", | ||
] | ||
requires-python = ">=3.8" | ||
dependencies = ["pydantic[email]>=2.5.2"] | ||
dynamic = ["version"] | ||
|
||
[project.optional-dependencies] | ||
fastapi = [ | ||
"fastapi>=0.104", | ||
"python-multipart>=0.0.6", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/samuelcolvin/FastUI" | ||
# this is not the used for the python package "fastui", | ||
# for that see packages/python-fastui/pyproject.toml | ||
|
||
[tool.ruff] | ||
line-length = 120 | ||
extend-select = ["Q", "RUF100", "UP", "I"] | ||
flake8-quotes = {inline-quotes = "single", multiline-quotes = "double"} | ||
format.quote-style="single" | ||
target-version = "py38" | ||
|
||
[tool.pyright] | ||
include = ["src/python-fastui/fastui"] | ||
|
||
[tool.pytest.ini_options] | ||
testpaths = "src/python-fastui/tests" | ||
xfail_strict = true | ||
filterwarnings = ["error"] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.