Skip to content

Commit

Permalink
Fixed scripts system to actually work.
Browse files Browse the repository at this point in the history
  • Loading branch information
MicahGale committed Jan 18, 2024
1 parent 1a2b3aa commit 89a29f1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
Empty file added montepy/_scripts/__init__.py
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 89a29f1

Please sign in to comment.