Skip to content

Commit

Permalink
bug fix: add int type for rng seed (#192)
Browse files Browse the repository at this point in the history
* bug fix: add int type for rng seed

* fix: update the version for this bug fix

* update entry point test with rng seed

* Fix: remove double line

Co-authored-by: Sander Roet <[email protected]>

---------

Co-authored-by: Sander Roet <[email protected]>
  • Loading branch information
McHaillet and sroet authored Jul 5, 2024
1 parent 609d6fb commit 2e89746
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pytom-match-pick"
version = "0.7.0"
version = "0.7.1"
description = "PyTOM's GPU template matching module as an independent package"
readme = "README.md"
license = {file = "LICENSE"}
Expand Down
1 change: 1 addition & 0 deletions src/pytom_tm/entry_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,7 @@ def match_template(argv=None):
)
additional_group.add_argument(
"--rng-seed",
type=int,
action=LargerThanZero,
default=int.from_bytes(urandom(8)),
required=False,
Expand Down
3 changes: 3 additions & 0 deletions tests/test_entry_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ def start(arg_dict): # simplify run
arguments = defaults.copy()
arguments["-r"] = ""
start(arguments)
# test if we can set the rng seed, see issue #194
arguments["--rng-seed"] = "42"
start(arguments)

# test debug files
arguments = defaults.copy()
Expand Down

0 comments on commit 2e89746

Please sign in to comment.