summaryrefslogtreecommitdiff
path: root/make.py
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-09-23 22:42:14 -0700
committerFuwn <[email protected]>2022-09-23 22:42:14 -0700
commit5bc398b5166e49147fa5fac41de0bc866a2159e0 (patch)
treeb273f21291c9b326297971bafed9ac0b1d5e9b49 /make.py
downloadmachinis-5bc398b5166e49147fa5fac41de0bc866a2159e0.tar.xz
machinis-5bc398b5166e49147fa5fac41de0bc866a2159e0.zip
feat: initial commit
Diffstat (limited to 'make.py')
-rw-r--r--make.py54
1 files changed, 54 insertions, 0 deletions
diff --git a/make.py b/make.py
new file mode 100644
index 0000000..d37beb5
--- /dev/null
+++ b/make.py
@@ -0,0 +1,54 @@
+# This file is part of machinis <https://github.com/Fuwn/machinis>.
+#
+# All rights reserved
+#
+# Copyright (C) 2022-2022 Fuwn <[email protected]>
+# SPDX-License-Identifier: UNLICENSED
+
+# type: ignore
+
+import subprocess
+import sys
+
+import sane
+
+CC: str = {"win32": "python"}.get(sys.platform, "python3")
+POETRY: str = {"win32": "poetry.bat"}.get(sys.platform, "poetry")
+
+
+def run():
+ subprocess.run(f"{POETRY} run {CC} -m machinis")
+
+
+def fmt():
+ subprocess.run(f"{POETRY} run black . -q")
+
+
+def sort():
+ subprocess.run(f"{POETRY} run isort machinis make.py")
+
+
+def typing():
+ subprocess.run(f"{POETRY} run mypy . --strict --no-error-summary")
+
+
+def spelling():
+ subprocess.run(f"{POETRY} run codespell machinis make.py")
+
+
+def safety():
+ subprocess.run(f"{POETRY} run safety check --bare") # --full-report
+
+
[email protected](recipe_deps=["fmt", "sort", "typing", "spelling", "safety"])
+def check():
+ pass
+
+
+sane.sane_run(run)