mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
38a005ccf5
bsdd.py: the Client made every request with a bare requests.get, so a single 429 from the (unauthenticated, aggressively rate limited) bSDD API failed the whole test. Route requests through a Session with a mounted urllib3 Retry (5 attempts, backoff, honouring Retry-After) for 429/5xx, matching how a resilient API client should behave, not just papering over the test. ColumnPSetsOfSets.ifc: FILE_SCHEMA was accidentally changed from IFC4X3_ADD2 to IFC2X3 ina7738eeb64(an unrelated logger refactor), a one line collateral edit to this fixture. The file's DATA section still uses IFCPROPERTYSETDEFINITIONSET, an IFC4+ only type. Parsing it against IFC2X3 threw "Entity ... not found in schema", which silently fell back to interpreting the value as a raw nested aggregate instead of the intended defined-type wrapper, producing the double-nested tuple that broke test_stream, test_file and test_rocks in test_streaming_rocksdb_and_simpletyperefs.py. Restoring the original schema declared when the fixture was added (ff3fa48332) fixes all three. Generated with the assistance of an AI coding tool. (cherry picked from commit6911418c67)
bsdd
A library to interact with the buildingSMART Data Dictionary (bSDD) API. This packages is totally independent from other packages in IfcOpenShell and requires only a python installation to run.
Installation
pip install git+https://git@github.com/ifcopenshell/ifcopenshell.git@v0.8.0#subdirectory=src/bsdd
# check your installation
python
>>> from bsdd import Client
>>> client = Client()
>>> [l["uri"] for l in client.get_dictionary()["dictionaries"] if "4.3" in l["uri"]][0]
'https://identifier.buildingsmart.org/uri/buildingsmart/ifc/4.3'
Develop
# create a fork in your domain
git clone git@github.com:<your-name>/IfcOpenShell.git
cd src/bsdd
# if you use vs code / pycharm, you can launch it from this folder
code .
# if you use conda/mamba. follow instructions below:
# otherwise setup a dev env in your preferred way.
mamba create -n bsdd-dev python pytest requests
mamba activate bsdd-dev
# run tests
pytest