Skip to content

Conversation

@amol-
Copy link
Collaborator

@amol- amol- commented Mar 11, 2025

Intent

Prepare foundations for supporting detection of python version requirements when generating manifest.json.
This implements detect of which metadata file is available and parsing of the requirement from pyproject.toml.
Further changes will provide support for setup.cfg and .python-version, those will then be used to set the proper requirement field in the manifest.json.

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change

Approach

The support for adding python version constraint to manifest.json is being built in small incremental steps that won't change user facing behaviour until the final PR that will enable the new behaviour.

Automated Tests

A new test suite in test_pyproject.py was added.

Directions for Reviewers

There isn't a directly corresponding issue in the rsconnect-python repository as the issue governing this work is in Connect itself.

@amol- amol- force-pushed the extract-pyproject-30403 branch from 158f81a to 5b9035d Compare March 11, 2025 16:03
@github-actions
Copy link

github-actions bot commented Mar 11, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
4852 3605 74% 0% 🟢

New Files

File Coverage Status
rsconnect/pyproject.py 100% 🟢
TOTAL 100% 🟢

Modified Files

No covered modified files...

updated for commit: 5ed8e3c by action🐍

@amol-
Copy link
Collaborator Author

amol- commented Mar 11, 2025

The failure seems to be already happening on main: https://github.com/posit-dev/rsconnect-python/actions/runs/13663461265/job/38199851576

So marking this as ready for review

@amol- amol- marked this pull request as ready for review March 11, 2025 16:26
@amol- amol- requested a review from sagerb March 12, 2025 09:52
Copy link
Contributor

@sagerb sagerb left a comment

Choose a reason for hiding this comment

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

This looks great. I only had a little nit about some comments in the test file to better describe what you're doing. I was able to certainly extract what was going on within the code, but for maintenance concerns, I would recommend adding some simple comments as indicated. But I will leave that in your hands to decide!

@amol-
Copy link
Collaborator Author

amol- commented Mar 12, 2025

@sagerb I added the comments in 5ae6d17 it should now be more explicit about what the tests are testing 👍

@amol- amol- force-pushed the extract-pyproject-30403 branch from 5ae6d17 to 5ed8e3c Compare March 13, 2025 11:35
@amol- amol- merged commit 0c170fb into main Mar 13, 2025
11 of 13 checks passed
@amol- amol- deleted the extract-pyproject-30403 branch March 13, 2025 11:43
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