-
Notifications
You must be signed in to change notification settings - Fork 0
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
Configuration - TCL OCCT version extraction issue #21
base: master
Are you sure you want to change the base?
Conversation
Enhance version detection in OCCDoc_DetectCasVersion
WalkthroughThis pull request enhances the robustness of the OCC version detection in the Changes
Sequence Diagram(s)sequenceDiagram
participant Caller as Caller
participant Proc as OCCDoc_DetectCasVersion
participant FS as File System
Caller->>Proc: Call OCCDoc_DetectCasVersion
Proc->>FS: Construct dynamic file path and check existence
alt File exists
Proc->>FS: Open and read file (with try/catch)
FS-->>Proc: Return file content or error
alt Successful read
Proc->>Proc: Extract version using regex
Proc-->>Caller: Return constructed version string
else Error during read
Proc->>Caller: Output warning and return default version
end
else File missing
Proc-->>Caller: Return default version
end
sequenceDiagram
participant CI as GitHub CI
participant Checkout as actions/checkout (v4.2.1)
participant BuildDocs as Build-Docs Composite Action
participant Artifact as Artifact Upload
CI->>Checkout: Checkout repository
Checkout-->>CI: Repository contents
CI->>BuildDocs: Execute documentation build action
BuildDocs-->>CI: Generate documentation
CI->>Artifact: Upload generated docs and logs
Artifact-->>CI: Documentation published
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.github/actions/build-docs/action.yml (1)
41-47
: Indentation Consistency—YAMLlint Warning
YAMLlint has flagged an indentation issue at line 41 (“Upload overview documentation”). Although all steps appear to be aligned similarly, the linter expected an extra level of indentation (6 spaces instead of 4) for this block. Please verify whether the composite action schema requires list items understeps:
to be indented with 6 spaces relative to the file’s root. If so, a diff such as the one below can resolve the warning:- - name: Upload overview documentation - uses: actions/[email protected] - with: - name: overview-doc - path: doc/overview - retention-days: 90 + - name: Upload overview documentation + uses: actions/[email protected] + with: + name: overview-doc + path: doc/overview + retention-days: 90Adjusting the indentation in this manner (and verifying it against GitHub’s composite action documentation) should clear the YAMLlint warning.
.github/workflows/build-and-test-multiplatform.yml (1)
36-46
: New Documentation Job Added
A new job nameddocumentation
has been introduced to build OCCT documentation on a Windows-2022 runner using the custom composite action defined in./.github/actions/build-docs
. The checkout step here uses a slightly newer version (v4.2.1
) compared to some other jobs (which usev4.1.7
). While the implementation is clear and aligns with the objective of integrating documentation builds into the CI/CD process, consider standardizing the version ofactions/checkout
across all jobs for consistency. For example, if updating all tov4.2.1
is acceptable, then use:- uses: actions/[email protected] + uses: actions/[email protected]This minor consistency adjustment would be good to have.
🧰 Tools
🪛 YAMLlint (1.35.1)
[warning] 41-41: wrong indentation: expected 6 but found 4
(indentation)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/actions/build-docs/action.yml
(1 hunks).github/workflows/build-and-test-multiplatform.yml
(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/build-and-test-multiplatform.yml
[warning] 41-41: wrong indentation: expected 6 but found 4
(indentation)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: Prepare and Build on Windows with Clang (x64)
- GitHub Check: Prepare and Build on Ubuntu with GCC (x64)
- GitHub Check: Prepare and Build on Ubuntu with Clang (x64)
- GitHub Check: Build Documentation
- GitHub Check: Prepare and Build on Windows with MSVC (x64)
🔇 Additional comments (7)
.github/actions/build-docs/action.yml (7)
1-3
: Clarify the Action Metadata and Description
The header now clearly names the action as “Build Documentation” and adds a useful description about using Doxygen to build OCCT documentation. This improves discoverability and clarity.
4-6
: Adoption of Composite Action Structure
The change to a composite action (usingusing: composite
) simplifies the configuration and makes the action more modular. The structure appears correct overall.
7-11
: Installation Step Review
The “Install dependencies” step installs Graphviz and Doxygen via Chocolatey and now specifies PowerShell as the shell. The implementation is clear and straightforward.
13-19
: Building the Refman Documentation
The step for building the “refman” documentation is well defined with a clear command block. Ensure that thegendoc -refman
utility in theadm
folder reliably produces the intended outputs under different environments.
20-26
: Uploading Refman Documentation Artifacts
The configuration to upload the generated refman documentation is correct. The artifact name, path, and retention-days parameters are appropriately set.
27-33
: Uploading Generation Log
The step to upload the generation log artifact is implemented consistently with other artifact uploads. This aids in troubleshooting documentation generation errors.
34-40
: Building Documentation Overview
The “Build documentation Overview” step mirrors the earlier build step and is clear in its commands. Consistency in using Command Prompt (cmd
) for this step is maintained.
Enhance version detection in OCCDoc_DetectCasVersion
Summary by CodeRabbit
Bug Fixes
New Features