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

chore: switch from deprecated pkg_resources to importlib.metadata #498

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

lang-m
Copy link
Member

@lang-m lang-m commented Oct 6, 2023

No description provided.

@lang-m lang-m requested a review from samjrholt October 6, 2023 08:04
@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

PR Analysis

  • 🎯 Main theme: Replacing deprecated pkg_resources with importlib.metadata
  • 📝 PR summary: This PR replaces the deprecated pkg_resources module with importlib.metadata for version management in the discretisedfield/init.py file.
  • 📌 Type of PR: Refactoring
  • 🧪 Relevant tests added: No
  • ⏱️ Estimated effort to review [1-5]: 1, because the PR is straightforward and involves only a single file and a minor change.
  • 🔒 Security concerns: No security concerns found

PR Feedback

  • 💡 General suggestions: The change is straightforward and follows best practices. However, it would be beneficial to add a test case to ensure the version is being correctly fetched using the new module.

  • 🤖 Code feedback:

    • relevant file: discretisedfield/__init__.py
      suggestion: Consider adding a test case to verify that the version is being correctly fetched using importlib.metadata. [medium]
      relevant line: version = importlib.metadata.version(package)

How to use

To invoke the PR-Agent, add a comment using one of the following commands:
/review [-i]: Request a review of your Pull Request. For an incremental review, which only considers changes since the last review, include the '-i' option.
/describe: Modify the PR title and description based on the contents of the PR.
/improve [--extended]: Suggest improvements to the code in the PR. Extended mode employs several calls, and provides a more thorough feedback.
/ask <QUESTION>: Pose a question about the PR.
/update_changelog: Update the changelog based on the PR's contents.

To edit any configuration parameter from configuration.toml, add --config_path=new_value
For example: /review --pr_reviewer.extra_instructions="focus on the file: ..."
To list the possible configuration parameters, use the /config command.

@codecov-commenter
Copy link

codecov-commenter commented Oct 6, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (89068b8) 93.49% compared to head (ad46b8e) 93.49%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #498   +/-   ##
=======================================
  Coverage   93.49%   93.49%           
=======================================
  Files          28       28           
  Lines        3027     3027           
=======================================
  Hits         2830     2830           
  Misses        197      197           
Files Coverage Δ
discretisedfield/__init__.py 100.00% <100.00%> (ø)

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

@lang-m lang-m merged commit b3970ad into master Oct 6, 2023
7 checks passed
@lang-m lang-m deleted the remove-deprecated-pkg_resources branch October 6, 2023 09:50
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.

3 participants