From 2ef5ee814677f9a03640bb69b8bd2d41a7e17f5e Mon Sep 17 00:00:00 2001 From: Jonathon Broughton <760691+jsdbroughton@users.noreply.github.com> Date: Thu, 6 Feb 2025 21:42:32 +0000 Subject: [PATCH] Imports (#18) * Add project configuration and refactor logic - Created .gitignore to exclude IDE files. - Added project module configuration for Python. - Set up inspection profiles for code quality checks. - Refactored main function logic into separate modules for better organisation. - Introduced helper functions for object manipulation and rule processing. - Implemented spreadsheet reading functionality to dynamically load rules. - Added tests for integration with the Speckle server. * Update import paths for consistency - Changed relative imports to absolute imports for clarity. - Ensured all module references are consistent across files. --- src/function.py | 8 ++++---- src/rules.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/function.py b/src/function.py index c9e44a3..fb17b85 100644 --- a/src/function.py +++ b/src/function.py @@ -5,10 +5,10 @@ Use the automation_context module to wrap your function in an Automate context h from speckle_automate import AutomationContext, AutomateBase -from rules import apply_rules_to_objects -from inputs import FunctionInputs -from helpers import flatten_base -from spreadsheet import read_rules_from_spreadsheet +from src.rules import apply_rules_to_objects +from src.inputs import FunctionInputs +from src.helpers import flatten_base +from src.spreadsheet import read_rules_from_spreadsheet def automate_function( diff --git a/src/rules.py b/src/rules.py index 7525539..1ae98b8 100644 --- a/src/rules.py +++ b/src/rules.py @@ -5,7 +5,7 @@ from Levenshtein import ratio import pandas as pd import re -from helpers import speckle_print +from src.helpers import speckle_print # We're going to define a set of rules that will allow us to filter and