-
Notifications
You must be signed in to change notification settings - Fork 135
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
chore: improve type annotations #659
Conversation
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
WalkthroughThe update introduces a GitHub Actions workflow for running the Pyright type checker, enhances type hinting across various modules, and makes significant changes to method signatures and class properties. These improvements aim to increase code reliability, maintainability, and type safety. Key updates include modifications to the Changes
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
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: 16
Out of diff range and nitpick comments (2)
dpdata/ase_calculator.py (2)
Line range hint
54-75
: Add type checks to avoid potentialNoneType
attribute errors.- assert atoms is not None + if atoms is None: + raise ValueError("`atoms` cannot be None")
Line range hint
1-1
: Add the missing import for annotations.+from __future__ import annotations
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
CodSpeed Performance ReportMerging #659 will not alter performanceComparing Summary
|
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## devel #659 +/- ##
==========================================
+ Coverage 83.86% 84.06% +0.20%
==========================================
Files 81 81
Lines 6996 7122 +126
==========================================
+ Hits 5867 5987 +120
- Misses 1129 1135 +6 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
@coderabbitai resolve |
Actions PerformedComments resolved. |
I give up fix type annotations in all files, but it's meaningful to fix the top-module files
dpdata/*.py
.Summary by CodeRabbit
New Features
name
property toDPDataCalculator
class.rdkit_mol
in bond order system.Improvements
Maintenance
pyproject.toml
.