Skip to content

Conversation

osinjoku
Copy link
Contributor

@osinjoku osinjoku commented Sep 23, 2025

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.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

Please delete options that are not relevant.

  • I have read the CONTRIBUTING document
  • My code follows the style guidelines of this project
  • I have updated the documentation accordingly

Testing

Tested new examples locally.

Additional Notes

Add any other context about the pull request here.

Copy link

@Copilot Copilot AI left a 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.

@osinjoku osinjoku changed the title Feature/better examples Improve examples in docs Sep 23, 2025

Derived Results
---------------

Copy link
Collaborator

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.

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)
Copy link
Collaborator

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

Comment on lines 1250 to 1261
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()
Copy link
Collaborator

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

@osinjoku osinjoku marked this pull request as ready for review October 2, 2025 15:10
@osinjoku osinjoku requested a review from LiawChungYao October 2, 2025 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants