diff --git a/conftest.py b/conftest.py index fa915ed..9db1d21 100644 --- a/conftest.py +++ b/conftest.py @@ -1,8 +1,10 @@ -import pytest -import compas -import aixd_grasshopper import math + +import compas import numpy +import pytest + +import aixd_grasshopper def pytest_ignore_collect(path): diff --git a/docs/conf.py b/docs/conf.py index 0f1f94d..0855be6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,8 +1,9 @@ # flake8: noqa # -*- coding: utf-8 -*- -from sphinx.writers import html, html5 import sphinx_compas2_theme +from sphinx.writers import html +from sphinx.writers import html5 # -- General configuration ------------------------------------------------ diff --git a/setup.py b/setup.py index e3ea7a1..a6bc21f 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,6 @@ from setuptools.command.develop import develop from setuptools.command.install import install - here = path.abspath(path.dirname(__file__)) diff --git a/src/aixd_grasshopper/components/aixd_DatasetCreate/code.py b/src/aixd_grasshopper/components/aixd_DatasetCreate/code.py index a63dd02..86aade5 100644 --- a/src/aixd_grasshopper/components/aixd_DatasetCreate/code.py +++ b/src/aixd_grasshopper/components/aixd_DatasetCreate/code.py @@ -1,8 +1,10 @@ # flake8: noqa -from aixd_grasshopper.gh_ui import create_dataset_object -from aixd_grasshopper.gh_ui_helper import session_id, component_id from scriptcontext import sticky as st +from aixd_grasshopper.gh_ui import create_dataset_object +from aixd_grasshopper.gh_ui_helper import component_id +from aixd_grasshopper.gh_ui_helper import session_id + cid = component_id(session_id(), ghenv.Component, "DatasetCreate") diff --git a/src/aixd_grasshopper/components/aixd_DatasetLoad/code.py b/src/aixd_grasshopper/components/aixd_DatasetLoad/code.py index 5ed3053..714deaf 100644 --- a/src/aixd_grasshopper/components/aixd_DatasetLoad/code.py +++ b/src/aixd_grasshopper/components/aixd_DatasetLoad/code.py @@ -1,8 +1,10 @@ # flake8: noqa -from aixd_grasshopper.gh_ui import load_dataset -from aixd_grasshopper.gh_ui_helper import session_id, component_id from scriptcontext import sticky as st +from aixd_grasshopper.gh_ui import load_dataset +from aixd_grasshopper.gh_ui_helper import component_id +from aixd_grasshopper.gh_ui_helper import session_id + cid = component_id(session_id(), ghenv.Component, "DatasetLoad") if load: diff --git a/src/aixd_grasshopper/components/aixd_DatasetSummary/code.py b/src/aixd_grasshopper/components/aixd_DatasetSummary/code.py index 7a4664e..a48151f 100644 --- a/src/aixd_grasshopper/components/aixd_DatasetSummary/code.py +++ b/src/aixd_grasshopper/components/aixd_DatasetSummary/code.py @@ -1,8 +1,10 @@ # flake8: noqa -from aixd_grasshopper.gh_ui import dataset_summary -from aixd_grasshopper.gh_ui_helper import session_id, component_id from scriptcontext import sticky as st +from aixd_grasshopper.gh_ui import dataset_summary +from aixd_grasshopper.gh_ui_helper import component_id +from aixd_grasshopper.gh_ui_helper import session_id + cid = component_id(session_id(), ghenv.Component, "DatasetSummary") if get: diff --git a/src/aixd_grasshopper/components/aixd_GenSelect/code.py b/src/aixd_grasshopper/components/aixd_GenSelect/code.py index 70aad83..8363d7c 100644 --- a/src/aixd_grasshopper/components/aixd_GenSelect/code.py +++ b/src/aixd_grasshopper/components/aixd_GenSelect/code.py @@ -3,10 +3,9 @@ # TODO: turn orange if index out of range -from ghpythonlib.treehelpers import list_to_tree - # from aixd_grasshopper.rhino_inside import find_component_by_nickname import Grasshopper +from ghpythonlib.treehelpers import list_to_tree dp_pred = predictions[select].dict["design_parameters"] pa_pred = predictions[select].dict["performance_attributes"] diff --git a/src/aixd_grasshopper/components/aixd_Generator/code.py b/src/aixd_grasshopper/components/aixd_Generator/code.py index 50aac37..d090bfd 100644 --- a/src/aixd_grasshopper/components/aixd_Generator/code.py +++ b/src/aixd_grasshopper/components/aixd_Generator/code.py @@ -36,10 +36,12 @@ def __repr__(self): # ------------------------------------------------------------------------------- -from aixd_grasshopper.gh_ui import request_designs -from aixd_grasshopper.gh_ui_helper import session_id, component_id from scriptcontext import sticky as st +from aixd_grasshopper.gh_ui import request_designs +from aixd_grasshopper.gh_ui_helper import component_id +from aixd_grasshopper.gh_ui_helper import session_id + cid = component_id(session_id(), ghenv.Component, "Generator") diff --git a/src/aixd_grasshopper/components/aixd_ModelDims/code.py b/src/aixd_grasshopper/components/aixd_ModelDims/code.py index d75c13c..4d82f05 100644 --- a/src/aixd_grasshopper/components/aixd_ModelDims/code.py +++ b/src/aixd_grasshopper/components/aixd_ModelDims/code.py @@ -1,8 +1,10 @@ # flake8: noqa -from aixd_grasshopper.gh_ui import model_input_output_dimensions -from aixd_grasshopper.gh_ui_helper import session_id, component_id from scriptcontext import sticky as st +from aixd_grasshopper.gh_ui import model_input_output_dimensions +from aixd_grasshopper.gh_ui_helper import component_id +from aixd_grasshopper.gh_ui_helper import session_id + cid = component_id(session_id(), ghenv.Component, "ModelDims") if get: diff --git a/src/aixd_grasshopper/components/aixd_ModelLoad/code.py b/src/aixd_grasshopper/components/aixd_ModelLoad/code.py index 1a5d883..da06b72 100644 --- a/src/aixd_grasshopper/components/aixd_ModelLoad/code.py +++ b/src/aixd_grasshopper/components/aixd_ModelLoad/code.py @@ -1,8 +1,10 @@ # flake8: noqa -from aixd_grasshopper.gh_ui import model_load -from aixd_grasshopper.gh_ui_helper import session_id, component_id from scriptcontext import sticky as st +from aixd_grasshopper.gh_ui import model_load +from aixd_grasshopper.gh_ui_helper import component_id +from aixd_grasshopper.gh_ui_helper import session_id + cid = component_id(session_id(), ghenv.Component, "ModelLoad") if not checkpoint_path: diff --git a/src/aixd_grasshopper/components/aixd_ProjectSetup/code.py b/src/aixd_grasshopper/components/aixd_ProjectSetup/code.py index 8466155..35fbc69 100644 --- a/src/aixd_grasshopper/components/aixd_ProjectSetup/code.py +++ b/src/aixd_grasshopper/components/aixd_ProjectSetup/code.py @@ -1,8 +1,12 @@ # flake8: noqa import os + from scriptcontext import sticky as st + from aixd_grasshopper.gh_ui import project_setup -from aixd_grasshopper.gh_ui_helper import session_id, component_id, clear_sticky +from aixd_grasshopper.gh_ui_helper import clear_sticky +from aixd_grasshopper.gh_ui_helper import component_id +from aixd_grasshopper.gh_ui_helper import session_id if project_folder and dataset_name: complete_path = os.path.join(project_folder, dataset_name) diff --git a/src/aixd_grasshopper/components/aixd_ShowFolder/code.py b/src/aixd_grasshopper/components/aixd_ShowFolder/code.py index b919140..caafbfb 100644 --- a/src/aixd_grasshopper/components/aixd_ShowFolder/code.py +++ b/src/aixd_grasshopper/components/aixd_ShowFolder/code.py @@ -2,6 +2,5 @@ import os - if open: os.startfile(path) diff --git a/src/aixd_grasshopper/generate_dataset_rhinoscript.py b/src/aixd_grasshopper/generate_dataset_rhinoscript.py index 8aae4ec..e2da575 100644 --- a/src/aixd_grasshopper/generate_dataset_rhinoscript.py +++ b/src/aixd_grasshopper/generate_dataset_rhinoscript.py @@ -6,11 +6,14 @@ (Close all other Grasshopper files to avoid confusion.) """ -import os import math +import os + import rhinoscriptsyntax as rs -from aixd_grasshopper.gh_ui_helper import http_post_request, find_component_by_nickname, TYPES +from aixd_grasshopper.gh_ui_helper import TYPES +from aixd_grasshopper.gh_ui_helper import find_component_by_nickname +from aixd_grasshopper.gh_ui_helper import http_post_request try: import Rhino