From d70e57a28ff787f196419c9681b9153d833afa31 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 25 May 2024 18:40:29 -0400 Subject: [PATCH 1/6] support python -m mddatasetbuilder Signed-off-by: Jinzhe Zeng --- mddatasetbuilder/__main__.py | 4 ++++ tests/test_cli.py | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 mddatasetbuilder/__main__.py create mode 100644 tests/test_cli.py diff --git a/mddatasetbuilder/__main__.py b/mddatasetbuilder/__main__.py new file mode 100644 index 0000000..ddc8612 --- /dev/null +++ b/mddatasetbuilder/__main__.py @@ -0,0 +1,4 @@ +from .datasetbuilder import _commandline + +if __name__ == "__main__": + _commandline() \ No newline at end of file diff --git a/tests/test_cli.py b/tests/test_cli.py new file mode 100644 index 0000000..c8fcb1c --- /dev/null +++ b/tests/test_cli.py @@ -0,0 +1,5 @@ +import subprocess as sp +import sys + +def test_module(): + sp.check_output([sys.executable, "-m", "mddatasetbuilder", "-h"]) \ No newline at end of file From 62e7d896ef9a243f29ef085d55e7042575579b8a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 25 May 2024 22:40:50 +0000 Subject: [PATCH 2/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- mddatasetbuilder/__main__.py | 2 +- tests/test_cli.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mddatasetbuilder/__main__.py b/mddatasetbuilder/__main__.py index ddc8612..fbc364b 100644 --- a/mddatasetbuilder/__main__.py +++ b/mddatasetbuilder/__main__.py @@ -1,4 +1,4 @@ from .datasetbuilder import _commandline if __name__ == "__main__": - _commandline() \ No newline at end of file + _commandline() diff --git a/tests/test_cli.py b/tests/test_cli.py index c8fcb1c..ec3885f 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,5 +1,6 @@ import subprocess as sp import sys + def test_module(): - sp.check_output([sys.executable, "-m", "mddatasetbuilder", "-h"]) \ No newline at end of file + sp.check_output([sys.executable, "-m", "mddatasetbuilder", "-h"]) From dbebd5d1e0bdd055eda6e26bc23bb18beceef8d4 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 25 May 2024 18:44:34 -0400 Subject: [PATCH 3/6] add docs --- tests/test_cli.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_cli.py b/tests/test_cli.py index ec3885f..176fbee 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,6 +1,8 @@ +"""Test command line interface.""" import subprocess as sp import sys def test_module(): + """Test python -m mddatasetbuilder.""" sp.check_output([sys.executable, "-m", "mddatasetbuilder", "-h"]) From d6ac7ad23458c29c1260d67de9bcca4c99bee660 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 25 May 2024 22:44:41 +0000 Subject: [PATCH 4/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_cli.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_cli.py b/tests/test_cli.py index 176fbee..e36d3c0 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,4 +1,5 @@ """Test command line interface.""" + import subprocess as sp import sys From 2d9ebf6cc103aead798a9c3428e53897c7cf12d6 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 25 May 2024 18:46:19 -0400 Subject: [PATCH 5/6] add docs --- mddatasetbuilder/__main__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mddatasetbuilder/__main__.py b/mddatasetbuilder/__main__.py index fbc364b..03c4b37 100644 --- a/mddatasetbuilder/__main__.py +++ b/mddatasetbuilder/__main__.py @@ -1,3 +1,4 @@ +"""Module entry point.""" from .datasetbuilder import _commandline if __name__ == "__main__": From 62ecc80e4b32c8d926ac0ca8d4848d4cb4909d39 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 25 May 2024 22:46:26 +0000 Subject: [PATCH 6/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- mddatasetbuilder/__main__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mddatasetbuilder/__main__.py b/mddatasetbuilder/__main__.py index 03c4b37..115f534 100644 --- a/mddatasetbuilder/__main__.py +++ b/mddatasetbuilder/__main__.py @@ -1,4 +1,5 @@ """Module entry point.""" + from .datasetbuilder import _commandline if __name__ == "__main__":