From c96c8415ea2797003040b3712f2911d0fc62e5a6 Mon Sep 17 00:00:00 2001 From: stilobique Date: Thu, 28 Jul 2022 11:58:50 +0200 Subject: [PATCH] Add todo and docstring about the main file. Clear unused variable. --- main.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index f1cc0c0..86dd16c 100644 --- a/main.py +++ b/main.py @@ -3,10 +3,13 @@ import pathlib import json import docker +# TODO Update readme file badge with blender version +# TODO add a check if the image build are stored in the docker register + def get_data_from_json() -> (str, str): + """From the json file, get blender version (major and minor), and return this information.""" file = pathlib.Path(os.getcwd(), 'build.json') - data: dict = {} with open(file, 'r') as f: data = json.load(f) @@ -20,6 +23,10 @@ def get_data_from_json() -> (str, str): def build_docker(b3d_version: (str, str), latest: bool = False): + """ + Generate docker image, request the blender version (major, minor) with the keyword b3d_version, and can be + tagged with latest or only blender version info. + """ client = docker.from_env() if os.environ.get('docker_hub_password'): client.login(username=os.environ['docker_hub_user'], password=os.environ['docker_hub_password'])