bcf-api-xml 0.4.12__tar.gz → 0.4.14__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.
Files changed (29) hide show
  1. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/PKG-INFO +2 -1
  2. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/__init__.py +1 -1
  3. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/export/excel.py +4 -2
  4. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/import_zip.py +3 -3
  5. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/pyproject.toml +1 -1
  6. bcf_api_xml-0.4.12/setup.py +0 -34
  7. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/README.md +0 -0
  8. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/Schemas/bcf.version +0 -0
  9. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/Schemas/markup.xsd +0 -0
  10. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/Schemas/project.xsd +0 -0
  11. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/Schemas/version.xsd +0 -0
  12. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/Schemas/visinfo.xsd +0 -0
  13. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/errors.py +0 -0
  14. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/export/__init__.py +0 -0
  15. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/export/zip.py +0 -0
  16. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/models/ClippingPlane.py +0 -0
  17. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/models/Color.py +0 -0
  18. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/models/Comment.py +0 -0
  19. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/models/Component.py +0 -0
  20. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/models/Line.py +0 -0
  21. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/models/OrthogonalCamera.py +0 -0
  22. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/models/PerspectiveCamera.py +0 -0
  23. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/models/Topic.py +0 -0
  24. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/models/ViewSetupHints.py +0 -0
  25. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/models/Viewpoint.py +0 -0
  26. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/models/Visibility.py +0 -0
  27. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/models/VisualizationInfo.py +0 -0
  28. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/models/XYZ.py +0 -0
  29. {bcf_api_xml-0.4.12 → bcf_api_xml-0.4.14}/bcf_api_xml/models/__init__.py +0 -0
@@ -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)
@@ -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)
@@ -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
  [tool.poetry]
2
2
  name = "bcf-api-xml"
3
- version = "0.4.12"
3
+ version = "0.4.14"
4
4
  description = "Convert BCF-API to BCF-XML"
5
5
  authors = ["Hugo Duroux <hugo@bimdata.io>"]
6
6
  license = "MIT"
@@ -1,34 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- from setuptools import setup
3
-
4
- packages = \
5
- ['bcf_api_xml', 'bcf_api_xml.export', 'bcf_api_xml.models']
6
-
7
- package_data = \
8
- {'': ['*'], 'bcf_api_xml': ['Schemas/*']}
9
-
10
- install_requires = \
11
- ['generateDS>=2.35.13,<3.0.0',
12
- 'lxml>=4.5.0,<5.0.0',
13
- 'pillow>=10.0.1,<11.0.0',
14
- 'python-dateutil>=2.8.0,<3.0.0',
15
- 'xlsxwriter>=3.1.2,<4.0.0']
16
-
17
- setup_kwargs = {
18
- 'name': 'bcf-api-xml',
19
- 'version': '0.4.12',
20
- 'description': 'Convert BCF-API to BCF-XML',
21
- 'long_description': 'BCF-API-XML-converter\n=====================\n\nBCF-API-XML-converter is a library to open BCFzip and get data similar to BCF API json and to save BCF API data as BCFzip files.\n\n\n# Install\n```bash\npip install bcf-api-xml\n```\n\n# usage\n```python\n from bcf_api_xml import to_zip, to_json\n\n file_like_bcf_zip = to_zip(topics, comments, viewpoints)\n\n imported_topics = to_json(file_like_bcf_zip)\n```\n\n# develop\n```bash\npoetry shell\npoetry install\npytest\npre-commit install\n```\n\n# Publish new version\n```bash\npoetry publish --build --username= --password=\n```\n',
22
- 'author': 'Hugo Duroux',
23
- 'author_email': 'hugo@bimdata.io',
24
- 'maintainer': 'None',
25
- 'maintainer_email': 'None',
26
- 'url': 'https://github.com/bimdata/BCF-API-XML-translator',
27
- 'packages': packages,
28
- 'package_data': package_data,
29
- 'install_requires': install_requires,
30
- 'python_requires': '>=3.8,<4.0',
31
- }
32
-
33
-
34
- setup(**setup_kwargs)
File without changes