Restructure as src-layout Python package with bundled static assets
6
Makefile
@ -10,12 +10,12 @@ serve:
|
|||||||
|
|
||||||
# Lint
|
# Lint
|
||||||
lint: fmt
|
lint: fmt
|
||||||
uvx ruff check chess_pressure/
|
uvx ruff check src/chess_pressure/
|
||||||
|
|
||||||
# Format
|
# Format
|
||||||
fmt:
|
fmt:
|
||||||
uvx ruff format chess_pressure/
|
uvx ruff format src/chess_pressure/
|
||||||
uvx ruff check --fix chess_pressure/
|
uvx ruff check --fix src/chess_pressure/
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo "chess-pressure"
|
@echo "chess-pressure"
|
||||||
|
|||||||
@ -12,3 +12,10 @@ dependencies = [
|
|||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
chess-pressure = "chess_pressure.app:main"
|
chess-pressure = "chess_pressure.app:main"
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
requires = ["hatchling"]
|
||||||
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
|
[tool.hatch.build.targets.wheel]
|
||||||
|
packages = ["src/chess_pressure"]
|
||||||
|
|||||||
@ -13,7 +13,7 @@ from pydantic import BaseModel
|
|||||||
from .engine import make_move, parse_pgn
|
from .engine import make_move, parse_pgn
|
||||||
from .games import get_game_list, get_game_pgn
|
from .games import get_game_list, get_game_pgn
|
||||||
|
|
||||||
STATIC = Path(__file__).resolve().parent.parent / "static"
|
STATIC = Path(__file__).resolve().parent / "static"
|
||||||
|
|
||||||
app = FastAPI(title="Chess Pressure", docs_url=None, redoc_url=None)
|
app = FastAPI(title="Chess Pressure", docs_url=None, redoc_url=None)
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 777 B After Width: | Height: | Size: 777 B |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 748 B After Width: | Height: | Size: 748 B |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |