diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..12d42ec --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +.PHONY: setup update run dev-setup dev-update + +setup: + uv venv + uv sync + +update: + uv sync + +run: + uv run uvicorn main:app + +dev-setup: + uv venv + uv sync + uv sync --extra dev + +dev-update: + uv sync + uv sync --extra dev \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 4fe7567..e09b3a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,35 @@ +[project] +name = "Javelina" +version = "0.0.1" +dynamic = ["dependencies", "optional-dependencies"] +description = "Discord bot that manages the server and provides an additional RESTful API" +readme = "README.md" +license = "AGPL-3.0" +license-files = ["LICENSE"] +requires-python = ">=3.11" + +[tool.setuptools.dynamic] +dependencies = { file = "requirements.txt" } + +[tool.setuptools.dynamic.optional-dependencies] +dev = { file = "requirements/dev.txt" } + [tool.black] line-length = 96 -target-version = ["py311"] +target-version = ["py311", "py312", "py313"] [tool.isort] -profile = "black" \ No newline at end of file +profile = "black" + +[tool.mypy] +namespace_packages = true +install_types = true +strict = true +show_error_codes = true + +[tool.pylint] +disable = ["line-too-long"] + +[tool.pylint.main] +extension-pkg-whitelist = ["ujson"] +py-version = 3.11 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 5b288e3..c55289c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ aiohttp>=3.6.0 apscheduler~=3.11.0 -fastapi[all]~=0.116.0 +fastapi[all]==0.115.5 fastapi_discord==0.2.7 libbot[speed,pycord,cache]==4.4.0 mongodb-migrations==1.3.1 diff --git a/requirements/dev.txt b/requirements/dev.txt new file mode 100644 index 0000000..e7e36ee --- /dev/null +++ b/requirements/dev.txt @@ -0,0 +1,4 @@ +black==25.1.0 +isort==5.13.2 +mypy==1.16.1 +pylint==3.3.7 \ No newline at end of file