Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluation Documentation #452

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions python/lib/evaluations/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Distributed Model on Demand - Evaluations
48 changes: 0 additions & 48 deletions python/lib/evaluations/dmod/evaluations/__init__.py
Original file line number Diff line number Diff line change
@@ -1,49 +1 @@
#!/usr/bin/env python3
import typing

from argparse import ArgumentParser


class Arguments(object):
def __init__(self, *args):
self.__option: typing.Optional[str] = None

self.__parse_command_line(*args)

@property
def option(self) -> str:
return self.__option

def __parse_command_line(self, *args):
parser = ArgumentParser("Put a description for your script here")

# Add options
parser.add_argument(
"-o",
metavar="option",
dest="option",
type=str,
default="default",
help="This is an example of an option"
)

# Parse the list of args if one is passed instead of args passed to the script
if args:
parameters = parser.parse_args(args)
else:
parameters = parser.parse_args()

# Assign parsed parameters to member variables
self.__option = parameters.option


def main():
"""
Define your initial application code here
"""
arguments = Arguments()


# Run the following if the script was run directly
if __name__ == "__main__":
main()
Loading
Loading