sort keys in the entity to type mapping

This commit is contained in:
Andrej730
2023-07-31 11:46:27 +05:00
parent 0e69f484f4
commit e86d3731ff
4 changed files with 128 additions and 128 deletions
@@ -79,7 +79,7 @@ def generate_ifc4_entity_map(filepath, schema_name, manual_corrections={}):
check_all_types_are_mapped(schema, type_to_entity_map)
schema_version = schema_name.lower().strip("ifc")
with open(f"src/ifcopenshell-python/ifcopenshell/util/entity_to_type_map_{schema_version}.json", "w") as f:
json.dump(entity_to_type_map, f, indent=4, sort_keys=False)
json.dump(entity_to_type_map, f, indent=4, sort_keys=True)
return entity_to_type_map
@@ -124,7 +124,7 @@ def generate_ifc2x3_entity_map():
check_all_types_are_mapped(schema2x3, type_to_entity_map2x3)
with open("src/ifcopenshell-python/ifcopenshell/util/entity_to_type_map_2x3.json", "w") as f:
json.dump(entity_to_type_map, f, indent=4, sort_keys=False)
json.dump(entity_to_type_map, f, indent=4, sort_keys=True)
return entity_to_type_map
@@ -95,11 +95,6 @@
"IfcFurnishingElementType",
"IfcTransportElementType"
],
"IfcElectricalElement": [
"IfcDistributionElementType",
"IfcFurnishingElementType",
"IfcTransportElementType"
],
"IfcElectricDistributionPoint": [
"IfcAirTerminalBoxType",
"IfcDamperType",
@@ -109,6 +104,11 @@
"IfcSwitchingDeviceType",
"IfcValveType"
],
"IfcElectricalElement": [
"IfcDistributionElementType",
"IfcFurnishingElementType",
"IfcTransportElementType"
],
"IfcElement": [
"IfcDistributionElementType",
"IfcFurnishingElementType",
@@ -20,6 +20,9 @@
"IfcBeam": [
"IfcBeamType"
],
"IfcBeamStandardCase": [
"IfcBeamType"
],
"IfcBoiler": [
"IfcBoilerType"
],
@@ -50,12 +53,18 @@
"IfcChimney": [
"IfcChimneyType"
],
"IfcCivilElement": [
"IfcCivilElementType"
],
"IfcCoil": [
"IfcCoilType"
],
"IfcColumn": [
"IfcColumnType"
],
"IfcColumnStandardCase": [
"IfcColumnType"
],
"IfcCommunicationsAppliance": [
"IfcCommunicationsApplianceType"
],
@@ -89,10 +98,23 @@
"IfcDistributionChamberElement": [
"IfcDistributionChamberElementType"
],
"IfcDistributionControlElement": [
"IfcDistributionElementType"
],
"IfcDistributionElement": [
"IfcDistributionElementType"
],
"IfcDistributionFlowElement": [
"IfcDistributionElementType"
],
"IfcDoor": [
"IfcDoorType",
"IfcDoorStyle"
],
"IfcDoorStandardCase": [
"IfcDoorType",
"IfcDoorStyle"
],
"IfcDuctFitting": [
"IfcDuctFittingType"
],
@@ -123,6 +145,9 @@
"IfcElementAssembly": [
"IfcElementAssemblyType"
],
"IfcEnergyConversionDevice": [
"IfcDistributionElementType"
],
"IfcEngine": [
"IfcEngineType"
],
@@ -144,15 +169,39 @@
"IfcFireSuppressionTerminal": [
"IfcFireSuppressionTerminalType"
],
"IfcFlowController": [
"IfcDistributionElementType"
],
"IfcFlowFitting": [
"IfcDistributionElementType"
],
"IfcFlowInstrument": [
"IfcFlowInstrumentType"
],
"IfcFlowMeter": [
"IfcFlowMeterType"
],
"IfcFlowMovingDevice": [
"IfcDistributionElementType"
],
"IfcFlowSegment": [
"IfcDistributionElementType"
],
"IfcFlowStorageDevice": [
"IfcDistributionElementType"
],
"IfcFlowTerminal": [
"IfcDistributionElementType"
],
"IfcFlowTreatmentDevice": [
"IfcDistributionElementType"
],
"IfcFooting": [
"IfcFootingType"
],
"IfcFurnishingElement": [
"IfcFurnishingElementType"
],
"IfcFurniture": [
"IfcFurnitureType"
],
@@ -186,6 +235,9 @@
"IfcMember": [
"IfcMemberType"
],
"IfcMemberStandardCase": [
"IfcMemberType"
],
"IfcMotorConnection": [
"IfcMotorConnectionType"
],
@@ -204,6 +256,9 @@
"IfcPlate": [
"IfcPlateType"
],
"IfcPlateStandardCase": [
"IfcPlateType"
],
"IfcProtectiveDevice": [
"IfcProtectiveDeviceType"
],
@@ -243,6 +298,12 @@
"IfcSlab": [
"IfcSlabType"
],
"IfcSlabElementedCase": [
"IfcSlabType"
],
"IfcSlabStandardCase": [
"IfcSlabType"
],
"IfcSolarDevice": [
"IfcSolarDeviceType"
],
@@ -303,6 +364,12 @@
"IfcWall": [
"IfcWallType"
],
"IfcWallElementedCase": [
"IfcWallType"
],
"IfcWallStandardCase": [
"IfcWallType"
],
"IfcWasteTerminal": [
"IfcWasteTerminalType"
],
@@ -310,73 +377,6 @@
"IfcWindowType",
"IfcWindowStyle"
],
"IfcCivilElement": [
"IfcCivilElementType"
],
"IfcFurnishingElement": [
"IfcFurnishingElementType"
],
"IfcDistributionElement": [
"IfcDistributionElementType"
],
"IfcBeamStandardCase": [
"IfcBeamType"
],
"IfcColumnStandardCase": [
"IfcColumnType"
],
"IfcDistributionControlElement": [
"IfcDistributionElementType"
],
"IfcDistributionFlowElement": [
"IfcDistributionElementType"
],
"IfcDoorStandardCase": [
"IfcDoorType",
"IfcDoorStyle"
],
"IfcEnergyConversionDevice": [
"IfcDistributionElementType"
],
"IfcFlowController": [
"IfcDistributionElementType"
],
"IfcFlowFitting": [
"IfcDistributionElementType"
],
"IfcFlowMovingDevice": [
"IfcDistributionElementType"
],
"IfcFlowSegment": [
"IfcDistributionElementType"
],
"IfcFlowStorageDevice": [
"IfcDistributionElementType"
],
"IfcFlowTerminal": [
"IfcDistributionElementType"
],
"IfcFlowTreatmentDevice": [
"IfcDistributionElementType"
],
"IfcMemberStandardCase": [
"IfcMemberType"
],
"IfcPlateStandardCase": [
"IfcPlateType"
],
"IfcSlabElementedCase": [
"IfcSlabType"
],
"IfcSlabStandardCase": [
"IfcSlabType"
],
"IfcWallElementedCase": [
"IfcWallType"
],
"IfcWallStandardCase": [
"IfcWallType"
],
"IfcWindowStandardCase": [
"IfcWindowType",
"IfcWindowStyle"
@@ -32,6 +32,9 @@
"IfcBuildingElementProxy": [
"IfcBuildingElementProxyType"
],
"IfcBuiltElement": [
"IfcBuiltElementType"
],
"IfcBurner": [
"IfcBurnerType"
],
@@ -56,6 +59,9 @@
"IfcChimney": [
"IfcChimneyType"
],
"IfcCivilElement": [
"IfcCivilElementType"
],
"IfcCoil": [
"IfcCoilType"
],
@@ -107,6 +113,15 @@
"IfcDistributionChamberElement": [
"IfcDistributionChamberElementType"
],
"IfcDistributionControlElement": [
"IfcDistributionElementType"
],
"IfcDistributionElement": [
"IfcDistributionElementType"
],
"IfcDistributionFlowElement": [
"IfcDistributionElementType"
],
"IfcDoor": [
"IfcDoorType"
],
@@ -119,6 +134,12 @@
"IfcDuctSilencer": [
"IfcDuctSilencerType"
],
"IfcEarthworksElement": [
"IfcBuiltElementType"
],
"IfcEarthworksFill": [
"IfcBuiltElementType"
],
"IfcElectricAppliance": [
"IfcElectricApplianceType"
],
@@ -143,6 +164,9 @@
"IfcElementAssembly": [
"IfcElementAssemblyType"
],
"IfcEnergyConversionDevice": [
"IfcDistributionElementType"
],
"IfcEngine": [
"IfcEngineType"
],
@@ -164,15 +188,39 @@
"IfcFireSuppressionTerminal": [
"IfcFireSuppressionTerminalType"
],
"IfcFlowController": [
"IfcDistributionElementType"
],
"IfcFlowFitting": [
"IfcDistributionElementType"
],
"IfcFlowInstrument": [
"IfcFlowInstrumentType"
],
"IfcFlowMeter": [
"IfcFlowMeterType"
],
"IfcFlowMovingDevice": [
"IfcDistributionElementType"
],
"IfcFlowSegment": [
"IfcDistributionElementType"
],
"IfcFlowStorageDevice": [
"IfcDistributionElementType"
],
"IfcFlowTerminal": [
"IfcDistributionElementType"
],
"IfcFlowTreatmentDevice": [
"IfcDistributionElementType"
],
"IfcFooting": [
"IfcFootingType"
],
"IfcFurnishingElement": [
"IfcFurnishingElementType"
],
"IfcFurniture": [
"IfcFurnitureType"
],
@@ -266,6 +314,9 @@
"IfcRampFlight": [
"IfcRampFlightType"
],
"IfcReinforcedSoil": [
"IfcBuiltElementType"
],
"IfcReinforcingBar": [
"IfcReinforcingBarType"
],
@@ -365,64 +416,13 @@
"IfcWall": [
"IfcWallType"
],
"IfcWallStandardCase": [
"IfcWallType"
],
"IfcWasteTerminal": [
"IfcWasteTerminalType"
],
"IfcWindow": [
"IfcWindowType"
],
"IfcCivilElement": [
"IfcCivilElementType"
],
"IfcFurnishingElement": [
"IfcFurnishingElementType"
],
"IfcDistributionElement": [
"IfcDistributionElementType"
],
"IfcBuiltElement": [
"IfcBuiltElementType"
],
"IfcDistributionControlElement": [
"IfcDistributionElementType"
],
"IfcDistributionFlowElement": [
"IfcDistributionElementType"
],
"IfcEarthworksElement": [
"IfcBuiltElementType"
],
"IfcEarthworksFill": [
"IfcBuiltElementType"
],
"IfcEnergyConversionDevice": [
"IfcDistributionElementType"
],
"IfcFlowController": [
"IfcDistributionElementType"
],
"IfcFlowFitting": [
"IfcDistributionElementType"
],
"IfcFlowMovingDevice": [
"IfcDistributionElementType"
],
"IfcFlowSegment": [
"IfcDistributionElementType"
],
"IfcFlowStorageDevice": [
"IfcDistributionElementType"
],
"IfcFlowTerminal": [
"IfcDistributionElementType"
],
"IfcFlowTreatmentDevice": [
"IfcDistributionElementType"
],
"IfcReinforcedSoil": [
"IfcBuiltElementType"
],
"IfcWallStandardCase": [
"IfcWallType"
]
}