Skip to content

Bug/IVS-296 Berserking stack tree at GEM003 #330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: development
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Install dependencies
run: |
pip install behave pytest tabulate pyparsing sqlalchemy numpy pydantic pydot sqlalchemy_utils django python-dotenv deprecated pandas pyspellchecker rtree
wget -O /tmp/ifcopenshell_python.zip https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-`python3 -c 'import sys;print("".join(map(str, sys.version_info[0:2])))'`-v0.8.1-0267e2b-linux64.zip
wget -O /tmp/ifcopenshell_python.zip https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-`python3 -c 'import sys;print("".join(map(str, sys.version_info[0:2])))'`-v0.8.1-1d27161-linux64.zip
mkdir -p `python3 -c 'import site; print(site.getusersitepackages())'`
unzip -d `python3 -c 'import site; print(site.getusersitepackages())'` /tmp/ifcopenshell_python.zip
- name: Lint with flake8
Expand Down
2 changes: 1 addition & 1 deletion features/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,5 @@ def update_outcomes_with_scenario_data(context, outcomes):

if sls is not None:
outcome['scenario'] = sls['scenario']
outcome['last_step'] = sls['last_step'].name
outcome['last_step'] = sls['last_step'].name.replace(' at depth 1', '')
outcome['instance_id'] = sls.get('instance_id')
4 changes: 2 additions & 2 deletions features/steps/thens/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ def step_impl(context, inst, constraint, num=None):
continue
if constraint == 'identical':
if not all([values[0] == i for i in values]):
yield ValidationOutcome(inst=inst, expected= constraint, observed = f"Not {constraint}", severity=OutcomeSeverity.ERROR)
yield ValidationOutcome(inst=inst, observed = values, severity=OutcomeSeverity.ERROR)
if constraint == 'unique':
seen = set()
duplicates = [x for x in values if x in seen or seen.add(x)]
if not duplicates:
continue
yield ValidationOutcome(inst=inst, expected= constraint, observed = f"Not {constraint}", severity=OutcomeSeverity.ERROR)
yield ValidationOutcome(inst=inst, observed = values, severity=OutcomeSeverity.ERROR)


def recursive_unpack_value(item):
Expand Down
4 changes: 2 additions & 2 deletions features/steps/validation_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,9 @@ def expected_behave_output(context: Context, data: Any, is_observed : bool = Fal
return None
else:
# step name is a good proxy for expected, but not for observed
return context.step.name
return context.step.name.replace(' at depth 1', '')
case str():
if data in [x.name() for x in ifcopenshell.ifcopenshell_wrapper.schema_by_name(context.model.schema).entities()]:
if data in [x.name() for x in ifcopenshell.ifcopenshell_wrapper.schema_by_name(context.model.schema_identifier).entities()]:
return {'entity': data} # e.g. 'the type must be IfcCompositeCurve'
else:
return {'value': data} # e.g. "The value must be 'Body'"
Expand Down
Loading