PySimultan 0.6.0.7__tar.gz → 0.6.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/PKG-INFO +1 -1
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/CHANGELOG.md +3 -0
- pysimultan-0.6.1/src/PySimultan2/__about__.py +1 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/data_model.py +116 -5
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/default_types.py +17 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/files.py +112 -11
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/utils.py +5 -4
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_directory_and_files.py +11 -1
- pysimultan-0.6.0.7/src/PySimultan2/__about__.py +0 -1
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Data/Assets/__init__.pyi +0 -616
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Data/Components/__init__.pyi +0 -2538
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Data/FlowNetworks/__init__.pyi +0 -499
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Data/Geometry/__init__.pyi +0 -2219
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Data/MultiValues/__init__.pyi +0 -682
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Data/SimMath/__init__.pyi +0 -1654
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Data/SimNetworks/__init__.pyi +0 -442
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Data/SitePlanner/__init__.pyi +0 -193
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Data/Taxonomy/__init__.pyi +0 -367
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Data/Users/__init__.pyi +0 -116
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Data/ValueMappings/__init__.pyi +0 -212
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Data/__init__.pyi +0 -232
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/DataMapping/__init__.pyi +0 -916
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Excel/__init__.pyi +0 -15
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Exceptions/__init__.pyi +0 -268
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Exchange/SimNetworkConnectors/__init__.pyi +0 -32
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Exchange/__init__.pyi +0 -116
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Projects/ManagedFiles/__init__.pyi +0 -433
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Projects/__init__.pyi +0 -435
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Serializer/CODXF/__init__.pyi +0 -103
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Serializer/CSV/__init__.pyi +0 -122
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Serializer/DXF/__init__.pyi +0 -1335
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Serializer/Geometry/__init__.pyi +0 -48
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Serializer/JSON/__init__.pyi +0 -562
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Serializer/METADXF/__init__.pyi +0 -11
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Serializer/PADXF/__init__.pyi +0 -21
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Serializer/PPATH/__init__.pyi +0 -11
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Serializer/Projects/__init__.pyi +0 -112
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Serializer/SIMLINKS/__init__.pyi +0 -5
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Serializer/SPDXF/__init__.pyi +0 -13
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Serializer/SimGeo/__init__.pyi +0 -54
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Serializer/TXDXF/__init__.pyi +0 -46
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Serializer/XMI/__init__.pyi +0 -22
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Serializer/__init__.pyi +0 -32
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Utils/BackgroundWork/__init__.pyi +0 -43
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Utils/Collections/__init__.pyi +0 -216
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Utils/ElevationProvider/__init__.pyi +0 -66
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Utils/Files/__init__.pyi +0 -48
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Utils/Randomize/__init__.pyi +0 -11
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Utils/Streams/__init__.pyi +0 -59
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Utils/UndoRedo/__init__.pyi +0 -133
- pysimultan-0.6.0.7/src/PySimultan2/typings/SIMULTAN/Utils/__init__.pyi +0 -570
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Buffers/Binary/__init__.pyi +0 -248
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Buffers/Text/__init__.pyi +0 -91
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Buffers/__init__.pyi +0 -192
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/CodeDom/Compiler/__init__.pyi +0 -137
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Collections/Concurrent/__init__.pyi +0 -47
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Collections/Generic/__init__.pyi +0 -1293
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Collections/ObjectModel/__init__.pyi +0 -166
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Collections/Specialized/__init__.pyi +0 -82
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Collections/__init__.pyi +0 -403
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/ComponentModel/__init__.pyi +0 -582
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Configuration/Assemblies/__init__.pyi +0 -30
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Diagnostics/CodeAnalysis/__init__.pyi +0 -315
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Diagnostics/Contracts/__init__.pyi +0 -297
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Diagnostics/SymbolStore/__init__.pyi +0 -9
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Diagnostics/Tracing/__init__.pyi +0 -641
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Diagnostics/__init__.pyi +0 -1101
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Globalization/__init__.pyi +0 -1675
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/IO/Enumeration/__init__.pyi +0 -125
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/IO/__init__.pyi +0 -2747
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Linq/Expressions/__init__.pyi +0 -1815
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Net/__init__.pyi +0 -81
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Numerics/__init__.pyi +0 -2853
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Reflection/Emit/__init__.pyi +0 -1945
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Reflection/Metadata/__init__.pyi +0 -24
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Reflection/__init__.pyi +0 -2724
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Resources/__init__.pyi +0 -205
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Runtime/CompilerServices/__init__.pyi +0 -1926
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Runtime/ConstrainedExecution/__init__.pyi +0 -49
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Runtime/ExceptionServices/__init__.pyi +0 -34
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Runtime/InteropServices/ComTypes/__init__.pyi +0 -758
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Runtime/InteropServices/Marshalling/__init__.pyi +0 -461
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Runtime/InteropServices/ObjectiveC/__init__.pyi +0 -48
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Runtime/InteropServices/__init__.pyi +0 -2632
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Runtime/Intrinsics/Arm/__init__.pyi +0 -4757
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Runtime/Intrinsics/Wasm/__init__.pyi +0 -844
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Runtime/Intrinsics/X86/__init__.pyi +0 -5642
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Runtime/Intrinsics/__init__.pyi +0 -4504
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Runtime/Loader/__init__.pyi +0 -63
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Runtime/Remoting/__init__.pyi +0 -7
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Runtime/Serialization/__init__.pyi +0 -269
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Runtime/Versioning/__init__.pyi +0 -200
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Runtime/__init__.pyi +0 -141
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Security/Cryptography/__init__.pyi +0 -39
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Security/Permissions/__init__.pyi +0 -163
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Security/Principal/__init__.pyi +0 -45
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Security/__init__.pyi +0 -347
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Text/Unicode/__init__.pyi +0 -62
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Text/__init__.pyi +0 -1590
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Threading/Tasks/Sources/__init__.pyi +0 -76
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Threading/Tasks/__init__.pyi +0 -1403
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Threading/__init__.pyi +0 -1788
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Xml/Schema/__init__.pyi +0 -1255
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Xml/Serialization/__init__.pyi +0 -16
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Xml/XPath/__init__.pyi +0 -474
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/Xml/__init__.pyi +0 -2410
- pysimultan-0.6.0.7/src/PySimultan2/typings/System/__init__.pyi +0 -17821
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/.gitignore +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/LICENSE.txt +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/README.md +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/pyproject.toml +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/__init__.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/geometry/__init__.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/geometry/geometry_base.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/geometry/utils.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/multi_values.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/object_mapper.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/AssimpNet.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/AvalonDock.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/BruTile.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/ClosedXML.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/ComponentBuilder.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/ComponentBuilder.dll.config +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/ComponentBuilder.runtimeconfig.json +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/ComponentBuilder.xml +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/ControlzEx.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/Cyotek.Drawing.BitmapFont.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/DocumentFormat.OpenXml.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/DotSpatial.Projections.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/ExcelNumberFormat.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/Fluent.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/HelixToolkit.Core.Wpf.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/HelixToolkit.SharpDX.Core.Wpf.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/HelixToolkit.SharpDX.Core.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/HelixToolkit.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/MathNet.Numerics.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/Microsoft.AspNetCore.Authorization.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/Microsoft.AspNetCore.Metadata.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/Microsoft.Extensions.DependencyInjection.Abstractions.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/Microsoft.Extensions.Logging.Abstractions.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/Microsoft.Extensions.Options.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/Microsoft.Extensions.Primitives.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/Microsoft.WindowsAPICodePack.Shell.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/Microsoft.WindowsAPICodePack.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/Microsoft.Xaml.Behaviors.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/Newtonsoft.Json.Bson.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/Newtonsoft.Json.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/Python.Runtime.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/SIMULTAN.Lang.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/SIMULTAN.Lang.xml +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/SIMULTAN.UI.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/SIMULTAN.UI.xml +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/SIMULTAN.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/SIMULTAN.xml +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/SharpDX.D3DCompiler.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/SharpDX.DXGI.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/SharpDX.Direct2D1.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/SharpDX.Direct3D11.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/SharpDX.Direct3D9.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/SharpDX.Mathematics.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/SharpDX.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/Sprache.Calc.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/Sprache.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/System.Collections.Immutable.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/System.Data.OleDb.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/System.Net.Http.Formatting.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/System.Reflection.Metadata.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/System.Reflection.MetadataLoadContext.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/XAMLMarkupExtensions.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/__init__.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/assimp.dll +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/componentmanager.user +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/defaultsettings.xml +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/resources/setup.bat +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/simultan_object.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/taxonomy_maps.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/src/PySimultan2/type_setter_lookup.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/RoomAcoustics_V02.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/__init__.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/readme_examples/__init__.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/readme_examples/create_component.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/readme_examples/create_component_with_taxonomy_slot.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/readme_examples/create_referenced_component.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/readme_examples/create_taxonomies.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/readme_examples/resources/__init__.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/readme_examples/resources/empty_test_excel.xlsx +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/readme_examples/resources/template_example3.yml +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/readme_examples/resources/template_example4.yml +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/readme_examples/resources/template_example_create_typed_component.yml +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/readme_examples/resources/template_example_create_typed_component_with_slots.yml +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/readme_examples/resources/template_example_extend.yml +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/readme_examples/resources/template_example_update_references.yml +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/readme_examples/resources/template_reference_list.yml +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/resources/__init__.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/resources/new_test_file.txt +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/resources/new_test_file2.txt +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_calc_static_zone_temperature.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_calculate_steady_state_temperature.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_circular_references.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_create_geometry.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_default_component.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_files.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_files_load.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_load_geometry.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_load_multi_values.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_new_dll.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_new_project_creation.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_numeric_map.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_parameter_reference.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_pythonnet.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_register_class.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_register_decorator.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_set_attr_property.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_set_dictionary.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_set_properties.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_taxonomie_maps.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_taxonomies.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/test_ui.py +0 -0
- {pysimultan-0.6.0.7 → pysimultan-0.6.1}/tests/ui_minimal_example.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: PySimultan
|
3
|
-
Version: 0.6.
|
3
|
+
Version: 0.6.1
|
4
4
|
Project-URL: Documentation, https://github.com/Bühler Maximilian/PySimultan2#readme
|
5
5
|
Project-URL: Issues, https://github.com/Bühler Maximilian/PySimultan2/issues
|
6
6
|
Project-URL: Source, https://github.com/Bühler Maximilian/PySimultan2
|
@@ -0,0 +1 @@
|
|
1
|
+
version = '0.6.1'
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import atexit
|
2
|
+
import pathlib
|
2
3
|
import os
|
3
4
|
import shutil
|
4
5
|
from uuid import uuid4
|
@@ -528,6 +529,17 @@ class DataModel:
|
|
528
529
|
if isinstance(target_dir, SystemFileInfo):
|
529
530
|
target_dir = target_dir.FullPath
|
530
531
|
|
532
|
+
if target_dir.startswith(self.project.ProjectUnpackFolder.FullPath):
|
533
|
+
return self.project.AddEmptyResource(SystemFileInfo(os.path.join(target_dir, str(filename))))
|
534
|
+
else:
|
535
|
+
return self.project.AddEmptyResource(SystemFileInfo(os.path.join(
|
536
|
+
self.project.ProjectUnpackFolder.FullPath,
|
537
|
+
target_dir,
|
538
|
+
str(filename))
|
539
|
+
)
|
540
|
+
)
|
541
|
+
|
542
|
+
|
531
543
|
return self.project.AddEmptyResource(FileInfo(
|
532
544
|
os.path.join(target_dir, str(filename))
|
533
545
|
)
|
@@ -595,6 +607,9 @@ class DataModel:
|
|
595
607
|
|
596
608
|
if not act_filename.startswith(self.project.ProjectUnpackFolder.FullPath) and target_dir is None:
|
597
609
|
target_dir_str = self.project.ProjectUnpackFolder.FullPath
|
610
|
+
elif act_filename.startswith(self.project.ProjectUnpackFolder.FullPath):
|
611
|
+
target_dir_str = ''
|
612
|
+
|
598
613
|
elif target_dir is not None:
|
599
614
|
if isinstance(target_dir, ResourceDirectoryEntry):
|
600
615
|
target_dir_str = target_dir.CurrentFullPath
|
@@ -626,7 +641,7 @@ class DataModel:
|
|
626
641
|
if target_dir is None:
|
627
642
|
resource = self.project.CopyResourceAsContainedFileEntry(filename,
|
628
643
|
self.project.ProjectUnpackFolder,
|
629
|
-
'1')
|
644
|
+
'{0} ({1})')
|
630
645
|
else:
|
631
646
|
if isinstance(target_dir, str):
|
632
647
|
target_dir = DirectoryInfo(target_dir)
|
@@ -655,6 +670,18 @@ class DataModel:
|
|
655
670
|
logger.error(f'Error while adding resource {filename} to project {self.project_path}: {e}')
|
656
671
|
raise e
|
657
672
|
|
673
|
+
def get_resource(self, key: Union[str, int, SystemFileInfo, DirectoryInfo]):
|
674
|
+
|
675
|
+
if isinstance(key, (int, SystemFileInfo, DirectoryInfo)):
|
676
|
+
return self.project_data_manager.AssetManager.GetResource(key)
|
677
|
+
elif isinstance(key, str):
|
678
|
+
if os.path.isfile(key):
|
679
|
+
return self.project_data_manager.AssetManager.GetResource(SystemFileInfo(key))
|
680
|
+
elif os.path.isdir(key):
|
681
|
+
return self.project_data_manager.AssetManager.GetResource(DirectoryInfo(key))
|
682
|
+
else:
|
683
|
+
return None
|
684
|
+
|
658
685
|
def delete_resource(self, resource: Union[ResourceEntry, SystemFileInfo, ContainedResourceFileEntry]):
|
659
686
|
"""
|
660
687
|
Delete a resource from the project and the project folder
|
@@ -673,18 +700,102 @@ class DataModel:
|
|
673
700
|
self.get_file_infos.cache_clear()
|
674
701
|
return success
|
675
702
|
|
703
|
+
def get_existing_resource_directory_entry(self,
|
704
|
+
full_path: str) -> ResourceDirectoryEntry:
|
705
|
+
return self.project_data_manager.AssetManager.GetResource(DirectoryInfo(full_path))
|
706
|
+
|
676
707
|
def create_resource_directory(self,
|
677
708
|
name: str,
|
678
|
-
parent_directory: DirectoryInfo=None,
|
709
|
+
parent_directory: Union[DirectoryInfo, str, pathlib.Path]=None,
|
710
|
+
create_parents: bool = True,
|
679
711
|
collision_name_format: str = '{0} ({1})') -> ResourceEntry:
|
680
712
|
|
681
713
|
if parent_directory is None:
|
682
|
-
|
714
|
+
if name.startswith(self.project.ProjectUnpackFolder.FullPath):
|
715
|
+
full_path = name
|
716
|
+
else:
|
717
|
+
full_path = os.path.join(self.project.ProjectUnpackFolder.FullPath, name)
|
718
|
+
else:
|
719
|
+
if isinstance(parent_directory, str):
|
720
|
+
if not parent_directory.startswith(self.project.ProjectUnpackFolder.FullPath):
|
721
|
+
full_path = os.path.join(self.project.ProjectUnpackFolder.FullPath, parent_directory, name)
|
722
|
+
else:
|
723
|
+
full_path = parent_directory
|
724
|
+
elif isinstance(parent_directory, DirectoryInfo):
|
725
|
+
full_path = os.path.join(parent_directory.FullPath, name)
|
726
|
+
elif isinstance(parent_directory, pathlib.Path):
|
727
|
+
full_path = os.path.join(parent_directory, name)
|
728
|
+
|
729
|
+
|
730
|
+
existing_resource_directory = self.get_existing_resource_directory_entry(str(full_path))
|
731
|
+
if existing_resource_directory is not None:
|
732
|
+
return existing_resource_directory
|
733
|
+
|
734
|
+
if str(pathlib.Path(full_path).parents[0]) == self.project.ProjectUnpackFolder.FullPath:
|
735
|
+
# create directory in ProjectUnpackFolder
|
736
|
+
resource_directory_entry = self.get_existing_resource_directory_entry(full_path)
|
737
|
+
if resource_directory_entry is not None:
|
738
|
+
return resource_directory_entry
|
739
|
+
else:
|
740
|
+
new_resource_entry = self.project.CreateResourceDirIn(
|
741
|
+
str(
|
742
|
+
pathlib.Path(full_path).relative_to(pathlib.Path(self.project.ProjectUnpackFolder.FullPath))
|
743
|
+
),
|
744
|
+
None,
|
745
|
+
collision_name_format)
|
746
|
+
if new_resource_entry not in self.project_data_manager.AssetManager.Resources:
|
747
|
+
self.project_data_manager.AssetManager.AddResourceEntry(new_resource_entry)
|
748
|
+
return new_resource_entry
|
683
749
|
else:
|
684
|
-
|
750
|
+
if parent_directory is None:
|
751
|
+
parent = None
|
752
|
+
for i in reversed(range(pathlib.Path(full_path).parents.__len__())):
|
753
|
+
parent = pathlib.Path(full_path).parents[i]
|
754
|
+
if str(parent) in self.project.ProjectUnpackFolder.FullPath:
|
755
|
+
continue
|
756
|
+
if not os.path.exists(parent):
|
757
|
+
if create_parents:
|
758
|
+
parent_directory = self.create_resource_directory(parent.name,
|
759
|
+
parent_directory=parent.parents[0],
|
760
|
+
create_parents=False)
|
761
|
+
else:
|
762
|
+
raise FileNotFoundError(f'Parent directory {parent} does not exist')
|
763
|
+
else:
|
764
|
+
parent_directory = self.get_existing_resource_directory_entry(str(parent))
|
685
765
|
|
686
|
-
|
766
|
+
if parent_directory is None:
|
767
|
+
new_resource_entry = self.project.CreateResourceDirIn(
|
768
|
+
str(
|
769
|
+
pathlib.Path(full_path).relative_to(pathlib.Path(self.project.ProjectUnpackFolder.FullPath))
|
770
|
+
),
|
771
|
+
parent_directory,
|
772
|
+
collision_name_format)
|
773
|
+
self.project_data_manager.AssetManager.AddResourceEntry(new_resource_entry)
|
774
|
+
return new_resource_entry
|
775
|
+
else:
|
776
|
+
if isinstance(parent_directory, pathlib.Path):
|
777
|
+
target = str(pathlib.Path(full_path).relative_to(parent_directory))
|
778
|
+
parent_directory_target = DirectoryInfo(str(parent_directory))
|
779
|
+
elif isinstance(parent_directory, str):
|
780
|
+
target = str(pathlib.Path(full_path).relative_to(pathlib.Path(parent_directory)))
|
781
|
+
parent_directory_target = DirectoryInfo(parent_directory)
|
782
|
+
elif isinstance(parent_directory, DirectoryInfo):
|
783
|
+
target = str(pathlib.Path(full_path).relative_to(pathlib.Path(parent_directory.CurrentFullPath)))
|
784
|
+
parent_directory_target = parent_directory
|
785
|
+
elif isinstance(parent_directory, ResourceDirectoryEntry):
|
786
|
+
target = str(pathlib.Path(full_path).relative_to(pathlib.Path(parent_directory.CurrentFullPath)))
|
787
|
+
parent_directory_target = DirectoryInfo(parent_directory.CurrentFullPath)
|
687
788
|
|
789
|
+
else:
|
790
|
+
raise ValueError(f'Parent directory {parent_directory} not found')
|
791
|
+
|
792
|
+
new_resource_entry = self.project.CreateResourceDirIn(
|
793
|
+
target,
|
794
|
+
parent_directory_target,
|
795
|
+
collision_name_format)
|
796
|
+
if new_resource_entry.manager is None:
|
797
|
+
self.project_data_manager.AssetManager.AddResourceEntry(new_resource_entry)
|
798
|
+
return new_resource_entry
|
688
799
|
|
689
800
|
def add_table(self, table: SimMultiValueBigTable):
|
690
801
|
self.project_data_manager.ValueManager.Add(table)
|
@@ -686,5 +686,22 @@ class ComponentDictionary(SimultanObject):
|
|
686
686
|
}
|
687
687
|
}
|
688
688
|
|
689
|
+
def get_raw_attr(self, attr: Optional[str] = None, text_or_key: Optional[str] = None):
|
690
|
+
if attr is not None:
|
691
|
+
content = self._taxonomy_map.get_content_by_property_name(attr)
|
692
|
+
if content is None:
|
693
|
+
content = Content(text_or_key=f'__dict_key__{attr}',
|
694
|
+
property_name=attr,
|
695
|
+
type=None,
|
696
|
+
unit=None,
|
697
|
+
documentation=f'Property {attr} in ComponentDictionary',
|
698
|
+
component_policy=self.component_policy)
|
699
|
+
self._taxonomy_map.add_content(content)
|
700
|
+
|
701
|
+
return get_component_taxonomy_entry(self._wrapped_obj, content.text_or_key)
|
702
|
+
|
703
|
+
if text_or_key is not None:
|
704
|
+
return get_component_taxonomy_entry(self._wrapped_obj, text_or_key)
|
705
|
+
|
689
706
|
|
690
707
|
component_dict_map = ComponentDictionary._taxonomy_map
|
@@ -3,10 +3,12 @@ This module contains classes and functions to handle files and directories.
|
|
3
3
|
"""
|
4
4
|
from __future__ import annotations
|
5
5
|
from datetime import datetime
|
6
|
+
import glob
|
6
7
|
|
7
8
|
import contextlib
|
8
9
|
import os
|
9
10
|
import io
|
11
|
+
import re
|
10
12
|
import shutil
|
11
13
|
import tempfile
|
12
14
|
from typing import List, Union, Optional
|
@@ -124,6 +126,13 @@ def create_asset_from_string(filename: str,
|
|
124
126
|
:param tag: Tag to be added to the asset.
|
125
127
|
:return: ResourceFileEntry
|
126
128
|
"""
|
129
|
+
|
130
|
+
# check if file already exists
|
131
|
+
if target_dir is not None:
|
132
|
+
if isinstance(target_dir, DirectoryInfo):
|
133
|
+
target_dir = target_dir.full_path
|
134
|
+
|
135
|
+
|
127
136
|
with tempdir() as dirpath:
|
128
137
|
filepath = os.path.join(dirpath, filename)
|
129
138
|
with open(filepath, 'w') as f:
|
@@ -290,11 +299,35 @@ class FileInfo(object, metaclass=MetaMock):
|
|
290
299
|
"""
|
291
300
|
|
292
301
|
data_model = kwargs.get('data_model', config.get_default_data_model())
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
302
|
+
|
303
|
+
if target_dir is not None:
|
304
|
+
if isinstance(target_dir, DirectoryInfo):
|
305
|
+
full_path = os.path.join(target_dir.full_path, filename)
|
306
|
+
elif isinstance(target_dir, ResourceDirectoryEntry):
|
307
|
+
full_path = os.path.join(target_dir.CurrentFullPath, filename)
|
308
|
+
elif isinstance(target_dir, str):
|
309
|
+
full_path = os.path.join(target_dir, filename)
|
310
|
+
else:
|
311
|
+
if not filename.startswith(str(data_model.project.ProjectUnpackFolder)):
|
312
|
+
full_path = os.path.join(str(data_model.project.ProjectUnpackFolder), filename)
|
313
|
+
else:
|
314
|
+
full_path = filename
|
315
|
+
|
316
|
+
if os.path.isfile(full_path):
|
317
|
+
# check if resource entry exists
|
318
|
+
resource = data_model.get_resource(full_path)
|
319
|
+
if resource is None:
|
320
|
+
resource = create_asset_from_string(filename,
|
321
|
+
content,
|
322
|
+
target_dir=target_dir,
|
323
|
+
*args,
|
324
|
+
**kwargs)
|
325
|
+
else:
|
326
|
+
resource = create_asset_from_string(filename,
|
327
|
+
content,
|
328
|
+
target_dir=target_dir,
|
329
|
+
*args,
|
330
|
+
**kwargs)
|
298
331
|
|
299
332
|
file_info = cls(resource_entry=resource,
|
300
333
|
data_model=data_model)
|
@@ -332,6 +365,7 @@ class FileInfo(object, metaclass=MetaMock):
|
|
332
365
|
:param kwargs:
|
333
366
|
"""
|
334
367
|
# do custom stuff here
|
368
|
+
self.deleted = False
|
335
369
|
self._resource_entry: Union[ResourceFileEntry, ContainedResourceFileEntry, None] = None
|
336
370
|
|
337
371
|
if file_path is not None:
|
@@ -365,7 +399,7 @@ class FileInfo(object, metaclass=MetaMock):
|
|
365
399
|
|
366
400
|
@property
|
367
401
|
def resource_entry(self) -> Union[ResourceFileEntry, ContainedResourceFileEntry, None]:
|
368
|
-
if self._resource_entry is None:
|
402
|
+
if self._resource_entry is None and not self.deleted:
|
369
403
|
if self.data_model is None:
|
370
404
|
logger.warning(f'No data model provided. Using default data model: {config.get_default_data_model().id}.')
|
371
405
|
self.data_model = config.get_default_data_model()
|
@@ -453,7 +487,10 @@ class FileInfo(object, metaclass=MetaMock):
|
|
453
487
|
self.file_obj.close()
|
454
488
|
|
455
489
|
def __repr__(self):
|
456
|
-
|
490
|
+
if not self.deleted:
|
491
|
+
return f'FileInfo({self.file_path})'
|
492
|
+
else:
|
493
|
+
return f'FileInfo({self.file_path}) (deleted)'
|
457
494
|
|
458
495
|
def move(self, new_directory_path: Union[str, DirectoryInfo]) -> FileInfo:
|
459
496
|
|
@@ -533,7 +570,11 @@ class FileInfo(object, metaclass=MetaMock):
|
|
533
570
|
del self._cls_instances[self.resource_entry.Key]
|
534
571
|
self.data_model.delete_resource(self.resource_entry)
|
535
572
|
|
536
|
-
|
573
|
+
try:
|
574
|
+
os.remove(self.file_path)
|
575
|
+
except FileNotFoundError:
|
576
|
+
pass
|
577
|
+
self.deleted = True
|
537
578
|
|
538
579
|
def to_json(self) -> dict:
|
539
580
|
|
@@ -613,6 +654,8 @@ class DirectoryInfo(object, metaclass=DirectoryInfoMetaMock):
|
|
613
654
|
*args,
|
614
655
|
**kwargs):
|
615
656
|
|
657
|
+
self.deleted = False
|
658
|
+
|
616
659
|
self._resource_entry: Optional[ResourceDirectoryEntry] = None
|
617
660
|
self._helper_file: Optional[FileInfo] = None
|
618
661
|
self.data_model: Optional[DataModel] = kwargs.get('data_model', None)
|
@@ -635,7 +678,7 @@ class DirectoryInfo(object, metaclass=DirectoryInfoMetaMock):
|
|
635
678
|
|
636
679
|
@property
|
637
680
|
def helper_file(self) -> Optional[FileInfo]:
|
638
|
-
if self._helper_file is None or not isinstance(self._helper_file, FileInfo):
|
681
|
+
if (self._helper_file is None or not isinstance(self._helper_file, FileInfo)) and not self.deleted:
|
639
682
|
self._helper_file = self.add_file('__dir_helper_file__')
|
640
683
|
|
641
684
|
return self._helper_file
|
@@ -646,7 +689,7 @@ class DirectoryInfo(object, metaclass=DirectoryInfoMetaMock):
|
|
646
689
|
|
647
690
|
@property
|
648
691
|
def resource_entry(self) -> Optional[ResourceDirectoryEntry]:
|
649
|
-
if self._resource_entry is None:
|
692
|
+
if self._resource_entry is None and not self.deleted:
|
650
693
|
if self.data_model is None:
|
651
694
|
logger.warning(
|
652
695
|
f'No data model provided. Using default data model: {config.get_default_data_model().id}.')
|
@@ -795,5 +838,63 @@ class DirectoryInfo(object, metaclass=DirectoryInfoMetaMock):
|
|
795
838
|
def add_tag(self, tag: SimTaxonomyEntry) -> None:
|
796
839
|
add_tag_to_resource(self.resource_entry, tag)
|
797
840
|
|
841
|
+
def delete(self):
|
842
|
+
|
843
|
+
for file in self.files:
|
844
|
+
file.delete()
|
845
|
+
|
846
|
+
# delete helper file
|
847
|
+
if self.helper_file is not None:
|
848
|
+
self.helper_file.delete()
|
849
|
+
|
850
|
+
if self.resource_entry is not None:
|
851
|
+
if self.resource_entry.Key in self._cls_instances:
|
852
|
+
del self._cls_instances[self.resource_entry.Key]
|
853
|
+
self.data_model.delete_resource(self.resource_entry)
|
854
|
+
|
855
|
+
shutil.rmtree(self.full_path)
|
856
|
+
self.deleted = True
|
857
|
+
|
858
|
+
def delete_files(self,
|
859
|
+
pattern: Optional[str] = None,
|
860
|
+
recursive: bool = False) -> None:
|
861
|
+
"""
|
862
|
+
Delete files by pattern.
|
863
|
+
:param pattern: Pattern to match files. Default is None. if None, all files are deleted.
|
864
|
+
:param recursive: If True, delete files recursively.
|
865
|
+
:return:
|
866
|
+
"""
|
867
|
+
|
868
|
+
if pattern:
|
869
|
+
matching = glob.glob(self.full_path + f'/{pattern}', recursive=recursive)
|
870
|
+
|
871
|
+
for file in self.files:
|
872
|
+
if pattern is None or file.file_path in matching:
|
873
|
+
logger.debug(f'Deleting file: {file.filename}')
|
874
|
+
file.delete()
|
875
|
+
|
876
|
+
if recursive:
|
877
|
+
for sub_dir in self.sub_directories:
|
878
|
+
sub_dir.delete_files(pattern=pattern, recursive=recursive)
|
879
|
+
|
880
|
+
def delete_subdirectories(self,
|
881
|
+
pattern: Optional[str] = None,
|
882
|
+
recursive: bool = False) -> None:
|
883
|
+
|
884
|
+
"""
|
885
|
+
Delete subdirectories by pattern.
|
886
|
+
:param pattern: Regex pattern to match subdirectories. Default is None. If None, all subdirectories are deleted.
|
887
|
+
:param recursive: If True, delete subdirectories recursively.
|
888
|
+
:return:
|
889
|
+
"""
|
890
|
+
|
891
|
+
for sub_dir in self.sub_directories:
|
892
|
+
if pattern is None or re.match(pattern, sub_dir.relative_path):
|
893
|
+
logger.debug(f'Deleting subdirectory: {sub_dir.relative_path}')
|
894
|
+
sub_dir.delete()
|
895
|
+
|
798
896
|
def __repr__(self):
|
799
|
-
|
897
|
+
if not self.deleted:
|
898
|
+
return f'DirectoryInfo(key:{self.key}, hash: {hash(self)}; {self.full_path})'
|
899
|
+
else:
|
900
|
+
return f'(Deleted) DirectoryInfo(key:{self.key}, hash: {hash(self)}; {self.full_path}) (deleted)'
|
@@ -181,7 +181,7 @@ def get_or_create_taxonomy_entry(name: str,
|
|
181
181
|
if key in taxonomy_entries.keys():
|
182
182
|
return taxonomy_entries[key]
|
183
183
|
if create:
|
184
|
-
new_sim_taxonomy_entry = SimTaxonomyEntry(key, name, description)
|
184
|
+
new_sim_taxonomy_entry = SimTaxonomyEntry(key, name, description, None)
|
185
185
|
if sim_taxonomy is not None:
|
186
186
|
sim_taxonomy.Entries.Add(new_sim_taxonomy_entry)
|
187
187
|
return new_sim_taxonomy_entry
|
@@ -1132,7 +1132,9 @@ def set_property_to_sim_component(value: Union[SimComponent, SimultanObject, lis
|
|
1132
1132
|
else:
|
1133
1133
|
component._wrapped_obj.Components.RemoveItem(component_idx)
|
1134
1134
|
if ref_component_idx is not None:
|
1135
|
-
if
|
1135
|
+
if component._wrapped_obj.ReferencedComponents.Items[ref_component_idx].Target is None:
|
1136
|
+
component._wrapped_obj.ReferencedComponents.RemoveItem(ref_component_idx)
|
1137
|
+
elif wrapped_obj.Id.Equals(component._wrapped_obj.ReferencedComponents.Items[ref_component_idx].Target.Id):
|
1136
1138
|
return
|
1137
1139
|
else:
|
1138
1140
|
component._wrapped_obj.ReferencedComponents.RemoveItem(ref_component_idx)
|
@@ -1373,7 +1375,7 @@ def set_property_to_dict(value: dict,
|
|
1373
1375
|
return
|
1374
1376
|
|
1375
1377
|
if component_idx is not None:
|
1376
|
-
|
1378
|
+
sub_component = component._wrapped_obj.Components.Items[component_idx].Component
|
1377
1379
|
|
1378
1380
|
if 'ComponentDictionary' in [x.Target.Key for x in component.Slots]:
|
1379
1381
|
if not hasattr(component, '_object_mapper'):
|
@@ -1393,7 +1395,6 @@ def set_property_to_dict(value: dict,
|
|
1393
1395
|
component_dict.update(value)
|
1394
1396
|
return component_dict
|
1395
1397
|
else:
|
1396
|
-
component._data_model.remove_subcomponent(component)
|
1397
1398
|
component._wrapped_obj.Components.RemoveItem(component_idx)
|
1398
1399
|
component_idx = None
|
1399
1400
|
if ref_component_idx is not None:
|
@@ -19,6 +19,11 @@ def test_files_and_directory_creation():
|
|
19
19
|
new_directory_info = DirectoryInfo(path='directory_info_dir',
|
20
20
|
data_model=new_data_model)
|
21
21
|
|
22
|
+
|
23
|
+
new_directory_info = DirectoryInfo(path='not_existing_dir/directory_to_create',
|
24
|
+
data_model=new_data_model)
|
25
|
+
|
26
|
+
|
22
27
|
print(new_data_model.file_directories)
|
23
28
|
|
24
29
|
print(new_directory_info.resource_entry)
|
@@ -148,7 +153,12 @@ def test_load_component_with_directory():
|
|
148
153
|
mapper.clear()
|
149
154
|
|
150
155
|
|
156
|
+
def test_complex_file_and_directory_info():
|
157
|
+
pass
|
158
|
+
|
159
|
+
|
151
160
|
if __name__ == '__main__':
|
152
|
-
|
161
|
+
test_files_and_directory_creation()
|
162
|
+
test_complex_file_and_directory_info()
|
153
163
|
test_component_with_directory()
|
154
164
|
test_load_component_with_directory()
|
@@ -1 +0,0 @@
|
|
1
|
-
version = '0.6.0.7'
|