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

Refact edb load amat #3805

Merged
merged 11 commits into from
Nov 4, 2023
Merged

Refact edb load amat #3805

merged 11 commits into from
Nov 4, 2023

Conversation

SMoraisAnsys
Copy link
Collaborator

This PR is a proposition to refact how EDB reads materials file

Problem
Current implementation leverages load_entire_aedt_file from pyaedt.generic.LoadAEDTFile.

Solution
The proposed solution consists in reworking the way amat are read and loaded. First, we only allow to load amat that are located in AEDT's syslib directory. By default, the file that is read is "Materials.amat".
Since we only work with syslib, the code related to personallib has been removed.

Note
The proposed solutions is inspired from #3711. The resulting code refacts the PR's code to have fewers LOC and fixes many errors that were part of the PR.

@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

@github-actions github-actions bot added the edb label Oct 26, 2023
_unittest/test_00_EDB.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #3805 (b48ae86) into main (59f3781) will decrease coverage by 0.02%.
The diff coverage is 88.33%.

@@            Coverage Diff             @@
##             main    #3805      +/-   ##
==========================================
- Coverage   81.13%   81.11%   -0.02%     
==========================================
  Files         180      180              
  Lines       62314    62281      -33     
==========================================
- Hits        50557    50521      -36     
- Misses      11757    11760       +3     

@SMoraisAnsys SMoraisAnsys marked this pull request as ready for review October 27, 2023 08:57
@SMoraisAnsys
Copy link
Collaborator Author

@maxcapodi78 I did the quick changes we spoke of. If you want me to rework something else, feel free to point it :)
For example, following Simon guidance, I removed personallib property. If you want it back and make it "compatible" with current developments, I could add an extra if statement to check if the amat_file provided is inside of personallib.

Copy link
Contributor

@hui-zhou-a hui-zhou-a left a comment

Choose a reason for hiding this comment

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

LGTM

Problem
Current implementation leverages load_entire_aedt_file from
pyaedt.generic.LoadAEDTFile.

Solution
The proposed solution consists in reworking the way amat are read and
loaded. First, we only allow to load amat that are located in AEDT's
syslib directory. By default, the file that is read is "Materials.amat".
Since we only work with syslib, the code related to personallib has
been removed.

Note
The proposed solutions is inspired from
#3711. The resulting code refacts
the PR's code to have fewers LOC and fixes many errors that were part
of the PR.
Problem
A warning is raised during workflow "Build project documentation".

Solution
Follow pydata/pydata-sphinx-theme#1492
instructions and disable "navigation_with_keys" as it is also something
that is defined as default for ansys sphinx theme (see
ansys/ansys-sphinx-theme#315)
@SMoraisAnsys
Copy link
Collaborator Author

@maxcapodi78 I think I've taken every feedback into account so I'll merge and close this PR. Feel free to contact me if I should do other modifications :)

@SMoraisAnsys SMoraisAnsys merged commit 876744c into main Nov 4, 2023
12 checks passed
@SMoraisAnsys SMoraisAnsys deleted the refact/edb_load_amat branch November 4, 2023 13:16
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.

4 participants