Skip to content

feat: add helper methods#1507

Open
dipinknair wants to merge 14 commits intomainfrom
feat/utilities
Open

feat: add helper methods#1507
dipinknair wants to merge 14 commits intomainfrom
feat/utilities

Conversation

@dipinknair
Copy link
Collaborator

@dipinknair dipinknair commented Feb 4, 2026

from ansys.mechanical.core import App
app = App(globals=globals(), log_level="DEBUG")
print(app)

app.helpers.import_geometry(<path>)
app.helpers.print_tree()
app.helpers.export_image(app.Model.Geometry, "geometry.png")
app.helpers.setup_graphics("front")
app.helpers.export_image(app.Model.Geometry, "geometry_front.png")

modal = Model.AddModalAnalysis()
solution = modal.Solution
total_deformation = solution.AddTotalDeformation()
Model.Solve()
app.helpers.print_tree()

app.helpers.export_animation(total_deformation, "deformation.gif")
app.close()

Closes #1487

@github-actions github-actions bot added the enhancement New features or code improvements label Feb 4, 2026
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Feb 4, 2026
@github-actions
Copy link

github-actions bot commented Feb 4, 2026

The documentation for this pull request will be available at https://mechanical.docs.pyansys.com/pull/1507. Please allow some time for the documentation to be deployed.

@dipinknair dipinknair marked this pull request as ready for review February 4, 2026 14:58
@dipinknair dipinknair requested a review from a team as a code owner February 4, 2026 14:58
@dipinknair dipinknair requested a review from rs-bh-n February 4, 2026 14:58
@codacy-production
Copy link

codacy-production bot commented Feb 4, 2026

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-3.83% (target: -1.00%) 33.01%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (e8fa5de) 3109 2545 81.86%
Head commit (fa50851) 3273 (+164) 2554 (+9) 78.03% (-3.83%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1507) 206 68 33.01%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 33.00971% with 138 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.03%. Comparing base (e8fa5de) to head (fa50851).

❌ Your patch check has failed because the patch coverage (33.00%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1507      +/-   ##
==========================================
- Coverage   81.85%   78.03%   -3.83%     
==========================================
  Files          42       43       +1     
  Lines        3109     3273     +164     
==========================================
+ Hits         2545     2554       +9     
- Misses        564      719     +155     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@RobPasMue RobPasMue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty cool! Thanks @dipinknair !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New features or code improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add utilities module for expanded API coverage

3 participants