Skip to content

Add version parsing from Pipfile - #1067

Merged
v-HarithaVattikuti merged 5 commits into
actions:mainfrom
aradkdj:feature/add-version-parsing-from-Pipfile
Jul 24, 2025
Merged

v-HarithaVattikuti merged 5 commits into
actions:mainfrom
aradkdj:feature/add-version-parsing-from-Pipfile

Conversation

@aradkdj

@aradkdj aradkdj commented Mar 27, 2025

Copy link
Copy Markdown
Contributor

Description:
Add version parsing from a Pipfile, passed through the python-version-file option.

Related issue:
#574

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.
@aradkdj
aradkdj requested a review from a team as a code owner March 27, 2025 03:04
@aradkdj
aradkdj force-pushed the feature/add-version-parsing-from-Pipfile branch from f387444 to 0fc6a29 Compare May 30, 2025 23:11
@v-mahabaleshwars

ghost commented Jun 4, 2025

Copy link
Copy Markdown
Contributor

Hi @aradkdj,
The checks are currently failing on your PR. Could you please address the issues and pull the latest updates from the main branch? Once that's done, we can proceed with the review.

Thanks!

@aradkdj
aradkdj force-pushed the feature/add-version-parsing-from-Pipfile branch from 0fc6a29 to c44ab2e Compare June 4, 2025 03:16
@v-mahabaleshwars

ghost commented Jun 9, 2025

Copy link
Copy Markdown
Contributor

Hi @aradkdj,
The checks are still failing. Please review the previous feedback comment, and let me know if you need any assistance to move forward.

@v-mahabaleshwars v-mahabaleshwars self-assigned this Jun 9, 2025
@aradkdj

ghost commented Jun 10, 2025

Copy link
Copy Markdown
Contributor Author

Sure. I took a look at it and could not figure out why it's failing on CI but not on the unit tests. Any pointer would be appreciated

@v-mahabaleshwars

ghost commented Jun 12, 2025

Copy link
Copy Markdown
Contributor

Hi @aradkdj,
This issue is occurring due to an incorrect file name specified in the .yml file. It should be 'Pipfile' instead of 'Pipenv'. The logic performs a strict check on the file name:

else if (versionFile.match('Pipfile')) {
  return getVersionInputFromPipfileFile(versionFile);
}

Since 'Pipenv' doesn't match 'Pipfile', the corresponding logic isn't triggered. Please update the file name to resolve the issue.

@aradkdj
aradkdj force-pushed the feature/add-version-parsing-from-Pipfile branch from c44ab2e to e87e3e9 Compare June 12, 2025 23:20
@aradkdj

ghost commented Jun 13, 2025

Copy link
Copy Markdown
Contributor Author

Sorry I missed that. It should be fixed now

@v-mahabaleshwars

ghost commented Jun 20, 2025

Copy link
Copy Markdown
Contributor

Hi @aradkdj,
It looks like some checks are currently failing for this pull request. To help get this PR ready for review, could you please make sure your changes are up to date with the latest changes in setup-python? You can rebase or merge as necessary.

If you need any help interpreting the logs or fixing a specific error, feel free to share the error details here and we can assist further.

@aradkdj

ghost commented Jun 20, 2025

Copy link
Copy Markdown
Contributor Author

Merged and checked if the dist changes. But it didn't. If I understand the errors correctly they come from annotations about the installed pip version. Is there anything else I could do to fix it?

@v-mahabaleshwars

ghost commented Jun 20, 2025

Copy link
Copy Markdown
Contributor

Hi @aradkdj,
It looks like the issue is still not resolved — your PR branch might be missing the latest changes from main. Please update your forked repo’s main branch with the upstream setup-python, and then merge those changes into your branch.
After updating, please rebuild the dist files and push the changes.

@aradkdj
aradkdj force-pushed the feature/add-version-parsing-from-Pipfile branch 2 times, most recently from 4302de9 to 9485ba7 Compare June 25, 2025 17:02
@aradkdj
aradkdj force-pushed the feature/add-version-parsing-from-Pipfile branch from 9485ba7 to ee0eb5b Compare July 4, 2025 21:50
@aradkdj
aradkdj force-pushed the feature/add-version-parsing-from-Pipfile branch from ee0eb5b to b62f6a8 Compare July 6, 2025 00:45
@aradkdj

ghost commented Jul 6, 2025

Copy link
Copy Markdown
Contributor Author

@mahabaleshwars this should be passing now. Sorry for the delay

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for parsing Python versions from a Pipfile via the python-version-file option.

  • Introduces getVersionInputFromPipfileFile and hooks it into getVersionInputFromFile.
  • Updates docs and CI workflows to demonstrate and test Pipfile usage.
  • Adds unit tests covering python_version, python_full_version, and empty Pipfile cases.

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/utils.ts Implement getVersionInputFromPipfileFile and integrate it
docs/advanced-usage.md Document how to use Pipfile with python-version-file
tests/utils.test.ts Add tests for Pipfile parsing scenarios
.github/workflows/test-python.yml Add Pipfile-based setup jobs for python_version and python_full_version
.github/workflows/test-python-freethreaded.yml Add equivalent Pipfile jobs in the freethreaded workflow
Comment thread src/utils.ts Resolved
Comment thread src/utils.ts Resolved
Comment thread src/utils.ts Resolved
Aramís Segovia and others added 4 commits July 11, 2025 12:05
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@v-HarithaVattikuti
v-HarithaVattikuti merged commit 36da51d into actions:main Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

6 participants