bcf-api-xml 0.4.12__py3-none-any.whl → 0.4.14__py3-none-any.whl

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.
bcf_api_xml/__init__.py CHANGED
@@ -4,4 +4,4 @@ from bcf_api_xml.export import to_zip # noqa: F401
4
4
  from bcf_api_xml.export import to_xlsx # noqa: F401
5
5
  from bcf_api_xml.import_zip import to_json # noqa: F401
6
6
 
7
- __version__ = "0.4.12"
7
+ __version__ = "0.4.14"
@@ -208,6 +208,8 @@ def to_xlsx(
208
208
  worksheet.set_column_pixels(11, 11, 200)
209
209
  row += 1
210
210
 
211
+ # Sort topic by index
212
+ topics = sorted(topics, key=lambda k: k.get("index"))
211
213
  # Create topic rows
212
214
  for topic in topics:
213
215
  topic_guid = topic["guid"]
@@ -278,8 +280,8 @@ def to_xlsx(
278
280
  "image_data": img_data,
279
281
  "x_scale": scale,
280
282
  "y_scale": scale,
281
- "x_offset": 1, # Offset image to avoid overlap with cell delimter
282
- "y_offset": 1, # Offset image to avoid overlap with cell delimter
283
+ "x_offset": 1, # Offset image to avoid overlap with cell delimtier
284
+ "y_offset": 1, # Offset image to avoid overlap with cell delimiter
283
285
  },
284
286
  )
285
287
  worksheet.write(row, VIEWPOINT_COL_INDEX, "", base_fmt)
bcf_api_xml/import_zip.py CHANGED
@@ -20,9 +20,9 @@ def check_bcf_version(file):
20
20
  bcf_version_tree = etree.parse(file)
21
21
  root = bcf_version_tree.getroot()
22
22
  version = root.get("VersionId")
23
- if version != "2.1":
23
+ if version not in ["2.1", "2.0"]:
24
24
  raise UnsupportedBCFVersion(
25
- f"version {version} is not supported. Only BCF 2.1 is supported"
25
+ f"version {version} is not supported. Only BCF 2.x is supported"
26
26
  )
27
27
 
28
28
 
@@ -33,7 +33,7 @@ def to_json(bcf_file):
33
33
  check_bcf_version(version_file)
34
34
  except KeyError:
35
35
  raise UnsupportedBCFVersion(
36
- "Unable to check version. It's probably an oudated version. Only BCF 2.1 is supported"
36
+ "Unable to check version. Only BCF 2.x is supported"
37
37
  )
38
38
  files = zip_ref.infolist()
39
39
  files_names = zip_ref.namelist()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bcf-api-xml
3
- Version: 0.4.12
3
+ Version: 0.4.14
4
4
  Summary: Convert BCF-API to BCF-XML
5
5
  Home-page: https://github.com/bimdata/BCF-API-XML-translator
6
6
  License: MIT
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python :: 3.8
13
13
  Classifier: Programming Language :: Python :: 3.9
14
14
  Classifier: Programming Language :: Python :: 3.10
15
15
  Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
16
17
  Requires-Dist: generateDS (>=2.35.13,<3.0.0)
17
18
  Requires-Dist: lxml (>=4.5.0,<5.0.0)
18
19
  Requires-Dist: pillow (>=10.0.1,<11.0.0)
@@ -3,12 +3,12 @@ bcf_api_xml/Schemas/markup.xsd,sha256=FemvIgZYcNk61FQxFHdIrcWzLvgw1t_ntOsQz15sRE
3
3
  bcf_api_xml/Schemas/project.xsd,sha256=obReOUyt8HYgnyLsnyIlA5ky9YClDNiYwUxMubHJ1dI,669
4
4
  bcf_api_xml/Schemas/version.xsd,sha256=ux0QjjSUI_70pp7MFkh5fn5zoY7plLzfmPl4pqOt-Jk,449
5
5
  bcf_api_xml/Schemas/visinfo.xsd,sha256=qxFodRHZWV_BNrzsV7T2QPDoNk2RP5tUyNwmehPG8kc,7212
6
- bcf_api_xml/__init__.py,sha256=T8gaatskF4Hrj4fH2ybc3h3bOLw2vc5tsGVUKUzQ4pQ,309
6
+ bcf_api_xml/__init__.py,sha256=0qYrbND9-nmrnJ-GLVzyIRWKDAEM8Ep6PjFcyXl3RTI,309
7
7
  bcf_api_xml/errors.py,sha256=krwA-Ib5R4LeeU2xzeMQ6rKXvRB-08ReQmihk8FqPsM,89
8
8
  bcf_api_xml/export/__init__.py,sha256=5jooo9c6rlALNthrCwAw8UTcx5Rir8ASyen1voo6ZRA,178
9
- bcf_api_xml/export/excel.py,sha256=t5vQwTjvatc2zp5mQZou6BD-2zeIsqYOGGHlVYjJKFc,11387
9
+ bcf_api_xml/export/excel.py,sha256=h4gDgInS6Oxpc4EWP9_mleWYffeHZPU28wpTFvuVuu8,11481
10
10
  bcf_api_xml/export/zip.py,sha256=HCSx5mx-scAlAA49WKiVV7Y7ABmT2mhUkdXyL4U2lHE,3322
11
- bcf_api_xml/import_zip.py,sha256=SJGuW60OrJOJEmnW7p8rpDZVSh59yXcE78GfMpQm8wU,3128
11
+ bcf_api_xml/import_zip.py,sha256=cLk5XK68My_mQDspVfl9LLS6DzLhBlh4Q9bgRaeqnSA,3107
12
12
  bcf_api_xml/models/ClippingPlane.py,sha256=sIcst3nGcaIHNl_qcXNjdSGFw3gufmh2VpOZtyo-oNE,410
13
13
  bcf_api_xml/models/Color.py,sha256=MfoA11j1LvPiKOOX-91bNXrQltUGlO2VogL0Lk8qKU0,457
14
14
  bcf_api_xml/models/Comment.py,sha256=OQvFucRQGoiomNwnl3mhYW3FWOmqXFhnPU9LzjYO0Cg,1593
@@ -23,6 +23,6 @@ bcf_api_xml/models/Visibility.py,sha256=8adXfJpceynK6W0in9C5EBEU6v6FKLcJdXG7NM3v
23
23
  bcf_api_xml/models/VisualizationInfo.py,sha256=eaq7HWJF5zMGCZunf46QZDNY7_dwVJgTLWFBDq5ElBQ,4084
24
24
  bcf_api_xml/models/XYZ.py,sha256=DZb8MBdQtbEWK62gXT8XqvdszHO9JWsUFiVX4FCkHnM,316
25
25
  bcf_api_xml/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
- bcf_api_xml-0.4.12.dist-info/METADATA,sha256=A_0THxE01J_HDOef-aJs6NIDlzcKnUVj_7i3rl_JZLw,1436
27
- bcf_api_xml-0.4.12.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
28
- bcf_api_xml-0.4.12.dist-info/RECORD,,
26
+ bcf_api_xml-0.4.14.dist-info/METADATA,sha256=NKILZUvuB6kEGnSWL7-cxdQPNitV5hLJIVVdqi7os8w,1487
27
+ bcf_api_xml-0.4.14.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
28
+ bcf_api_xml-0.4.14.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.4.0
2
+ Generator: poetry-core 1.9.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any