diff --git a/montepy/_scripts/__init__.py b/montepy/_scripts/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/scripts/change_to_ascii.py b/montepy/_scripts/change_to_ascii.py similarity index 96% rename from scripts/change_to_ascii.py rename to montepy/_scripts/change_to_ascii.py index 1f8ae81b..a9bd86fb 100644 --- a/scripts/change_to_ascii.py +++ b/montepy/_scripts/change_to_ascii.py @@ -56,7 +56,9 @@ def strip_characters(args): ) -def main(args): +def main(args=None): + if args is None: + args = sys.argv[1:] args = define_args(args) strip_characters(args) diff --git a/pyproject.toml b/pyproject.toml index 61405dc5..122589bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ Documentation = "https://idaholab.github.io/MontePy/index.html" "Bug Tracker" = "https://github.com/idaholab/MontePy/issues" [project.scripts] -"change_to_ascii" = "scripts.change_to_ascii:main" +"change_to_ascii" = "montepy._scripts.change_to_ascii:main" [build-system] requires = ["setuptools >= 61.0.0"] diff --git a/tests/test_scripts.py b/tests/test_scripts.py index 6ba01bd9..aa68de76 100644 --- a/tests/test_scripts.py +++ b/tests/test_scripts.py @@ -31,7 +31,7 @@ def tearDownClass(cls): @staticmethod def run_script(args): return subprocess.run( - ["python", os.path.join("scripts", "change_to_ascii.py")] + args + ["python", os.path.join("montepy", "_scripts", "change_to_ascii.py")] + args ) def test_delete_bad(self):