Skip to content

Adding Type Annotation #6810

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

Closed
wants to merge 1 commit into from
Closed

Conversation

ayushjariyal
Copy link
Contributor

To align with the Standard Type Annotation project under GSoC 2025, I am adding type annotations to the add_multiply.py file.

@ayushjariyal
Copy link
Contributor Author

ayushjariyal commented Mar 28, 2025

@unkcpz , @GeigerJ2 , @khsrali , could you please review my PR and provide suggestions accordingly? I’m really excited to contribute and improve it further based on your feedback! 😊🚀

Copy link

codecov bot commented Mar 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.31%. Comparing base (bb5f93d) to head (4783214).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6810      +/-   ##
==========================================
+ Coverage   78.15%   78.31%   +0.17%     
==========================================
  Files         564      566       +2     
  Lines       42643    42763     +120     
==========================================
+ Hits        33322    33485     +163     
+ Misses       9321     9278      -43     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@danielhollas
Copy link
Collaborator

This is blocked on #6831, currently we don't run mypy type-checking in CI.

Copy link
Collaborator

@danielhollas danielhollas left a comment

Choose a reason for hiding this comment

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

@ayushjariyal thanks for the PR!

However, I don't think we'll want type annotations in this file specifically,
since they would limit the usefulness of these calcfunctions, which work on any types that support addition and multiplication (e.g. Float).

@ayushjariyal
Copy link
Contributor Author

Hi @danielhollas, thank you for the feedback!

I'm still learning, so I really appreciate you explaining why type annotations might not be best fit for this file. That makes a lot more sense now.

I'll look for another file where adding type hints would be more useful. If you have any suggestions for a good place to start, I'd be happy to work on it!

Also, since this change isn’t needed anymore, should I close this PR. Thanks again for your help - I'm excited to keep contributing and learning!😊

@danielhollas
Copy link
Collaborator

I'll look for another file where adding type hints would be more useful. If you have any suggestions for a good place to start, I'd be happy to work on it!

Sure, I'll have a look and see which files would be suitable and let you know. aiida-core codebase is somewhat challenging to type in general because we do a lot of dynamic stuff.
In the meantime, maybe you could have a look and review the open PRs related to typing?
#6831 #6704 and #6706

Closing this for now.

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.

2 participants