diff --git a/.github/ISSUE_TEMPLATE/ifc-rule-request.md b/.github/ISSUE_TEMPLATE/ifc-rule-request.md deleted file mode 100644 index ec68784e1..000000000 --- a/.github/ISSUE_TEMPLATE/ifc-rule-request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: IFC Rule Request -about: Suggest an new IFC rule -title: '' -labels: rule -assignees: '' - ---- - -**Is your IFC Rule request related to a problem? Please describe.** -A clear and concise description of what the problem is. Use examples! - -**Describe the IFC Rule you'd like** -A clear and concise description of the proposed rule. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions you've considered. - -**IFC files** -Provide snippets of, or links to, at least two IFC files. One valid (would pass the proposed rule) and one invalid (would not pass the proposed rule). diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 0b4a6df8f..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Unit Test with pytest - -on: [push, pull_request] - -jobs: - build-linux: - runs-on: ubuntu-latest - strategy: - max-parallel: 5 - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - fetch-depth: 0 - - - name: Warn if PR is to main - if: github.event_name == 'pull_request' && github.base_ref == 'main' - run: | - echo "::warning::This pull request is targeting the 'main' branch. Please ensure this is intended." - - - name: Set up Python 3.11 - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - name: Install dependencies - run: | - find . -name 'requirements.txt' -exec pip install -r {} \; - 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.3-260bc80-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 - run: | - pip install flake8 - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest -sv -n 4 diff --git a/.github/workflows/dispatch.yml b/.github/workflows/dispatch.yml deleted file mode 100644 index 155b2cf6d..000000000 --- a/.github/workflows/dispatch.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Dispatch - -on: - push: - branches: - - development - paths-ignore: - - '.github/**' - workflow_dispatch: - -jobs: - - dispatch: - - name: dispatch to validate - runs-on: ubuntu-latest - - steps: - - - run: ${{ tojson(github.event) }} - shell: cat {0} - - - run: | - curl -H "Authorization: token ${{ secrets.VALIDATE_REPO_GH_TOKEN }} " \ - -H 'Accept: application/vnd.github.everest-preview+json' "${{ vars.VALIDATE_REPO_DISPATCH_URL }}" \ - -d '{ "event_type": "submodule_dispatch", "client_payload": { "owner": "${{ github.event.repository.owner.login }}", "repo": "${{ github.event.repository.name }}", "branch": "${{ github.ref_name }}" } }' diff --git a/.gitmodules b/.gitmodules index 4fc6bbbe9..24402f4a4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "ifc_validation_models"] path = ifc_validation_models url = https://github.com/buildingSMART/ifc-validation-data-model - branch = development + branch = main diff --git a/docs/conf.py b/docs/conf.py index 2ab8a8742..358a3a73b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -7,9 +7,9 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information project = 'buildingSMART Validation Service' -copyright = '2025, buildingSMART International' +copyright = '2026, buildingSMART International' author = 'buildingSMART International' -release = '0.7.8' +release = '0.8.4' # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration diff --git a/features/steps/steps/propertysets_qtys_units.py b/features/steps/steps/propertysets_qtys_units.py index 77a8da046..f72eaa493 100644 --- a/features/steps/steps/propertysets_qtys_units.py +++ b/features/steps/steps/propertysets_qtys_units.py @@ -144,7 +144,13 @@ def establish_accepted_pset_values(name: str, _schema: str, _table: str, propert # but unhashable because it's a dict def make_obj(s): if s: - return json.loads(s.replace("'", '"')) + # Use ast.literal_eval for Python literals (handles None, True, False correctly) + # Fall back to json.loads for compatibility + import ast + try: + return ast.literal_eval(s) + except (ValueError, SyntaxError): + return json.loads(s.replace("'", '"')) else: return '' @@ -408,10 +414,13 @@ def step_impl(context, inst, table, inst_type=None): elif prop.is_a('IfcPropertyEnumeratedValue'): values = prop.EnumerationValues if values: - for value in values: - if not value.wrappedValue in accepted_data_type['values']: - yield ValidationOutcome(inst=inst, expected=accepted_data_type['values'], - observed=value.wrappedValue, severity=OutcomeSeverity.ERROR) + # Empty values list in template means "any value is accepted" + if accepted_data_type['values']: + for value in values: + if not value.wrappedValue in accepted_data_type['values']: + yield ValidationOutcome(inst=inst, expected=accepted_data_type['values'], + observed=value.wrappedValue, severity=OutcomeSeverity.ERROR) + # If accepted_data_type['values'] is empty, any value is valid (no check needed) # @todo other properties such as list/bounded/etc. diff --git a/features/steps/utils/geometry.py b/features/steps/utils/geometry.py index 628485e24..9083369f2 100644 --- a/features/steps/utils/geometry.py +++ b/features/steps/utils/geometry.py @@ -455,6 +455,7 @@ def estimate_plane_through_points(points : list[Point3d]) -> Optional[Plane]: return Plane(Nx, Ny, Nz, d) +@dataclass class Line: """ Represents a line a + d*b where a is a position and b a normalized unit vector diff --git a/ifc_validation_models b/ifc_validation_models index 784fafdc6..ec95507ff 160000 --- a/ifc_validation_models +++ b/ifc_validation_models @@ -1 +1 @@ -Subproject commit 784fafdc691c93f1370bb02def5857776a9a3ee7 +Subproject commit ec95507ff65b70df4e0ec1fa3c660eed8b130a2c