check-whitespace: normalize json files

This commit is contained in:
Andrej730
2026-09-14 11:39:30 +05:00
parent 0c12d2334b
commit 3e88479277
26 changed files with 38 additions and 25 deletions
+1
View File
@@ -297,6 +297,7 @@ PATTERNS = (
"*/CMakeLists.txt", "*/CMakeLists.txt",
"*.yml", "*.yml",
"*.yaml", "*.yaml",
"*.json",
"*.ts", "*.ts",
"*.js", "*.js",
"*.bat", "*.bat",
+1 -1
View File
@@ -21,4 +21,4 @@
] ]
} }
] ]
} }
+2 -2
View File
@@ -40,7 +40,7 @@
], ],
"problemMatcher": [] "problemMatcher": []
} }
], ],
"inputs": [ "inputs": [
{ {
@@ -50,4 +50,4 @@
"default": "blender" "default": "blender"
} }
] ]
} }
@@ -4,7 +4,7 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"name": "BonsaiDocsServer", "name": "BonsaiDocsServer",
"type": "debugpy", "type": "debugpy",
@@ -19,4 +19,3 @@
} }
] ]
} }
@@ -4,7 +4,7 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"name": "BonsaiDocsServer", "name": "BonsaiDocsServer",
"type": "debugpy", "type": "debugpy",
@@ -15,4 +15,4 @@
"console": "integratedTerminal" "console": "integratedTerminal"
} }
] ]
} }
@@ -21,4 +21,4 @@
"problemMatcher": [] "problemMatcher": []
} }
] ]
} }
@@ -81,6 +81,7 @@ def generate_ifc4_entity_map(filepath, schema_name, manual_corrections={}):
schema_version = schema_name.lower().strip("ifc") 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: 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=True) json.dump(entity_to_type_map, f, indent=4, sort_keys=True)
f.write("\n")
return entity_to_type_map return entity_to_type_map
@@ -126,6 +127,7 @@ def generate_ifc2x3_entity_map():
with open("src/ifcopenshell-python/ifcopenshell/util/entity_to_type_map_2x3.json", "w") as f: 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=True) json.dump(entity_to_type_map, f, indent=4, sort_keys=True)
f.write("\n")
return entity_to_type_map return entity_to_type_map
+1 -1
View File
@@ -482,4 +482,4 @@
1.0 1.0
] ]
} }
} }
@@ -298,6 +298,7 @@ class DocExtractor:
with open(BASE_MODULE_PATH / "schema/ifc2x3_property_sets_site_domains.json", "w", encoding="utf-8") as fo: with open(BASE_MODULE_PATH / "schema/ifc2x3_property_sets_site_domains.json", "w", encoding="utf-8") as fo:
print(f"{len(property_sets_domains)} property sets domains were parsed from the website") print(f"{len(property_sets_domains)} property sets domains were parsed from the website")
json.dump(property_sets_domains, fo, sort_keys=True, indent=4) json.dump(property_sets_domains, fo, sort_keys=True, indent=4)
fo.write("\n")
def setup_ifc2x3_reference_lookup(self): def setup_ifc2x3_reference_lookup(self):
# setup references look up tables to convert property hrefs to actual data paths # setup references look up tables to convert property hrefs to actual data paths
@@ -414,6 +415,7 @@ class DocExtractor:
with open(BASE_MODULE_PATH / "schema/ifc2x3_entities.json", "w", encoding="utf-8") as fo: with open(BASE_MODULE_PATH / "schema/ifc2x3_entities.json", "w", encoding="utf-8") as fo:
print(f"{len(entities_dict)} entities parsed") print(f"{len(entities_dict)} entities parsed")
json.dump(entities_dict, fo, sort_keys=True, indent=4) json.dump(entities_dict, fo, sort_keys=True, indent=4)
fo.write("\n")
def extract_ifc2x3_property_sets(self): def extract_ifc2x3_property_sets(self):
property_sets_dict = dict() property_sets_dict = dict()
@@ -534,6 +536,7 @@ class DocExtractor:
with open(BASE_MODULE_PATH / "schema/ifc2x3_properties.json", "w", encoding="utf-8") as fo: with open(BASE_MODULE_PATH / "schema/ifc2x3_properties.json", "w", encoding="utf-8") as fo:
print(f"{len(property_sets_dict)} property sets parsed") print(f"{len(property_sets_dict)} property sets parsed")
json.dump(property_sets_dict, fo, sort_keys=True, indent=4) json.dump(property_sets_dict, fo, sort_keys=True, indent=4)
fo.write("\n")
def extract_ifc2x3_types(self): def extract_ifc2x3_types(self):
types_dict = dict() types_dict = dict()
@@ -573,6 +576,7 @@ class DocExtractor:
with open(BASE_MODULE_PATH / "schema/ifc2x3_types.json", "w", encoding="utf-8") as fo: with open(BASE_MODULE_PATH / "schema/ifc2x3_types.json", "w", encoding="utf-8") as fo:
print(f"{len(types_dict)} ifc types parsed") print(f"{len(types_dict)} ifc types parsed")
json.dump(types_dict, fo, sort_keys=True, indent=4) json.dump(types_dict, fo, sort_keys=True, indent=4)
fo.write("\n")
def extract_ifc4(self): def extract_ifc4(self):
print("Parsing data for Ifc4.0.2.1") print("Parsing data for Ifc4.0.2.1")
@@ -623,6 +627,7 @@ class DocExtractor:
with open(BASE_MODULE_PATH / "schema/ifc4_property_sets_site_domains.json", "w", encoding="utf-8") as fo: with open(BASE_MODULE_PATH / "schema/ifc4_property_sets_site_domains.json", "w", encoding="utf-8") as fo:
print(f"{len(property_sets_domains)} property sets domains were parsed from the website") print(f"{len(property_sets_domains)} property sets domains were parsed from the website")
json.dump(property_sets_domains, fo, sort_keys=True, indent=4) json.dump(property_sets_domains, fo, sort_keys=True, indent=4)
fo.write("\n")
def setup_ifc4_reference_lookup(self): def setup_ifc4_reference_lookup(self):
references_paths_lookup = dict() references_paths_lookup = dict()
@@ -735,6 +740,7 @@ class DocExtractor:
with open(BASE_MODULE_PATH / "schema/ifc4_entities.json", "w", encoding="utf-8") as fo: with open(BASE_MODULE_PATH / "schema/ifc4_entities.json", "w", encoding="utf-8") as fo:
print(f"{len(entities_dict)} entities parsed") print(f"{len(entities_dict)} entities parsed")
json.dump(entities_dict, fo, sort_keys=True, indent=4) json.dump(entities_dict, fo, sort_keys=True, indent=4)
fo.write("\n")
def extract_ifc4_property_sets(self): def extract_ifc4_property_sets(self):
# function parses both property and quantity sets # function parses both property and quantity sets
@@ -872,6 +878,7 @@ class DocExtractor:
with open(BASE_MODULE_PATH / "schema/ifc4_properties.json", "w", encoding="utf-8") as fo: with open(BASE_MODULE_PATH / "schema/ifc4_properties.json", "w", encoding="utf-8") as fo:
print(f"{len(property_sets_dict)} property sets parsed") print(f"{len(property_sets_dict)} property sets parsed")
json.dump(property_sets_dict, fo, sort_keys=True, indent=4) json.dump(property_sets_dict, fo, sort_keys=True, indent=4)
fo.write("\n")
def extract_ifc4_types(self): def extract_ifc4_types(self):
types_dict = dict() types_dict = dict()
@@ -912,6 +919,7 @@ class DocExtractor:
with open(BASE_MODULE_PATH / "schema/ifc4_types.json", "w", encoding="utf-8") as fo: with open(BASE_MODULE_PATH / "schema/ifc4_types.json", "w", encoding="utf-8") as fo:
print(f"{len(types_dict)} ifc types parsed") print(f"{len(types_dict)} ifc types parsed")
json.dump(types_dict, fo, sort_keys=True, indent=4) json.dump(types_dict, fo, sort_keys=True, indent=4)
fo.write("\n")
def extract_ifc4x3(self): def extract_ifc4x3(self):
print("Parsing data for Ifc4.3.0.1") print("Parsing data for Ifc4.3.0.1")
@@ -1029,11 +1037,13 @@ class DocExtractor:
with open(BASE_MODULE_PATH / "schema/ifc4x3_entities.json", "w", encoding="utf-8") as fo: with open(BASE_MODULE_PATH / "schema/ifc4x3_entities.json", "w", encoding="utf-8") as fo:
print(f"{len(entities_dict)} entities parsed") print(f"{len(entities_dict)} entities parsed")
json.dump(entities_dict, fo, sort_keys=True, indent=4) json.dump(entities_dict, fo, sort_keys=True, indent=4)
fo.write("\n")
# export entities data # export entities data
with open(BASE_MODULE_PATH / "schema/ifc4x3_types.json", "w", encoding="utf-8") as fo: with open(BASE_MODULE_PATH / "schema/ifc4x3_types.json", "w", encoding="utf-8") as fo:
print(f"{len(types_dict)} ifc types parsed") print(f"{len(types_dict)} ifc types parsed")
json.dump(types_dict, fo, sort_keys=True, indent=4) json.dump(types_dict, fo, sort_keys=True, indent=4)
fo.write("\n")
def extract_ifc4x3_property_sets(self): def extract_ifc4x3_property_sets(self):
pset_data_zip = IFC4x3_HTML_LOCATION / "IFC/RELEASE/IFC4x3/HTML/annex-a-psd.zip" pset_data_zip = IFC4x3_HTML_LOCATION / "IFC/RELEASE/IFC4x3/HTML/annex-a-psd.zip"
@@ -1078,6 +1088,7 @@ class DocExtractor:
with open(BASE_MODULE_PATH / "schema/ifc4x3_properties.json", "w", encoding="utf-8") as fo: with open(BASE_MODULE_PATH / "schema/ifc4x3_properties.json", "w", encoding="utf-8") as fo:
print(f"{len(property_sets_dict)} property sets parsed") print(f"{len(property_sets_dict)} property sets parsed")
json.dump(property_sets_dict, fo, sort_keys=True, indent=4) json.dump(property_sets_dict, fo, sort_keys=True, indent=4)
fo.write("\n")
shutil.rmtree(pset_data_location) shutil.rmtree(pset_data_location)
@@ -421,4 +421,4 @@
"IfcWindow": [ "IfcWindow": [
"IfcWindowStyle" "IfcWindowStyle"
] ]
} }
@@ -381,4 +381,4 @@
"IfcWindowType", "IfcWindowType",
"IfcWindowStyle" "IfcWindowStyle"
] ]
} }
@@ -425,4 +425,4 @@
"IfcWindow": [ "IfcWindow": [
"IfcWindowType" "IfcWindowType"
] ]
} }
@@ -5729,4 +5729,4 @@
"description": "A zone (IfcZone) is an aggregation of spaces, partial spaces or other zones. Zone structures may not be hierarchical (in contrary to the spatial structure of a project - see IfcSpatialStructureElement), i.e. one individual IfcSpace may be associated with zero, one, or several IfcZone's. IfcSpace's are aggregated into an IfcZone by using the objectified relationship IfcRelAssignsToGroup as specified at the supertype IfcGroup.", "description": "A zone (IfcZone) is an aggregation of spaces, partial spaces or other zones. Zone structures may not be hierarchical (in contrary to the spatial structure of a project - see IfcSpatialStructureElement), i.e. one individual IfcSpace may be associated with zero, one, or several IfcZone's. IfcSpace's are aggregated into an IfcZone by using the objectified relationship IfcRelAssignsToGroup as specified at the supertype IfcGroup.",
"spec_url": "https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/TC1/HTML/ifcproductextension/lexical/ifczone.htm" "spec_url": "https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/TC1/HTML/ifcproductextension/lexical/ifczone.htm"
} }
} }
@@ -7226,4 +7226,4 @@
}, },
"spec_url": "https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/TC1/HTML/psd/IfcProductExtension/Pset_ZoneCommon.xml" "spec_url": "https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/TC1/HTML/psd/IfcProductExtension/Pset_ZoneCommon.xml"
} }
} }
@@ -316,4 +316,4 @@
"Pset_WasteTerminalTypeWasteTrap": "IfcPlumbingFireProtectionDomain", "Pset_WasteTerminalTypeWasteTrap": "IfcPlumbingFireProtectionDomain",
"Pset_WindowCommon": "IfcSharedBldgElements", "Pset_WindowCommon": "IfcSharedBldgElements",
"Pset_ZoneCommon": "IfcProductExtension" "Pset_ZoneCommon": "IfcProductExtension"
} }
@@ -1307,4 +1307,4 @@
"description": "The year as defined in Gregorian Calendar.", "description": "The year as defined in Gregorian Calendar.",
"spec_url": "https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/TC1/HTML/ifcdatetimeresource/lexical/ifcyearnumber.htm" "spec_url": "https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/TC1/HTML/ifcdatetimeresource/lexical/ifcyearnumber.htm"
} }
} }
@@ -7949,4 +7949,4 @@
"description": "A zone is a group of spaces, partial spaces or other zones. Zone structures may not be hierarchical (in contrary to the spatial structure of a project - see IfcSpatialStructureElement), i.e. one individual IfcSpace may be associated with zero, one, or several IfcZone's. IfcSpace's are grouped into an IfcZone by using the objectified relationship IfcRelAssignsToGroup as specified at the supertype IfcGroup.", "description": "A zone is a group of spaces, partial spaces or other zones. Zone structures may not be hierarchical (in contrary to the spatial structure of a project - see IfcSpatialStructureElement), i.e. one individual IfcSpace may be associated with zero, one, or several IfcZone's. IfcSpace's are grouped into an IfcZone by using the objectified relationship IfcRelAssignsToGroup as specified at the supertype IfcGroup.",
"spec_url": "https://standards.buildingsmart.org/IFC/RELEASE/IFC4/ADD2_TC1/HTML/schema/ifcproductextension/lexical/ifczone.htm" "spec_url": "https://standards.buildingsmart.org/IFC/RELEASE/IFC4/ADD2_TC1/HTML/schema/ifcproductextension/lexical/ifczone.htm"
} }
} }
@@ -11485,4 +11485,4 @@
}, },
"spec_url": "https://standards.buildingsmart.org/IFC/RELEASE/IFC4/ADD2_TC1/HTML/schema/ifcsharedbldgelements/qset/qto_windowbasequantities.htm" "spec_url": "https://standards.buildingsmart.org/IFC/RELEASE/IFC4/ADD2_TC1/HTML/schema/ifcsharedbldgelements/qset/qto_windowbasequantities.htm"
} }
} }
@@ -512,4 +512,4 @@
"qto_wallbasequantities": "ifcsharedbldgelements", "qto_wallbasequantities": "ifcsharedbldgelements",
"qto_wasteterminalbasequantities": "ifcplumbingfireprotectiondomain", "qto_wasteterminalbasequantities": "ifcplumbingfireprotectiondomain",
"qto_windowbasequantities": "ifcsharedbldgelements" "qto_windowbasequantities": "ifcsharedbldgelements"
} }
@@ -1587,4 +1587,4 @@
"description": "An IfcWorkScheduleTypeEnum is an enumeration data type that specifies the types of work schedule from which the relevant control can be selected.", "description": "An IfcWorkScheduleTypeEnum is an enumeration data type that specifies the types of work schedule from which the relevant control can be selected.",
"spec_url": "https://standards.buildingsmart.org/IFC/RELEASE/IFC4/ADD2_TC1/HTML/schema/ifcprocessextension/lexical/ifcworkscheduletypeenum.htm" "spec_url": "https://standards.buildingsmart.org/IFC/RELEASE/IFC4/ADD2_TC1/HTML/schema/ifcprocessextension/lexical/ifcworkscheduletypeenum.htm"
} }
} }
@@ -9380,4 +9380,4 @@
"description": "A zone is a group of spaces, partial spaces or other zones. These spaces may or may not be adjacent. A zone does not have its own shape representation. Zone structures may not be hierarchical (in contrary to the spatial structure of a project - see IfcSpatialStructureElement), i.e. one individual IfcSpace may be associated with zero, one, or several IfcZone's. IfcSpace's are grouped into an IfcZone by using the objectified relationship IfcRelAssignsToGroup as specified at the supertype IfcGroup. For example, a zone might be used to represent an apartment as a group of spaces.", "description": "A zone is a group of spaces, partial spaces or other zones. These spaces may or may not be adjacent. A zone does not have its own shape representation. Zone structures may not be hierarchical (in contrary to the spatial structure of a project - see IfcSpatialStructureElement), i.e. one individual IfcSpace may be associated with zero, one, or several IfcZone's. IfcSpace's are grouped into an IfcZone by using the objectified relationship IfcRelAssignsToGroup as specified at the supertype IfcGroup. For example, a zone might be used to represent an apartment as a group of spaces.",
"spec_url": "https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcZone.htm" "spec_url": "https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcZone.htm"
} }
} }
@@ -16523,4 +16523,4 @@
}, },
"spec_url": "https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/Qto_WindowBaseQuantities.htm" "spec_url": "https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/Qto_WindowBaseQuantities.htm"
} }
} }
@@ -1743,4 +1743,4 @@
"description": "An IfcWorkScheduleTypeEnum is an enumeration data type that specifies the types of work schedule from which the relevant process can be selected.", "description": "An IfcWorkScheduleTypeEnum is an enumeration data type that specifies the types of work schedule from which the relevant process can be selected.",
"spec_url": "https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcWorkScheduleTypeEnum.htm" "spec_url": "https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcWorkScheduleTypeEnum.htm"
} }
} }
@@ -114,7 +114,7 @@
{ {
"name": "Shrubs" "name": "Shrubs"
} }
], ],
"IfcPlate": [ "IfcPlate": [
{ {
"name": "Glazing" "name": "Glazing"
@@ -652,4 +652,4 @@
"toId": "n19" "toId": "n19"
} }
] ]
} }