PY ?= python3

.PHONY: help test demo clean

help:
	@echo "make test   run the test suite"
	@echo "make demo   read the sample fixture and print what it found"

test:
	$(PY) -m pytest

demo:
	@$(PY) -c "from ifcspf import Model, Index; \
m = Model.open('tests/fixtures/sample-building.ifc'); i = Index(m); \
print(m.schema, m.scale); \
[print(f'{e.type:24} {m.attr(e, \"Name\")!s:20} {i.flat(e)}') for e in m.of_type('IfcDoor')]"

clean:
	rm -rf .pytest_cache **/__pycache__ build dist *.egg-info
