diff --git a/python_test/pyproject.toml b/python_test/pyproject.toml index 13bf2af17..e6e3b9abf 100644 --- a/python_test/pyproject.toml +++ b/python_test/pyproject.toml @@ -1,3 +1,74 @@ +[build-system] +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "OBC-GS" +version = "0.1.0" +description = "A package for the University of Waterloo Orbital Design Team's GS and OBC" +authors = [ + { name = "University of Waterloo Orbital Design Team" } +] +requires-python = ">=3.11" + +dependencies = [ + "requests>=2.31", + "pyserial>=3", + "fastapi[standard]>=0.115.0", + "sqlmodel>=0.0.22", + "jinja2>=3.1.6", + "toml>=0.10.2", + "loguru>=0.7.3", + "pyham_ax25>=1.0.2", + "tinyaes>=1.1.1", + "pyStuffing>=0.0.4", + "hypothesis>=6.131.30", + "psycopg2-binary>=2.9.10", + "python-dotenv>=1.1.0", + "tqdm>=4.67" +] + +[project.optional-dependencies] +dev = [ + "pre-commit>=3.3.3", + "pytest>=7.4.0", + "pytest-cov>=4.1.0", + "mypy>=1.8.0", + "ruff>=0.2.0", + "psycopg[binary]>=3.2.6", + "pytest-postgresql>=7.0.1" +] + +[tool.setuptools] +packages = ["gs", "gs.backend", "obc.tools.python", "interfaces"] +zip_safe = false +include-package-data = true + +[tool.setuptools.package-data] +"gs" = ["py.typed"] +"gs.backend" = ["py.typed"] +"obc.tools.python" = ["py.typed"] +"interfaces" = ["py.typed"] + [tool.ruff] -extend = "../pyproject.toml" -lint.ignore = ["E", "F", "N", "UP", "SIM", "B", "ANN", "A", "D"] +line-length = 88 +ignore = ["E", "F", "N", "UP", "SIM", "B", "ANN", "A", "D"] +exclude = ["python_test/*"] + +[tool.mypy] +files = ["gs", "gs/backend", "obc/tools/python", "interfaces"] +ignore_missing_imports = true + +[tool.pytest.ini_options] +testpaths = ["python_test"] +addopts = "--cov=gs --cov=obc --cov-report=term-missing" + +[tool.pre-commit] +repos = [ + { repo = "https://github.com/charliermarsh/ruff-pre-commit", rev = "v0.2.0", hooks = [{id = "ruff"}] }, + { repo = "https://github.com/pre-commit/mirrors-mypy", rev = "v1.8.0", hooks = [{id = "mypy"}] }, + { repo = "https://github.com/pre-commit/pre-commit-hooks", rev = "v4.3.0", hooks = [ + {id = "trailing-whitespace"}, + {id = "end-of-file-fixer"} + ] } +] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 9f8c140ee..000000000 --- a/requirements.txt +++ /dev/null @@ -1,32 +0,0 @@ -# Regular dependencies -requests==2.31.0 -pyserial==3.5 -skyfield==1.48 -fastapi[standard]==0.115.0 -sqlmodel==0.0.22 -jinja2==3.1.6 -toml==0.10.2 -loguru==0.7.3 -pyham_ax25==1.0.2 -tinyaes==1.1.1 -pyStuffing==0.0.4 -hypothesis==6.131.30 -psycopg2-binary==2.9.10 -python-dotenv==1.1.0 -tqdm==4.67 - -# Typed packages -types-requests==2.31.0 -types-pyserial==3.5.0 -types-setuptools==69.1.0.20240217 -types-toml==0.10.8 -types-tqdm==4.67.0.20250516 - -# Development dependencies -pre-commit==3.3.3 -pytest==7.4.0 -pytest-cov==4.1.0 -mypy==1.8.0 -ruff==0.2.0 -psycopg[binary]==3.2.6 # Must be installed before `pytest-postgresql` -pytest-postgresql==7.0.1 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 28f4ecdf1..000000000 --- a/setup.cfg +++ /dev/null @@ -1,34 +0,0 @@ -[metadata] -name = OBC/GS -description = A package for the University of Waterloo Orbital Design Team's Ground Station and On-Board Computer -author = University of Waterloo Orbital Design Team -classifiers = - Programming Language :: Python :: 3.11 :: Only - -[options] -packages = - gs/backend - -# NOTE: The gs import is required for the CLI to be a stand-alone application - gs - obc/tools/python - interfaces -install_requires = - requests>=2.31 - pyserial>=3 -python_requires = ~=3.11 -zip_safe = no - -[options.extras_require] -testing = - pytest>=7.4 - pytest-cov>=4.1 - mypy>=1.8 - ruff>=0.2 - -# Mypy typed packages list -[options.package_data] -gs = py.typed -gs/backend = py.typed -obc/tools/python = py.typed -interfaces = py.typed diff --git a/setup.py b/setup.py deleted file mode 100644 index 7f1a1763c..000000000 --- a/setup.py +++ /dev/null @@ -1,4 +0,0 @@ -from setuptools import setup - -if __name__ == "__main__": - setup()