Skip to content

Commit 19e18d8

Browse files
committedJun 4, 2021
moved scripts to top level, adapted setups
1 parent a6cc098 commit 19e18d8

8 files changed

+7
-5
lines changed
 

‎mdp_playground/__init__.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from gym.envs.registration import register
22

3-
import mdp_playground.scripts.run_experiments
4-
53
register(
64
id='RLToy-v0',
75
entry_point='mdp_playground.envs:RLToyEnv',

‎mdp_playground/scripts/run_experiments.py ‎mdp_playground/run_experiments.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ def main(args):
216216
print("No. of seconds to run:", end - start)
217217

218218

219-
if __name__ == '__main__':
219+
def cli():
220220
import sys
221221
main(sys.argv[1:])
222+
223+
224+
if __name__ == '__main__':
225+
cli()

‎mdp_playground/scripts/__init__.py

Whitespace-only changes.

‎pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ sphinx = "^3.5.4"
6969
sphinx-book-theme = "^0.1.0"
7070

7171
[tool.poetry.scripts]
72-
run-mdpp-experiments = "mdp_playground.scripts.run_experiments:main"
72+
run-mdpp-experiments = "mdp_playground.run_experiments:cli"
7373

7474
[build-system]
7575
requires = ["poetry-core>=1.0.0"]

‎setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383

8484
entry_points={
8585
'console_scripts': """
86-
run-mdpp-experiments = mdp_playground.scripts.run_experiments:main
86+
run-mdpp-experiments = mdp_playground.run_experiments:cli
8787
"""
8888
}
8989
)

0 commit comments

Comments
 (0)
Please sign in to comment.