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

Convert Shell attributes to arrays #371

Merged
merged 1 commit into from
Jul 10, 2024
Merged

Conversation

tovrstra
Copy link
Member

@tovrstra tovrstra commented Jul 9, 2024

This is a small step in #191. (I'm splitting things up from a larger change, to keep things bite size.)

This is a technical change to facilitate next steps in #191. It also makes array attributes in the Shell class consistent with the way they are implemented in the IOData class.

Summary by Sourcery

This pull request converts the Shell class attributes from lists to numpy arrays to ensure consistency with the IOData class. It also updates the relevant test cases to reflect these changes.

  • Enhancements:
    • Converted Shell class attributes from lists to numpy arrays for consistency with IOData class.
  • Tests:
    • Updated test cases to use numpy array comparisons for Shell class attributes.

@tovrstra tovrstra added the API breaking Should be done first to stabilize API label Jul 9, 2024
@tovrstra tovrstra added this to the 1.0.0 milestone Jul 9, 2024
Copy link
Contributor

sourcery-ai bot commented Jul 9, 2024

Reviewer's Guide by Sourcery

This pull request converts Shell class attributes from lists to numpy arrays, making them consistent with the IOData class. It introduces a converter function for these attributes and updates the test cases to use assert_equal for comparisons. Additionally, Shell instantiation in some test files is modified to use lists instead of numpy arrays.

File-Level Changes

Files Changes
iodata/test/test_cp2klog.py
iodata/test/test_fchk.py
iodata/test/common.py
Replaced direct list comparisons with assert_equal for kinds and angmoms attributes in test files.
iodata/test/test_overlap.py
iodata/test/test_molden.py
Changed Shell instantiation to use lists instead of numpy arrays for angmoms, kinds, exponents, and coeffs attributes in test files.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

deepsource-io bot commented Jul 9, 2024

Here's the code health analysis summary for commits 4e15520..6659cf5. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Shell LogoShell✅ SuccessView Check ↗
DeepSource Python LogoPython✅ Success
🎯 1 occurence resolved
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @tovrstra - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 3 issues found
  • 🟢 Security: all looks good
  • 🟡 Testing: 2 issues found
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

iodata/basis.py Show resolved Hide resolved
iodata/basis.py Show resolved Hide resolved
iodata/formats/fchk.py Show resolved Hide resolved
iodata/test/test_cp2klog.py Show resolved Hide resolved
iodata/test/test_fchk.py Show resolved Hide resolved
Copy link
Member

@PaulWAyers PaulWAyers left a comment

Choose a reason for hiding this comment

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

LGTM

@tovrstra
Copy link
Member Author

Thanks!

@tovrstra tovrstra merged commit d27e68c into theochem:main Jul 10, 2024
12 checks passed
@tovrstra tovrstra deleted the attrs-basis branch July 10, 2024 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API breaking Should be done first to stabilize API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants