From b13c53686a409910f22d7e3e2696936ab020be37 Mon Sep 17 00:00:00 2001 From: Fedor Lyanguzov Date: Thu, 19 Dec 2024 20:38:06 +0300 Subject: [PATCH] setup packaging and testing --- README.md | 15 +++++++++++++++ pyproject.toml | 28 ++++++++++++++++++++++++++++ tests/test_app.py | 3 +++ vpn_manager/__init__.py | 0 vpn_manager/__main__.py | 9 +++++++++ 5 files changed, 55 insertions(+) create mode 100644 pyproject.toml create mode 100644 tests/test_app.py create mode 100644 vpn_manager/__init__.py create mode 100644 vpn_manager/__main__.py diff --git a/README.md b/README.md index 6045ff7..2deda41 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,17 @@ # vpn-manager Manage WireGuard VPN peers (both server and clients) + +# Development +To start developing: +``` +python -m venv .venv +source .venv/Scripts/activate +pip install -e . +# work related commands here +deactivate +``` + +To run tests: +``` +pytest +``` \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..562e1f3 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,28 @@ +[build-system] +requires = ["setuptools>=61"] +build-backend = "setuptools.build_meta" + +[tool.setuptools] +packages = ["vpn_manager"] + +[project] +name = "vpn-manager" +version = "2024.12.0a" +requires-python = ">=3.8" +dependencies = ["click>=8.1"] +authors = [ + {name = "Fedor Lyanguzov"}, +] +license = {file = "LICENSE"} +readme = "README.md" +description = "Manage WireGuard VPN peers (both server and clients)" + +[project.optional-dependencies] +test = ["pytest"] +lint = [ + "black", + "flake8" +] + +[project.scripts] +example = "vpn_manager.__main__:main" diff --git a/tests/test_app.py b/tests/test_app.py new file mode 100644 index 0000000..725f245 --- /dev/null +++ b/tests/test_app.py @@ -0,0 +1,3 @@ +def test_true(): + assert True + \ No newline at end of file diff --git a/vpn_manager/__init__.py b/vpn_manager/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/vpn_manager/__main__.py b/vpn_manager/__main__.py new file mode 100644 index 0000000..bcbef5f --- /dev/null +++ b/vpn_manager/__main__.py @@ -0,0 +1,9 @@ + + + + +def main(): + print("run") + +if __name__=="__main__": + main()