diff --git a/.github/workflows/python_package.yml b/.github/workflows/python_package.yml index f077135..d992ad7 100644 --- a/.github/workflows/python_package.yml +++ b/.github/workflows/python_package.yml @@ -28,14 +28,13 @@ jobs: distribution: 'zulu' java-version: ${{ matrix.java-version }} - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} - name: Upgrade pip run: | - python3 -m pip install --upgrade pip - python3 -m pip install --upgrade build - python3 -m pip install .[tests] .[dev] + python3 -m pip install --upgrade pip==26.0 build==1.2.2 + python3 -m pip install .[tests] .[dev] # NOSONAR - dynamic local package extras - name: Run flake8 run: flake8 . - name: Run formatter diff --git a/pyproject.toml b/pyproject.toml index a13f575..19f8367 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" ] [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 = diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..6e9bfb6 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,2 @@ +sonar.sca.pythonResolveLocal=true +sonar.sca.enabled=false