8000 feat: Use pyproject.toml instead of setup.cfg + pinned dependencies + ruff as linter. by PabloHiro · Pull Request #1325 · ansible/receptor · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: Use pyproject.toml instead of setup.cfg + pinned dependencies + ruff as linter. #1325

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

Merged
merged 2 commits into from
May 30, 2025

Conversation

PabloHiro
Copy link
Contributor
@PabloHiro PabloHiro commented May 20, 2025

AAP-45792

Changes:

  • Use pyproject.toml instead of setup.cfg for receptorctl and receptor-python-worker PEP518
  • Set minimum version of all project dependencies, leave loosen test (optional-dependencies) dependencies as they will be constrained by project dependencies as per PEP 633
  • Use ruff as linter. Flake8 does not have native support for pyproject.toml and ruff has modern support.
  • Remove usage of the file .VERSION and instead use standard tooling. For linting or test report, default to a fallback_version. When building, use SETUPTOOLS_SCM_PRETEND_VERSION variables. Documentation
  • Linted .py files with ruff.

All nox sessions are kept, so CI does not need to be changed.

@PabloHiro PabloHiro force-pushed the feature/receptorctl-dependencies branch 3 times, most recently from 8be2b6c to 2010c35 Compare May 20, 2025 12:08
Copy link
codecov bot commented May 20, 2025

Codecov Report

Attention: Patch coverage is 55.55556% with 4 lines in your changes missing coverage. Please review.

Project coverage is 44.50%. Comparing base (06eef5e) to head (f8988c4).
Report is 3 commits behind head on devel.

Files with missing lines Patch % Lines
receptorctl/receptorctl/cli.py 50.00% 2 Missing ⚠️
receptorctl/receptorctl/socket_interface.py 60.00% 2 Missing ⚠️
@@            Coverage Diff             @@
##            devel    #1325      +/-   ##
==========================================
+ Coverage   43.72%   44.50%   +0.78%     
==========================================
  Files          57       60       +3     
  Lines        9782    10423     +641     
==========================================
+ Hits         4277     4639     +362     
- Misses       5193     5469     +276     
- Partials      312      315       +3     
Files with missing lines Coverage Δ
receptorctl/receptorctl/cli.py 39.67% <50.00%> (ø)
receptorctl/receptorctl/socket_interface.py 66.17% <60.00%> (ø)

... and 6 files with indirect coverage changes

Components Coverage Δ
Go 44.22% <82.81%> (+0.50%) ⬆️
Receptorctl 49.31% <55.55%> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@PabloHiro PabloHiro marked this pull request as draft May 20, 2025 15:08
@PabloHiro PabloHiro force-pushed the feature/receptorctl-dependencies branch from 2010c35 to 42502e2 Compare May 20, 2025 15:44
@PabloHiro PabloHiro force-pushed the feature/receptorctl-dependencies branch from 42502e2 to 04dead9 Compare May 21, 2025 06:37
@PabloHiro PabloHiro changed the title feat: Use pyproject.toml instead of setup.cfg for receptorctl + pinne… feat: Use pyproject.toml instead of setup.cfg + pinned dependencies + ruff as linter. May 21, 2025
@PabloHiro PabloHiro force-pushed the feature/receptorctl-dependencies branch 7 times, most recently from 5b9e5f7 to 2f55ce6 Compare May 21, 2025 09:55
@PabloHiro PabloHiro marked this pull request as ready for review May 21, 2025 10:04
@PabloHiro PabloHiro requested a review from a team May 21, 2025 13:39
@PabloHiro PabloHiro self-assigned this May 21, 2025
Comment on lines 8 to 10
"python-dateutil==2.9.0",
"click==8.1.8",
"PyYAML==6.0.2",
Copy link
Contributor

Choose a reason for hiding this comment

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

Pin to exact versions will cause conflicts, especially because the same receptor version is used in multiple AAP releases with different dependent rpm versions. Can you set lower and/or upper version constraint instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right. Testing this with different versions is a bit challenging though. Will update the PR once I manage to do that.

Copy link
Contributor
@davemulford davemulford left a comment

Choose a reason for hiding this comment

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

Adding approval, knowing that this won't be merged until the comment by @simaishi about version pinning is resolved.

@PabloHiro PabloHiro force-pushed the feature/receptorctl-dependencies branch from 2f55ce6 to 793b8ce Compare May 29, 2025 10:13
@PabloHiro PabloHiro force-pushed the feature/receptorctl-dependencies branch from 793b8ce to f8988c4 Compare May 29, 2025 10:26
Copy link

Copy link
Contributor
@AaronH88 AaronH88 left a comment

Choose a reason for hiding this comment

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

lgtm

@PabloHiro PabloHiro merged commit 0bbaed5 into ansible:devel May 30, 2025
23 checks passed
@PabloHiro PabloHiro deleted the feature/receptorctl-dependencies branch May 30, 2025 15:23
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.

4 participants
0