Skip to content
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

FIX: Fix delete port #5713

Merged
merged 12 commits into from
Feb 7, 2025
Merged

FIX: Fix delete port #5713

merged 12 commits into from
Feb 7, 2025

Conversation

amichel0205
Copy link
Contributor

@amichel0205 amichel0205 commented Jan 31, 2025

Description

To fix issue with function _delete port added an option to delete only port or port and geometry (same as option in AEDT UI)

Please provide a brief description of the changes made in this pull request.

Issue linked

close #5710

Checklist

  • I have tested my changes locally.
  • I have added necessary documentation or updated existing documentation.
  • I have followed the coding style guidelines of this project.
  • I have added appropriate tests (unit, integration, system).
  • I have reviewed my changes before submitting this pull request.
  • I have linked the issue or issues that are solved by the PR if any.
  • I have agreed with the Contributor License Agreement (CLA).

@ansys-reviewer-bot
Copy link
Contributor

Thanks for opening a Pull Request. If you want to perform a review write a comment saying:

@ansys-reviewer-bot review

@amichel0205 amichel0205 self-assigned this Jan 31, 2025
@github-actions github-actions bot added the bug Something isn't working label Jan 31, 2025
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.23%. Comparing base (632a454) to head (4b6bcfa).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5713      +/-   ##
==========================================
+ Coverage   85.21%   85.23%   +0.01%     
==========================================
  Files         156      156              
  Lines       61217    61219       +2     
==========================================
+ Hits        52169    52179      +10     
+ Misses       9048     9040       -8     

@Samuelopez-ansys
Copy link
Member

I have canceled the workflow, until the unit test is not implemented.

src/ansys/aedt/core/hfss3dlayout.py Outdated Show resolved Hide resolved
src/ansys/aedt/core/hfss3dlayout.py Outdated Show resolved Hide resolved
Copy link
Contributor

@SMoraisDev SMoraisDev left a comment

Choose a reason for hiding this comment

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

There is still a typo in the documentation.

Yes, sorry fixed it now.

@Samuelopez-ansys
Copy link
Member

@amichel0205 I still do not see the unit test

@amichel0205
Copy link
Contributor Author

amichel0205 commented Feb 7, 2025

Hi @Samuelopez-ansys

I would like to implement the test like this:

def test_14a_create_coaxial_port(self):
    port = self.aedtapp.create_coax_port("port_via", 0.5, "Top", "Lower")
    assert port.name == "Port2"
    assert port.props["Radial Extent Factor"] == "0.5"
    self.aedtapp.delete_port(name=port.name, remove_geometry=False)
   assert len(self.aedtapp.port_list) == 0
    port = self.aedtapp.create_coax_port("port_via", 0.5, "Top", "Lower")
    self.aedtapp.delete_port(name=port.name)
   assert len(self.aedtapp.port_list) == 0
   self.aedtapp.odesign.Undo()

Doing this should check both option remove and not remove geometry, but will modify the state of self.aedtapp() at the end of the test where no port, neither via longer exist.

@Samuelopez-ansys Samuelopez-ansys enabled auto-merge (squash) February 7, 2025 12:20
@Samuelopez-ansys Samuelopez-ansys dismissed SMoraisAnsys’s stale review February 7, 2025 13:21

Suggestions implemented

@Samuelopez-ansys Samuelopez-ansys merged commit 6f36565 into main Feb 7, 2025
43 checks passed
@Samuelopez-ansys Samuelopez-ansys deleted the Fix_delete_port branch February 7, 2025 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

With delete_port(self, name) function not only the port is deleted but the geometry as well
6 participants