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

Python metric collection #11013

Merged
merged 7 commits into from
Nov 27, 2024

Conversation

sachin-sandhu
Copy link
Contributor

@sachin-sandhu sachin-sandhu commented Nov 25, 2024

What are you trying to accomplish?

Fix: Enables metric collection for pip-compile and pipenv
Enhancements to package manager detection:

Also enables local python setup for correct detection of pip-compile, poetry and pipenv based of python version

Anything you want to highlight for special attention from reviewers?

How will you know you've accomplished your goal?

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@sachin-sandhu sachin-sandhu self-assigned this Nov 25, 2024
@sachin-sandhu sachin-sandhu marked this pull request as ready for review November 26, 2024 16:13
@sachin-sandhu sachin-sandhu requested a review from a team as a code owner November 26, 2024 16:13
@sachin-sandhu sachin-sandhu marked this pull request as draft November 26, 2024 16:18
@sachin-sandhu sachin-sandhu marked this pull request as ready for review November 26, 2024 16:29
nil
end

sig { returns(T.any(String, T.untyped)) }
Copy link
Member

Choose a reason for hiding this comment

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

why return untyped?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@abdulapopoola , This is for fail safe , As we are extracting package manager version from shell command, in case the output changes or there is any issue in version extraction (very low possibility) we can make sure metric collection exception does not cause update to fail. We are checking for untyped at "return PoetryPackageManager.new(detect_poetry_version) if poetry_files && detect_poetry_version"

@sachin-sandhu sachin-sandhu force-pushed the ssandhu/dependabot-python-metric-collection branch from 77aef56 to 8d55982 Compare November 27, 2024 13:56
Copy link
Contributor

@kbukum1 kbukum1 left a comment

Choose a reason for hiding this comment

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

LGTM

@sachin-sandhu sachin-sandhu force-pushed the ssandhu/dependabot-python-metric-collection branch from 7ff7c2c to c78c833 Compare November 27, 2024 20:15
@sachin-sandhu sachin-sandhu merged commit 5d96f2d into main Nov 27, 2024
60 checks passed
@sachin-sandhu sachin-sandhu deleted the ssandhu/dependabot-python-metric-collection branch November 27, 2024 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants