-
Notifications
You must be signed in to change notification settings - Fork 10
fix: resolve tox failures for missing Python interpreters #84
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,5 +1,5 @@ | ||||||||||
| [build-system] | ||||||||||
| requires = ["setuptools>=61.2", "jpy"] | ||||||||||
| requires = ["setuptools>=61.2", "jpy==2.1.0", "build==1.2.1"] | ||||||||||
| build-backend = "setuptools.build_meta" | ||||||||||
|
|
||||||||||
| [project] | ||||||||||
|
|
@@ -19,28 +19,37 @@ classifiers = [ | |||||||||
| "Development Status :: 5 - Production/Stable", | ||||||||||
| ] | ||||||||||
| dependencies = [ | ||||||||||
| "jpy", | ||||||||||
| "jpy==2.1.0", | ||||||||||
| ] | ||||||||||
|
|
||||||||||
| [project.optional-dependencies] | ||||||||||
| local = [ | ||||||||||
| 'flake8', | ||||||||||
| 'black', | ||||||||||
| 'isort', | ||||||||||
| 'tox', | ||||||||||
| 'pyyaml', | ||||||||||
| "flake8 == 7.1.1", | ||||||||||
| "black == 24.10.0", | ||||||||||
| "isort == 5.13.2", | ||||||||||
| "pyyaml == 6.0.3" | ||||||||||
| ] | ||||||||||
| tests = [ | ||||||||||
| 'coverage>=5.0.3', | ||||||||||
| 'pytest', | ||||||||||
| 'pytest-asyncio', | ||||||||||
| 'pytest-cov', | ||||||||||
| 'tox', | ||||||||||
| # ---- Python 3.9 Specific Pinned Versions ---- | ||||||||||
| "coverage==7.4.4; python_version == '3.9'", | ||||||||||
| "pytest==8.3.4; python_version == '3.9'", | ||||||||||
| "pytest-asyncio==0.23.8; python_version == '3.9'", | ||||||||||
| "pytest-cov==5.0.0; python_version == '3.9'", | ||||||||||
| "tox==4.18.1; python_version == '3.9'", | ||||||||||
| "tox-gh-actions==3.2.0; python_version == '3.9'", | ||||||||||
|
|
||||||||||
| # ---- Fallbacks for Python 3.10 and Newer ---- | ||||||||||
| "coverage==7.15.2; python_version > '3.9'", | ||||||||||
| "pytest==9.1.1; python_version > '3.9'", | ||||||||||
| "pytest-asyncio==1.4.0; python_version > '3.9'", | ||||||||||
| "pytest-cov==7.1.0; python_version > '3.9'", | ||||||||||
| "tox==4.57.0; python_version > '3.9'", | ||||||||||
| "tox-gh-actions==3.3.0; python_version > '3.9'" | ||||||||||
| ] | ||||||||||
|
|
||||||||||
| dev = [ | ||||||||||
| "drools_jpy[local]", | ||||||||||
| "drools_jpy[tests]", | ||||||||||
| "drools_jpy[local] == 0.4.1", | ||||||||||
| "drools_jpy[tests] == 0.4.1" | ||||||||||
|
Comment on lines
+51
to
+52
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win Remove version pins for self-referential Hardcoding the project's own version ( 🐛 Proposed fix- "drools_jpy[local] == 0.4.1",
- "drools_jpy[tests] == 0.4.1"
+ "drools_jpy[local]",
+ "drools_jpy[tests]"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| ] | ||||||||||
|
|
||||||||||
| [project.urls] | ||||||||||
|
|
@@ -60,6 +69,7 @@ legacy_tox_ini = """ | |||||||||
| [tox] | ||||||||||
| isolated_build = True | ||||||||||
| envlist = py39,py310,py311,py312 | ||||||||||
| skip_missing_interpreters = true | ||||||||||
|
|
||||||||||
| [gh-actions] | ||||||||||
| python = | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| sonar.sca.pythonResolveLocal=true | ||
| sonar.sca.enabled=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Lock dependencies installed through the test and development extras.
Although
pipandbuildare pinned,pip install .[tests] .[dev]can still resolve transitive dependencies to changing index versions. Install these extras through a reviewed constraints/lock file with hashes, or otherwise lock the complete dependency graph.🧰 Tools
🪛 GitHub Check: SonarCloud Code Analysis
[warning] 37-37: Using dependencies without locking resolved versions is security-sensitive.
See more on https://sonarcloud.io/project/issues?id=ansible_drools_jpy&issues=AZ-A7oHwp3bAlirjeNb2&open=AZ-A7oHwp3bAlirjeNb2&pullRequest=84
🤖 Prompt for AI Agents
Sources: Path instructions, Linters/SAST tools