diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index c1edda1887..329d157873 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -7,7 +7,7 @@ body: label: Bug Description placeholder: | Describe what problem occurred and what you expected to happen instead. - + 1. To reproduce this, open file '...' 2. Click on '....' 3. See error diff --git a/.github/scripts/check-whitespace.py b/.github/scripts/check-whitespace.py index 0a24f59765..3576c02dbf 100644 --- a/.github/scripts/check-whitespace.py +++ b/.github/scripts/check-whitespace.py @@ -286,6 +286,7 @@ PATTERNS = ( "*.i", "*.cmake", "*/CMakeLists.txt", + "*.yml", ) REPO_ROOT = Path(subprocess.check_output(["git", "rev-parse", "--show-toplevel"], text=True).strip()) diff --git a/.github/workflows/ci-ifcopenshell-conda-cleaner.yml b/.github/workflows/ci-ifcopenshell-conda-cleaner.yml index c34cf50e0f..2daa331c50 100644 --- a/.github/workflows/ci-ifcopenshell-conda-cleaner.yml +++ b/.github/workflows/ci-ifcopenshell-conda-cleaner.yml @@ -34,21 +34,21 @@ jobs: - name: Run conda cleaner run: | python - << EOF - + import os from datetime import datetime, timedelta from binstar_client.utils import get_server_api from binstar_client.errors import BinstarError - + # Configuration api_token = os.environ.get('ANACONDA_TOKEN') pkg_name = 'ifcopenshell' channel_name = 'ifcopenshell' - + # Authenticate with Anaconda aserver_api = get_server_api(token=api_token) - - + + # Get the list of packages in the channel def get_package(filter_package_name: str = None): try: @@ -59,12 +59,12 @@ jobs: print(f"No packages found for {filter_package_name}.") if len(user_packages) > 1: raise ValueError(f"Found {len(user_packages)} package for {filter_package_name}. Will only support 1 package.") - + return user_packages[0] except BinstarError as err: raise ValueError(f"Failed to fetch packages: {err}") - - + + # Delete a package version def delete_package(package_name, version): try: @@ -72,33 +72,33 @@ jobs: print(f"Deleted {package_name} version {version}") except BinstarError as err: print(f"Failed to delete {package_name} version {version}: {err}") - - + + # Main logic def main(): package = get_package(pkg_name) if not package: print("No packages found.") return - + number_of_supported_versions = ${{ env.NUM_SUPPORTED_VERSIONS }} - + package_name = package['name'] versions = package["versions"] if len(versions) <= number_of_supported_versions: print(f"Number of versions {len(versions)} is less than or equal to {number_of_supported_versions}.") return - + # sort the versions in descending order print(f"Before reversal: {versions=}") versions.reverse() print(f"After reversal: {versions=}") - + releases = versions[number_of_supported_versions:] - + for release in releases: delete_package(package_name, release) - + main() - + EOF diff --git a/.github/workflows/ci-ifcopenshell-conda-daily.yml b/.github/workflows/ci-ifcopenshell-conda-daily.yml index 93e9f5506f..396d3e4c4f 100644 --- a/.github/workflows/ci-ifcopenshell-conda-daily.yml +++ b/.github/workflows/ci-ifcopenshell-conda-daily.yml @@ -24,13 +24,13 @@ jobs: - uses: actions/checkout@v7 - name: Set env run: echo ok go - + - name: Get current version id: version # Strip any trailing prerelease label and number; the dated alpha # suffix is added below. run: echo "version=$(sed -E 's/[[:alpha:]]+[0-9]+$//' VERSION)" >> $GITHUB_OUTPUT - + - name: Get current date id: date run: echo "date=$(date +'%y%m%d')" >> $GITHUB_OUTPUT @@ -39,7 +39,7 @@ jobs: id: verdate run: echo "verdate=${{ steps.version.outputs.version }}alpha${{ steps.date.outputs.date }}" >> $GITHUB_OUTPUT - + test: name: ${{ matrix.platform.distver }}-${{ matrix.pyver.name }} needs: activate @@ -64,7 +64,7 @@ jobs: uses: pierotofy/set-swap-space@master with: swap-size-gb: 10 - + - name: set ARTIFACTS ENV vars shell: bash run: | @@ -76,7 +76,7 @@ jobs: elif [[ "$RUNNER_OS" == "Linux" ]]; then echo "ARTIFACTS_DIR=/home/runner/work/artifacts" >> $GITHUB_ENV fi - + - uses: actions/checkout@v7 with: submodules: recursive diff --git a/.github/workflows/ci-ifcopenshell-docker.yml b/.github/workflows/ci-ifcopenshell-docker.yml index 7f5df4dbae..2c9f12d519 100644 --- a/.github/workflows/ci-ifcopenshell-docker.yml +++ b/.github/workflows/ci-ifcopenshell-docker.yml @@ -1,6 +1,6 @@ name: ci-ifcopenshell-docker -on: +on: workflow_dispatch: push: tags: @@ -37,7 +37,7 @@ jobs: name: ccache uses: hendrikmuhs/ccache-action@v1.2.23 - - + - name: Build ifcopenshell run: | mkdir build && cd build @@ -66,12 +66,12 @@ jobs: ../cmake make -j $(nproc) make install - - + - name: Package run: | make package working-directory: build - - name: Upload + - name: Upload uses: actions/upload-artifact@v7 with: # Artifact name @@ -88,8 +88,8 @@ jobs: - uses: actions/checkout@v7 with: lfs: true - - - name: Download + + - name: Download uses: actions/download-artifact@v8.0.1 with: # Artifact name @@ -100,17 +100,17 @@ jobs: uses: docker/setup-qemu-action@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v4 - - + uses: docker/setup-buildx-action@v4 + - name: Login to Dockerhub - uses: docker/login-action@v4 + uses: docker/login-action@v4 with: username: aecgeeks password: ${{ secrets.DOCKER_HUB_TOKEN }} - - + - name: Build container image uses: docker/build-push-action@v7 - with: + with: context: artifacts repository: aecgeeks/ifcopenshell # Since the dispatch is set to `tag`, `github.ref_name` should evaluate to the pushed tag diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a446de3db..b67481a3a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,7 +84,7 @@ jobs: libocct-foundation-dev libocct-modeling-algorithms-dev libocct-modeling-data-dev libocct-ocaf-dev libocct-visualization-dev libocct-data-exchange-dev \ ${OCCT_CMAKE_DEPS} \ libcgal-dev libeigen3-dev - + - name: ccache uses: hendrikmuhs/ccache-action@v1.2.23 with: @@ -176,7 +176,7 @@ jobs: run: | echo $Python3_ROOT_DIR echo ${{ env.pythonLocation }} - + mkdir build && cd build cmake \ -DCMAKE_BUILD_TYPE=Release \ @@ -223,7 +223,7 @@ jobs: cmake --build . ./IfcOpenHouse && test -f IfcOpenHouse.ifc ./IfcParseExamples IfcOpenHouse.ifc - ./IfcAdvancedHouse && test -f IfcAdvancedHouse.ifc + ./IfcAdvancedHouse && test -f IfcAdvancedHouse.ifc ./IfcAlignment && test -f FHWA_Bridge_Geometry_Alignment_Example.ifc ./IfcSimplifiedAlignment && test -f FHWA_Bridge_Geometry_Alignment_Example_Simplified.ifc diff --git a/.github/workflows/docs-deployment-unstable.yml b/.github/workflows/docs-deployment-unstable.yml index 216248006d..6861b8a6cd 100644 --- a/.github/workflows/docs-deployment-unstable.yml +++ b/.github/workflows/docs-deployment-unstable.yml @@ -35,4 +35,4 @@ jobs: external_repository: IfcOpenShell/bonsaibim_org_docs_unstable # Target repository publish_branch: main # Branch to deploy to cname: docs-unstable.bonsaibim.org # Custom domain for unstable docs - publish_dir: src/bonsai/docs/_build/html # Directory containing built docs \ No newline at end of file + publish_dir: src/bonsai/docs/_build/html # Directory containing built docs diff --git a/.github/workflows/publish-pyodide-demo-app.yml b/.github/workflows/publish-pyodide-demo-app.yml index c2fcc6cc33..7b3d0b28ee 100644 --- a/.github/workflows/publish-pyodide-demo-app.yml +++ b/.github/workflows/publish-pyodide-demo-app.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Set env run: echo ok go - + build: needs: activate runs-on: ubuntu-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7e9cb2fb89..8f306c69e2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,7 @@ jobs: libtbb-dev nlohmann-json3-dev \ libocct-foundation-dev libocct-modeling-algorithms-dev libocct-modeling-data-dev libocct-ocaf-dev libocct-visualization-dev libocct-data-exchange-dev \ libcgal-dev opencollada-dev - + - name: Build env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -77,7 +77,7 @@ jobs: echo ::set-output name=deb::$( ls assets/*.deb | head -n 1 | xargs basename ) working-directory: build env: - CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Release id: release uses: actions/create-release@v1 @@ -101,7 +101,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + upload_url: ${{ steps.release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: build/assets/${{ steps.package.outputs.tgz }} asset_name: ${{ steps.package.outputs.tgz }} asset_content_type: application/x-gzip @@ -111,7 +111,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + upload_url: ${{ steps.release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: build/assets/${{ steps.package.outputs.deb }} asset_name: ${{ steps.package.outputs.deb }} asset_content_type: application/vnd.debian.binary-package