diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index 7c6cfa25..45e24c21 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -34,7 +34,7 @@ body: - type: dropdown id: severity attributes: - label: '🚦 Defines the severity of the bug. In the case of class-3, [specific information must be added](https://github.com/ansys-internal/QP-2-Template/blob/main/.github/ISSUE_TEMPLATE/class3.md)' + label: '🚦 Defines the severity of the bug. In the case of class-3, specific information must be added.' options: - "Class 1 - Crash/Major data loss" - "Class 2 - Serious problem" diff --git a/.github/ISSUE_TEMPLATE/story.yaml b/.github/ISSUE_TEMPLATE/story.yaml index ea97b2f9..ccd97b7d 100644 --- a/.github/ISSUE_TEMPLATE/story.yaml +++ b/.github/ISSUE_TEMPLATE/story.yaml @@ -28,7 +28,7 @@ body: attributes: label: Additional Links description: Links to Test Cases / Features / Other User Stories - placeholder: "[Issue #1](https://github.com/ansys-internal/QP-2-Template)" + placeholder: validations: required: false diff --git a/.github/workflows/build_and_package.yml b/.github/workflows/build_and_package.yml index 3b49c285..ce5893b9 100644 --- a/.github/workflows/build_and_package.yml +++ b/.github/workflows/build_and_package.yml @@ -212,75 +212,12 @@ jobs: name: test-logs path: tests/artifacts/smoke - # --- SAF smoke tests --- - # - name: Install SAF CLI - # run: pip install ansys-saf-cli - - # - name: Clone saf-visor-poc - # uses: actions/checkout@v4 - # with: - # repository: ansys-internal/saf-visor-poc - # token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} - # path: saf-visor-poc - - # - name: Install saf-visor-poc dependencies - # env: - # POETRY_HTTP_BASIC_SOLUTIONS_PRIVATE_PYPI_USERNAME: ${{ secrets.SOLUTIONS_PRIVATE_PYPI_USERNAME }} - # POETRY_HTTP_BASIC_SOLUTIONS_PRIVATE_PYPI_PASSWORD: ${{ secrets.SOLUTIONS_PRIVATE_PYPI_PASSWORD }} - # working-directory: saf-visor-poc - # run: | - # poetry run saf install . - - # - name: Run SAF smoke tests - # continue-on-error: true - # env: - # DISPLAY: ":99" - # VTK_DEFAULT_RENDER_WINDOW_OFFSCREEN: "1" - # run: | - # set -o pipefail - # mkdir -p tests/artifacts/saf-smoke/reports - # poetry run pytest tests/e2e/smoke/test_smoke_saf_visor.py \ - # --saf-project-dir "${{ github.workspace }}/saf-visor-poc" \ - # --html=tests/artifacts/saf-smoke/reports/saf-smoke-tests.html \ - # --self-contained-html \ - # --junitxml=tests/artifacts/saf-smoke/reports/saf-smoke-junit.xml \ - # --verbose \ - # | tee tests/artifacts/saf-smoke/reports/saf-smoke-result.log - - # - name: Check SAF smoke test results - # if: always() - # id: check_saf - # env: - # MISSING_XML_MODE: error - # DETECT_ERRORS: "true" - # run: | - # bash .github/scripts/check_junit_results.sh \ - # "saf-smoke:tests/artifacts/saf-smoke/reports/saf-smoke-junit.xml" - - # - name: Upload SAF smoke test logs - # if: always() - # uses: actions/upload-artifact@v4 - # with: - # name: saf-smoke-logs - # path: tests/artifacts/saf-smoke - - name: Upload Python package uses: actions/upload-artifact@v4 with: name: visor path: dist/*.whl - - name: Release to Azure Solutions PyPI - if: | - (github.event_name == 'schedule' && github.ref == 'refs/heads/main') || - (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) - uses: ansys-internal/solution-applications-actions/release-to-private-pypi@v18 - with: - python-version: ${{ env.MAIN_PYTHON_VERSION }} - twine-repository-url: https://pkgs.dev.azure.com/ansys-solutions/_packaging/ansys-solutions/pypi/upload/ - twine-username: "TOKEN" - twine-password: ${{ secrets.SOLUTIONS_PRIVATE_PYPI_UPLOAD_TOKEN }} - - name: "Upload artifacts to PyPI" if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1 @@ -293,18 +230,6 @@ jobs: outputs: package_version: ${{ steps.set_package_version.outputs.package_version }} - sbom: - name: Generate and Publish SBOM - needs: build - if: | - (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) - uses: ansys-internal/saf-github-workflow-templates/.github/workflows/_sbom.yml@v4 - with: - package_type: poetry - sbom-name: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && format('viewer-visor/{0}', github.ref_name) || 'viewer-visor' }} - publish: true - secrets: inherit - docker: needs: build if: | diff --git a/.github/workflows/generate_legal_notice.yml b/.github/workflows/generate_legal_notice.yml deleted file mode 100644 index eed1a553..00000000 --- a/.github/workflows/generate_legal_notice.yml +++ /dev/null @@ -1,164 +0,0 @@ -# Collect Python + npm third-party license data, merge into one PDF, and publish as a -# downloadable workflow artifact. -# -# Manual run: Actions → "Generate Legal Notice for Visor" → Run workflow. -# Artifact: _LEGAL_NOTICE[_].pdf (download from the completed run). - -name: Generate Legal Notice for Visor - -on: - workflow_dispatch: - inputs: - project_name: - description: Project name used in the legal notice PDF filename - required: false - type: string - default: Visor - version: - description: Optional label appended to the artifact name (e.g. release version) - required: false - type: string - reference: - description: Branch, tag, or SHA to analyze (defaults to the commit that triggered the run) - required: false - type: string - workflow_call: - inputs: - project_name: - description: Project name used in the legal notice PDF filename - required: false - type: string - default: Visor - version: - description: Optional label appended to the artifact name - required: false - type: string - reference: - description: Branch, tag, or SHA to analyze - required: false - type: string - -jobs: - collect-py-licenses: - name: Collect Python dependency licenses - uses: ansys-internal/saf-github-workflow-templates/.github/workflows/_collect_python_dependencies.yml@v5 - with: - repository: ${{ github.repository }} - reference: ${{ inputs.reference || github.sha }} - pyproject-parent-directory: . - direct-dependencies-only: false - template-ref: v5 - secrets: inherit - - collect-npm-visor-client: - name: Collect visor-client npm licenses - uses: ansys-internal/saf-github-workflow-templates/.github/workflows/_collect_npm_dependencies.yml@v5 - with: - repository: ${{ github.repository }} - reference: ${{ inputs.reference || github.sha }} - package-json-parent-directory: src/ansys/visor/visor-client - packages-to-filter-out: '@tybys/wasm-util' - node-version: 20 - template-ref: v5 - secrets: inherit - - # SGWT artifact name is still licenses_information_npm_visor — save before dash overwrites it. - stage-npm-visor-client: - name: Stage visor-client npm licenses - needs: collect-npm-visor-client - runs-on: ubuntu-latest - steps: - - uses: actions/download-artifact@v6 - with: - name: licenses_information_npm_visor - path: npm-visor-client - - uses: actions/upload-artifact@v4 - with: - name: npm-licenses-staging-visor-client - path: npm-visor-client - if-no-files-found: error - - collect-npm-dash: - name: Collect dash npm licenses - needs: stage-npm-visor-client - uses: ansys-internal/saf-github-workflow-templates/.github/workflows/_collect_npm_dependencies.yml@v5 - with: - repository: ${{ github.repository }} - reference: ${{ inputs.reference || github.sha }} - package-json-parent-directory: src/ansys/visor/dash - node-version: 20 - template-ref: v5 - secrets: inherit - - stage-npm-dash: - name: Stage dash npm licenses - needs: collect-npm-dash - runs-on: ubuntu-latest - steps: - - uses: actions/download-artifact@v6 - with: - name: licenses_information_npm_visor - path: npm-dash - - uses: actions/upload-artifact@v4 - with: - name: npm-licenses-staging-visor-dash - path: npm-dash - if-no-files-found: error - - merge-npm-licenses: - name: Merge npm licenses for PDF - needs: - - stage-npm-visor-client - - stage-npm-dash - runs-on: ubuntu-latest - steps: - - uses: actions/download-artifact@v6 - with: - path: npm-staged - pattern: npm-licenses-staging-* - merge-multiple: true - - - name: Merge npm_dependencies.json and license directories - shell: bash - run: | - set -euo pipefail - mkdir -p merged/licenses_information merged/copyright_information - python3 <<'PY' - import json - from pathlib import Path - - merged: dict = {} - for path in sorted(Path("npm-staged").rglob("npm_dependencies.json")): - with path.open(encoding="utf-8") as fh: - data = json.load(fh) - if isinstance(data, dict): - merged.update(data) - else: - raise TypeError(f"Unexpected JSON in {path}: {type(data)}") - - out = Path("merged/npm_dependencies.json") - out.write_text(json.dumps(merged, indent=2, sort_keys=True), encoding="utf-8") - print(f"Merged {len(merged)} npm packages into {out}") - PY - for dir_name in licenses_information copyright_information; do - find npm-staged -type d -name "$dir_name" | while read -r src_dir; do - cp -a "$src_dir/." "merged/$dir_name/" - done - done - - - uses: actions/upload-artifact@v4 - with: - name: licenses_information_npm_visor - path: merged - if-no-files-found: error - - generate-pdf: - name: Generate legal notice PDF - needs: - - collect-py-licenses - - merge-npm-licenses - uses: ansys-internal/saf-github-workflow-templates/.github/workflows/_generate_legal_notice_pdf.yml@v5 - with: - title: ${{ inputs.project_name }} - template-ref: v5 - secrets: inherit diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 1951ee6e..34bdae09 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -140,45 +140,6 @@ jobs: mkdir -p tests/artifacts/smoke/reports poetry run pytest tests/e2e/smoke -m "not saf" --html=tests/artifacts/smoke/reports/smoke-tests.html --self-contained-html --junitxml=tests/artifacts/smoke/reports/smoke-junit.xml --verbose | tee tests/artifacts/smoke/reports/smoke-result.log - # SAF-related steps temporarily disabled - # # saf-visor-poc currently only supports Python 3.11 and 3.12 - # - name: Install SAF CLI - # if: matrix.python-version == '3.11' || matrix.python-version == '3.12' - # run: pip install ansys-saf-cli - - # - name: Clone saf-visor-poc - # if: matrix.python-version == '3.11' || matrix.python-version == '3.12' - # uses: actions/checkout@v4 - # with: - # repository: ansys-internal/saf-visor-poc - # token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} - # path: saf-visor-poc - - # - name: Install saf-visor-poc dependencies - # if: matrix.python-version == '3.11' || matrix.python-version == '3.12' - # env: - # POETRY_HTTP_BASIC_SOLUTIONS_PRIVATE_PYPI_USERNAME: ${{ secrets.SOLUTIONS_PRIVATE_PYPI_USERNAME }} - # POETRY_HTTP_BASIC_SOLUTIONS_PRIVATE_PYPI_PASSWORD: ${{ secrets.SOLUTIONS_PRIVATE_PYPI_PASSWORD }} - # working-directory: saf-visor-poc - # run: poetry run saf install . - - # - name: Run SAF smoke tests - # if: matrix.python-version == '3.11' || matrix.python-version == '3.12' - # continue-on-error: true - # env: - # DISPLAY: ":99" - # VTK_DEFAULT_RENDER_WINDOW_OFFSCREEN: "1" - # run: | - # set -o pipefail - # mkdir -p tests/artifacts/saf-smoke/reports - # poetry run pytest tests/e2e/smoke/test_smoke_saf_visor.py \ - # --saf-project-dir "${{ github.workspace }}/saf-visor-poc" \ - # --html=tests/artifacts/saf-smoke/reports/saf-smoke-tests.html \ - # --self-contained-html \ - # --junitxml=tests/artifacts/saf-smoke/reports/saf-smoke-junit.xml \ - # --verbose \ - # | tee tests/artifacts/saf-smoke/reports/saf-smoke-result.log - - name: Run Regression tests continue-on-error: true env: diff --git a/doc/changelog.d/72.maintenance.md b/doc/changelog.d/72.maintenance.md new file mode 100644 index 00000000..eb85bd3d --- /dev/null +++ b/doc/changelog.d/72.maintenance.md @@ -0,0 +1 @@ +Clean up internal refs in workflows