-
Notifications
You must be signed in to change notification settings - Fork 1
Improve examples in docs #16
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
base: release/26
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This pull request enhances the documentation with comprehensive Moldflow API examples and adds flexibility to the publishing workflow. The changes provide practical code examples for advanced Moldflow operations while allowing documentation-only releases.
- Added extensive advanced examples covering data transformation, diagnostics, boundary conditions, and PowerPoint report generation
- Modified the GitHub Actions workflow to support documentation-only publishing
- Enhanced the documentation with real-world use cases and complex API interactions
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
docs/source/readme.rst | Added comprehensive advanced examples including derived results, vector operations, coolant endpoints, and PowerPoint report generation |
.github/workflows/publish.yml | Added docs_only input parameter and conditional logic to skip package publishing steps when only updating documentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
||
Derived Results | ||
--------------- | ||
|
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.
We probably want to add a line here to explain what the goal of this script is.
docs/source/readme.rst
Outdated
pm.get_indp_values(ds_id, all_times) | ||
target_time = 13.0 | ||
closest_time = min(all_times.to_list(), key=lambda t: abs(t - target_time)) | ||
indp = synergy.create_double_array(); indp.add_double(closest_time) |
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.
Don't think we should use semicolons for an example to beginners. If we do, we should give an earlier example and explain that its the same as adding a new line
docs/source/readme.rst
Outdated
mapping = { | ||
"ISOMETRIC": StandardViews.ISOMETRIC, | ||
"FRONT": StandardViews.FRONT, | ||
"RIGHT": StandardViews.RIGHT, | ||
"LEFT": StandardViews.LEFT, | ||
"TOP": StandardViews.TOP, | ||
"BACK": StandardViews.BACK, | ||
} | ||
sv = mapping.get(orientation.upper()) | ||
if sv is not None: | ||
viewer.go_to_standard_view(sv) | ||
viewer.fit() |
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.
I think we can just use the go_to_standard_view here. Don't think we need the mapping
Description
Add more examples in docs (including PowerPoint generation) and allow deploying docs without trying to push to PyPI.
Fixes # N/A.
Type of change
Please delete options that are not relevant.
Checklist
Please delete options that are not relevant.
Testing
Tested new examples locally.
Additional Notes
Add any other context about the pull request here.