From 69c1fde803a3dc4eff0ae0fb564b83b18d8e9415 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Fri, 20 Sep 2024 18:07:21 -0500 Subject: Try to put Python all in the src/ folder Signed-off-by: Matt Strapp --- .github/workflows/python.yml | 2 +- .vscode/settings.json | 2 +- include/locusts.go | 10 ---------- src/__init__.py | 0 src/locusts-r-us/__init__.py | 0 src/locusts-r-us/locusts.py | 6 ------ src/locusts-r-us/test_locusts.py | 9 --------- src/locusts.py | 6 ++++++ src/test_locusts.py | 9 +++++++++ 9 files changed, 17 insertions(+), 27 deletions(-) delete mode 100644 include/locusts.go create mode 100644 src/__init__.py delete mode 100644 src/locusts-r-us/__init__.py delete mode 100644 src/locusts-r-us/locusts.py delete mode 100644 src/locusts-r-us/test_locusts.py create mode 100644 src/locusts.py create mode 100644 src/test_locusts.py diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 240049e..c1c7553 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -34,7 +34,7 @@ jobs: - name: Build run: python -m build - name: Test - run: python -m unittest discover -s src/locusts-r-us + run: python -m unittest discover -s src publish: name: Publish to PyPI diff --git a/.vscode/settings.json b/.vscode/settings.json index 526fc3c..9669844 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,7 +2,7 @@ "python.testing.unittestArgs": [ "-v", "-s", - "./src/locusts-r-us", + "./src", "-p", "test_*.py" ], diff --git a/include/locusts.go b/include/locusts.go deleted file mode 100644 index 957d61a..0000000 --- a/include/locusts.go +++ /dev/null @@ -1,10 +0,0 @@ -// This exists purely to build the Docker container. -package main - -import ( - "github.com/locusts-r-us/locusts" -) - -func main() { - locusts.IntroduceLocusts() -} diff --git a/src/__init__.py b/src/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/locusts-r-us/__init__.py b/src/locusts-r-us/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/locusts-r-us/locusts.py b/src/locusts-r-us/locusts.py deleted file mode 100644 index f050133..0000000 --- a/src/locusts-r-us/locusts.py +++ /dev/null @@ -1,6 +0,0 @@ -def introduce_locusts(): - """ - Introduce locusts into your codebase. - - Note that locusts are not included with this package, you must provide your own. - """ diff --git a/src/locusts-r-us/test_locusts.py b/src/locusts-r-us/test_locusts.py deleted file mode 100644 index 68e6df7..0000000 --- a/src/locusts-r-us/test_locusts.py +++ /dev/null @@ -1,9 +0,0 @@ -import unittest -from locusts import introduce_locusts - -class TestLocusts(unittest.TestCase): - def test_introduce_locusts(self): - self.assertIsNone(introduce_locusts()) - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/src/locusts.py b/src/locusts.py new file mode 100644 index 0000000..f050133 --- /dev/null +++ b/src/locusts.py @@ -0,0 +1,6 @@ +def introduce_locusts(): + """ + Introduce locusts into your codebase. + + Note that locusts are not included with this package, you must provide your own. + """ diff --git a/src/test_locusts.py b/src/test_locusts.py new file mode 100644 index 0000000..68e6df7 --- /dev/null +++ b/src/test_locusts.py @@ -0,0 +1,9 @@ +import unittest +from locusts import introduce_locusts + +class TestLocusts(unittest.TestCase): + def test_introduce_locusts(self): + self.assertIsNone(introduce_locusts()) + +if __name__ == '__main__': + unittest.main() \ No newline at end of file -- cgit v1.2.3