lib und Elemente Ordner mit __init__ versehen, so dass man beim import die Verzeichnisse durch Punktpfade angeben kann
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from pydantic import BaseModel, Field, field_validator
|
from pydantic import BaseModel, Field, field_validator
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
import block_methoden
|
from lib import block_methoden
|
||||||
|
|
||||||
RADIUS = 400
|
RADIUS = 400
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from pydantic import BaseModel, Field, field_validator
|
from pydantic import BaseModel, Field, field_validator
|
||||||
import re
|
import re
|
||||||
import plant2dxf
|
|
||||||
import math
|
import math
|
||||||
from ezdxf.math import Matrix44
|
from ezdxf.math import Matrix44
|
||||||
import block_methoden
|
from lib import plant2dxf
|
||||||
|
from lib import block_methoden
|
||||||
|
|
||||||
|
|
||||||
class Gefaellestrecke(BaseModel):
|
class Gefaellestrecke(BaseModel):
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ from ezdxf.entities import Line
|
|||||||
import math
|
import math
|
||||||
from pydantic import BaseModel, Field, field_validator
|
from pydantic import BaseModel, Field, field_validator
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
import plant2dxf
|
from lib import plant2dxf
|
||||||
import block_methoden
|
from lib import block_methoden
|
||||||
|
|
||||||
|
|
||||||
ATTR_TAG = "TeileId" # Attributtag im Block
|
ATTR_TAG = "TeileId" # Attributtag im Block
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ from ezdxf.entities import Line
|
|||||||
import math
|
import math
|
||||||
from pydantic import BaseModel, Field, field_validator
|
from pydantic import BaseModel, Field, field_validator
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
import plant2dxf
|
from lib import plant2dxf
|
||||||
import block_methoden
|
from lib import block_methoden
|
||||||
|
|
||||||
|
|
||||||
class Omniflo(BaseModel):
|
class Omniflo(BaseModel):
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ from ezdxf.entities import Line
|
|||||||
from ezdxf.math import Matrix44
|
from ezdxf.math import Matrix44
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
import block_methoden
|
from lib import block_methoden
|
||||||
|
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ oder als separate Test-Datei ausgeführt werden.
|
|||||||
import unittest
|
import unittest
|
||||||
import math
|
import math
|
||||||
from unittest.mock import Mock, MagicMock
|
from unittest.mock import Mock, MagicMock
|
||||||
from VarioFoerderer import (
|
from .VarioFoerderer import (
|
||||||
VarioFoerderer,
|
VarioFoerderer,
|
||||||
Foerderrichtung,
|
Foerderrichtung,
|
||||||
MotorUmlenkConfig,
|
MotorUmlenkConfig,
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import json
|
|||||||
import re
|
import re
|
||||||
import configparser
|
import configparser
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from utils import check_environment_var, setup_logger
|
from lib.utils import check_environment_var, setup_logger
|
||||||
from Elemente import Kreisel, VarioFoerderer,Gefaellestrecke,Angetriebene_Kurve,Bt_element,Omniflo, Eckrad
|
from lib.Elemente import Kreisel, VarioFoerderer,Gefaellestrecke,Angetriebene_Kurve,Bt_element,Omniflo, Eckrad
|
||||||
# --------------------------------------------------------- CFG-Leser für shapes.cfg
|
# --------------------------------------------------------- CFG-Leser für shapes.cfg
|
||||||
def get_shape_cfg(teileart, cfg_path, logger=None):
|
def get_shape_cfg(teileart, cfg_path, logger=None):
|
||||||
parser = configparser.ConfigParser()
|
parser = configparser.ConfigParser()
|
||||||
@@ -219,4 +219,4 @@ def normalize_func_name(name):
|
|||||||
.replace('.', '_')
|
.replace('.', '_')
|
||||||
.replace('-', '_')
|
.replace('-', '_')
|
||||||
.lower()
|
.lower()
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from ezdxf.entities import Line
|
from ezdxf.entities import Line
|
||||||
import math
|
import math
|
||||||
import plant2dxf
|
from lib import plant2dxf
|
||||||
import block_methoden
|
from lib import block_methoden
|
||||||
|
|
||||||
RADIUS = 400
|
RADIUS = 400
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import math
|
import math
|
||||||
import plant2dxf
|
from lib import plant2dxf
|
||||||
from ezdxf import units
|
from ezdxf import units
|
||||||
from ezdxf.entities import Line
|
from ezdxf.entities import Line
|
||||||
from ezdxf.addons import importer
|
from ezdxf.addons import importer
|
||||||
|
|||||||
+6
-6
@@ -14,9 +14,9 @@ from ezdxf import units
|
|||||||
from ezdxf.entities import Line
|
from ezdxf.entities import Line
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import math
|
import math
|
||||||
from utils import check_environment_var, setup_logger
|
from lib.utils import check_environment_var, setup_logger
|
||||||
from handler_context import HandlerContext
|
from lib.handler_context import HandlerContext
|
||||||
from Elemente import (
|
from lib.Elemente import (
|
||||||
Kreisel,
|
Kreisel,
|
||||||
VarioFoerderer,
|
VarioFoerderer,
|
||||||
Gefaellestrecke,
|
Gefaellestrecke,
|
||||||
@@ -25,9 +25,9 @@ from Elemente import (
|
|||||||
Omniflo,
|
Omniflo,
|
||||||
Eckrad,
|
Eckrad,
|
||||||
)
|
)
|
||||||
import as_es_methoden
|
from lib import as_es_methoden
|
||||||
import block_methoden
|
from lib import block_methoden
|
||||||
import arbeiten_mit_csv
|
from lib import arbeiten_mit_csv
|
||||||
|
|
||||||
# --------------------------------------------------------- Konstante Parameter
|
# --------------------------------------------------------- Konstante Parameter
|
||||||
ATTR_TAG = "TeileId" # Attributtag im Block
|
ATTR_TAG = "TeileId" # Attributtag im Block
|
||||||
|
|||||||
Reference in New Issue
Block a user