-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add calc_displacements_ellipsoid
function
#87
Conversation
@coderabbitai review |
Actions performedReview triggered.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe recent changes to the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (9)
doped/utils/displacements.py (9)
604-604
: Optimize dictionary creation.Rewrite the
dict
call as a literal for better performance and readability.- marker=dict(color="black", size=3), + marker={"color": "black", "size": 3},Tools
Ruff
604-604: Unnecessary
dict
call (rewrite as a literal)Rewrite as a literal
(C408)
609-611
: Optimize dictionary creation.Rewrite the
dict
call as a literal for better performance and readability.- scene=dict( - aspectmode="data", - ), + scene={"aspectmode": "data"},Tools
Ruff
609-611: Unnecessary
dict
call (rewrite as a literal)Rewrite as a literal
(C408)
638-638
: Optimize dictionary creation.Rewrite the
dict
call as a literal for better performance and readability.- line=dict(color="black", width=2), + line={"color": "black", "width": 2},Tools
Ruff
638-638: Unnecessary
dict
call (rewrite as a literal)Rewrite as a literal
(C408)
744-753
: Optimize dictionary creation.Rewrite the
dict
call as a literal for better performance and readability.- marker=dict( - size=10, - opacity=0.5, - color=anisotropy_info_df["the_longest_radius"], # Set color according to column "a" - colorscale="rainbow", - colorbar=dict( - title="The longest radius of ellipsoid", - titleside="right", - ), - ), + marker={ + "size": 10, + "opacity": 0.5, + "color": anisotropy_info_df["the_longest_radius"], # Set color according to column "a" + "colorscale": "rainbow", + "colorbar": { + "title": "The longest radius of ellipsoid", + "titleside": "right", + }, + },Tools
Ruff
744-753: Unnecessary
dict
call (rewrite as a literal)Rewrite as a literal
(C408)
749-752: Unnecessary
dict
call (rewrite as a literal)Rewrite as a literal
(C408)
761-761
: Optimize dictionary creation.Rewrite the
dict
call as a literal for better performance and readability.- line=dict(color="black", dash="dash"), + line={"color": "black", "dash": "dash"},Tools
Ruff
761-761: Unnecessary
dict
call (rewrite as a literal)Rewrite as a literal
(C408)
771-771
: Optimize dictionary creation.Rewrite the
dict
call as a literal for better performance and readability.- title_font=dict(size=10), + title_font={"size": 10},Tools
Ruff
771-771: Unnecessary
dict
call (rewrite as a literal)Rewrite as a literal
(C408)
772-772
: Optimize dictionary creation.Rewrite the
dict
call as a literal for better performance and readability.- tickfont=dict(size=12), + tickfont={"size": 12},Tools
Ruff
772-772: Unnecessary
dict
call (rewrite as a literal)Rewrite as a literal
(C408)
782-782
: Optimize dictionary creation.Rewrite the
dict
call as a literal for better performance and readability.- title_font=dict(size=10), + title_font={"size": 10},Tools
Ruff
782-782: Unnecessary
dict
call (rewrite as a literal)Rewrite as a literal
(C408)
783-783
: Optimize dictionary creation.Rewrite the
dict
call as a literal for better performance and readability.- tickfont=dict(size=12), + tickfont={"size": 12},Tools
Ruff
783-783: Unnecessary
dict
call (rewrite as a literal)Rewrite as a literal
(C408)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- doped/utils/displacements.py (3 hunks)
Additional context used
Ruff
doped/utils/displacements.py
604-604: Unnecessary
dict
call (rewrite as a literal)Rewrite as a literal
(C408)
609-611: Unnecessary
dict
call (rewrite as a literal)Rewrite as a literal
(C408)
638-638: Unnecessary
dict
call (rewrite as a literal)Rewrite as a literal
(C408)
744-753: Unnecessary
dict
call (rewrite as a literal)Rewrite as a literal
(C408)
749-752: Unnecessary
dict
call (rewrite as a literal)Rewrite as a literal
(C408)
761-761: Unnecessary
dict
call (rewrite as a literal)Rewrite as a literal
(C408)
771-771: Unnecessary
dict
call (rewrite as a literal)Rewrite as a literal
(C408)
772-772: Unnecessary
dict
call (rewrite as a literal)Rewrite as a literal
(C408)
782-782: Unnecessary
dict
call (rewrite as a literal)Rewrite as a literal
(C408)
783-783: Unnecessary
dict
call (rewrite as a literal)Rewrite as a literal
(C408)
Additional comments not posted (2)
doped/utils/displacements.py (2)
35-35
: LGTM!The changes to
calc_site_displacements
improve clarity and modularity. The function is well-structured and handles edge cases appropriately.
985-985
: LGTM!The repositioning of
_get_bulk_struct_with_defect
improves the modularity of the code. The function is well-documented and handles different defect types appropriately.
@teruya7 this looks very nice, thank you very much for adding to the code! 🙌 Some small things on the checklist to get this merged:
|
Also following the CodeRabbit suggestions above; could you change the |
@kavanase |
@teruya7 that was quick! 🙌 |
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.
Added two code requests there!
Once done, I think this is all ready to be merged 😃
Thanks again @teruya7!
I also updated the functions to return the |
Thank you for checking! |
Hi @teruya7! |
@kavanase |
@kavanase |
@teruya7, no problem at all! |
@teruya7 there were some merge conflicts with the |
@kavanase |
Thanks for your work on this @teruya7! |
No description provided.