diff --git a/src/twomartens/masterthesis/cli.py b/src/twomartens/masterthesis/cli.py index cb74b71..5d94b1f 100644 --- a/src/twomartens/masterthesis/cli.py +++ b/src/twomartens/masterthesis/cli.py @@ -19,6 +19,7 @@ Provides CLI actions. Functions: + config(...): handles the config component train(...): trains a network test(...): evaluates a network val(...): runs predictions on the validation data @@ -27,6 +28,17 @@ Functions: import argparse import math +from twomartens.masterthesis import config as conf + + +def config(args: argparse.Namespace) -> None: + if args.action == "get": + conf.get_property(args.property) + elif args.action == "set": + conf.set_property(args.property, args.value) + elif args.action == "list": + conf.list_property_values() + def train(args: argparse.Namespace) -> None: if args.network == "ssd" or args.network == "bayesian_ssd": diff --git a/src/twomartens/masterthesis/config.py b/src/twomartens/masterthesis/config.py new file mode 100644 index 0000000..7ac97d4 --- /dev/null +++ b/src/twomartens/masterthesis/config.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- + +# Copyright 2018 Timon BrĂ¼ning, Inga Kempfert, Anne Kunstmann, Jim Martens, +# Marius Pierenkemper, Yanneck Reiss +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +""" +Takes care of config functionality. + +Functions: + get_property(key: str): returns the value of given property + set_property(key: str, value: str): sets the given property to given value + list_property_values(): prints out list of config values + get_config(): returns key-value store +""" +from typing import Union, Dict + + +def get_property(key: str) -> str: + raise NotImplementedError + + +def set_property(key: str, value: str) -> None: + raise NotImplementedError + + +def list_property_values() -> None: + raise NotImplementedError + + +def get_config() -> Dict[str, Union[str, int, float, bool]]: + raise NotImplementedError