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

Instrument Python version metric #7617

Merged
merged 4 commits into from
Jul 25, 2023
Merged

Instrument Python version metric #7617

merged 4 commits into from
Jul 25, 2023

Conversation

jeffwidman
Copy link
Member

We want to know what versions of python are required by our users, so this is an initial stab at collecting some data.

Ideally we capture the minimum version, the maximum version, and the raw data from each manifest file that allowed us to calculate the min/max... this won't be quite so clean/polished, but we need to start somewhere and even a primitive form of this metric will provide enough information for us to understand the user impact of dropping python 3.6.

@jeffwidman jeffwidman requested a review from pavera July 22, 2023 23:08
@jeffwidman jeffwidman force-pushed the add-python-version-metric branch 2 times, most recently from 165ec0b to df65fb4 Compare July 24, 2023 04:54
@jeffwidman jeffwidman added the Ecosystems Used by the maintainer team for internal-facing project tracking label Jul 24, 2023
@jeffwidman jeffwidman self-assigned this Jul 24, 2023
Copy link
Contributor

@pavera pavera left a comment

Choose a reason for hiding this comment

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

This should do the trick at least initially. I think the most interesting question this raises is how many repos actually have multiple python versions defined in different manifest files?

@pavera pavera marked this pull request as ready for review July 25, 2023 15:14
@pavera pavera requested a review from a team as a code owner July 25, 2023 15:14
# ecosystems our goal is to extract the user specified versions, so we'll need to do file parsing... so should
# we move this `ecosystem_versions` metrics method to run in the file parser for all ecosystems? Downside is if
# file parsing blows up, this metric isn't emitted, but reality is we have to parse anyway... as we want to know
# the user-specified range of versions, not the version Dependabot chose to run.
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm planning to have follow-on PR's that move this to the FileParser class, but that refactor will require more work, and want this live now so it starts collecting metrics, so I'm going to merge as-is and then clean it up.

# TODO: alternatively this could use `python_requirement_parser.user_specified_requirements` which
# returns an array... which we could flip to return a hash of manifest name => version
# string and then check for min/max versions... today it simply defaults to
# array.first which seems rather arbitrary.
Copy link
Member Author

Choose a reason for hiding this comment

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

user_specified_requirements is a private method, so the best way to do that is move this to FileParser, but again, we want metrics soon, so ship this first then clean that up.

jeffwidman and others added 3 commits July 25, 2023 12:57
We want to know what versions of python are required by our users, so
this is an initial stab at collecting some data.

Ideally we capture the minimum version, the maximum version, and the raw
data from each manifest file that allowed us to calculate the min/max...
unfortunately this isn't so clean/polished, but we need to start
somewhere and even a primitive form of this metric will provide enough
information for us to understand the user impact of dropping python 3.6.
@jeffwidman jeffwidman merged commit 3447b11 into main Jul 25, 2023
90 checks passed
@jeffwidman jeffwidman deleted the add-python-version-metric branch July 25, 2023 21:15
brettfo pushed a commit to brettfo/dependabot-core that referenced this pull request Oct 11, 2023
We want to know what versions of python are required by our users, so
this is an initial stab at collecting some data.

Ideally we capture the minimum version, the maximum version, and the raw
data from each manifest file that allowed us to calculate the min/max...
unfortunately this isn't so clean/polished, but we need to start
somewhere and even a primitive form of this metric will provide enough
information for us to understand the user impact of dropping python 3.6.

---------

Co-authored-by: Tom Christensen <pavera@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ecosystems Used by the maintainer team for internal-facing project tracking L: python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants