From d84ff620f471138d7519f7542c153719b0ded817 Mon Sep 17 00:00:00 2001 From: Felix Oesterle Date: Tue, 17 Jun 2025 09:01:05 +0200 Subject: [PATCH 1/2] chore(ci): integrate `setup-pixi` and simplify pytest configuration - Delete `codecov.yml` to remove unused coverage configuration. - Update `MANIFEST.in` to exclude `docs`, `tests`, and `data` directories. - Disable `include-package-data` in `pyproject.toml` and adjust package exclusions. - Comment out `install_requires` and `python_requires` in `setup.py` for cleanup. - Replace `setup-python` and manual dependency installation with `setup-pixi`. - Consolidate pytest-related dependencies under the `dev` feature in `pyproject.toml`. chore(ci): add pytest execution step to `runTestSinglePython.yml` workflow --- .github/workflows/runTestSinglePython.yml | 45 +++++++++++++---------- MANIFEST.in | 4 +- codecov.yml | 19 ---------- pyproject.toml | 10 ++--- setup.py | 16 ++++---- 5 files changed, 42 insertions(+), 52 deletions(-) delete mode 100644 codecov.yml diff --git a/.github/workflows/runTestSinglePython.yml b/.github/workflows/runTestSinglePython.yml index d5db61fe3..9b9aeff3f 100644 --- a/.github/workflows/runTestSinglePython.yml +++ b/.github/workflows/runTestSinglePython.yml @@ -23,27 +23,34 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up Python - uses: actions/setup-python@v5 + - uses: prefix-dev/setup-pixi@v0.8.3 with: - python-version: '3.12' - check-latest: true - - name: Install dependencies + cache: false + - name: Pixi run pytest run: | - python -m pip install --upgrade pip - pip install flake8 pytest pytest-cov - pip install numpy cython - pip install setuptools - pip install pytest-mock - - name: Compile cython code - run: | - python setup.py build_ext --inplace --define CYTHON_TRACE - - name: Install avaframe - run: | - pip install . - - name: Test with pytest - run: | - pytest -ra --cov --cov-report=xml --cov-report lcov:cov.info --cov-config=.coveragerc + pixi run pytest -ra --cov --cov-report=xml --cov-report lcov:cov.info --cov-config=.coveragerc + +# - name: Set up Python +# uses: actions/setup-python@v5 +# with: +# python-version: '3.12' +# check-latest: true +# - name: Install dependencies +# run: | +# python -m pip install --upgrade pip +# pip install flake8 pytest pytest-cov +# pip install numpy cython +# pip install setuptools +# pip install pytest-mock +# - name: Compile cython code +# run: | +# python setup.py build_ext --inplace --define CYTHON_TRACE +# - name: Install avaframe +# run: | +# pip install . +# - name: Test with pytest +# run: | +# pytest -ra --cov --cov-report=xml --cov-report lcov:cov.info --cov-config=.coveragerc - uses: qltysh/qlty-action/coverage@main with: coverage-token: ${{secrets.QLTY_COVERAGE_TOKEN}} diff --git a/MANIFEST.in b/MANIFEST.in index 10f238b60..81b0acf77 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,7 +2,9 @@ include avaframe/RELEASE-VERSION include avaframe/version.py include avaframe/in3Utils/logging.conf include avaframe/com1DFA/*.pyx -include avaframe/com1DFA/*.pxd recursive-include avaframe *Cfg.ini global-exclude local_*Cfg.ini prune benchmarks +prune docs +prune avaframe/tests +prune avaframe/data diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index e704c7967..000000000 --- a/codecov.yml +++ /dev/null @@ -1,19 +0,0 @@ -github_checks: - annotations: false - -coverage: - status: - project: - default: - informational: true - target: auto - threshold: 0% - patch: - default: - informational: true - target: auto - threshold: 0% - -ignore: - - "**/run*.py" - - "**/com4FlowPy/*" diff --git a/pyproject.toml b/pyproject.toml index eb1397528..e1af36302 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,11 +50,10 @@ dependencies = [ # Setuptools [tool.setuptools] -include-package-data = true +include-package-data = false [tool.setuptools.packages.find] -exclude = ["docs"] -namespaces = false +exclude = ["docs*", "tests*"] [tool.setuptools_scm] version_scheme = "no-guess-dev" @@ -84,8 +83,6 @@ channels = ["https://prefix.dev/conda-forge"] platforms = ["linux-64", "win-64", "osx-64"] [tool.pixi.dependencies] -pytest = "*" -pytest-mock ="*" setuptools = "*" setuptools-scm = "*" @@ -95,6 +92,9 @@ avaframe = { path = "./", editable = true } [tool.pixi.feature.dev.dependencies] pixi-pycharm = "*" +pytest = "*" +pytest-cov = "*" +pytest-mock ="*" #Feature doc [tool.pixi.feature.doc.dependencies] diff --git a/setup.py b/setup.py index e340044d0..5f4fdf4cc 100644 --- a/setup.py +++ b/setup.py @@ -35,12 +35,12 @@ setup( options=setup_options, ext_modules=ext_modules, - install_requires=[ - 'numpy', - 'scipy', - 'cython', - 'matplotlib', - 'pandas' - ], - python_requires='>=3.8', + # install_requires=[ + # 'numpy', + # 'scipy', + # 'cython', + # 'matplotlib', + # 'pandas' + # ], + # python_requires='>=3.8', ) \ No newline at end of file From 055b1241774b9b5679fe316d353c3676365b2e11 Mon Sep 17 00:00:00 2001 From: Felix Oesterle Date: Tue, 17 Jun 2025 09:58:38 +0200 Subject: [PATCH 2/2] chore(config): update file references for `RELEASE-VERSION` to `RELEASE-VERSION.txt` - Rename all references from `RELEASE-VERSION` to `RELEASE-VERSION.txt` across the project. - Update `MANIFEST.in`, `.gitignore`, `pyproject.toml`, and `version.py` to reflect the new naming. - Simplify and clean up unused workflow steps in `runTestSinglePython.yml`. --- .github/workflows/runTestSinglePython.yml | 22 ---------------------- .gitignore | 2 +- MANIFEST.in | 2 +- avaframe/version.py | 6 +++--- pyproject.toml | 1 + 5 files changed, 6 insertions(+), 27 deletions(-) diff --git a/.github/workflows/runTestSinglePython.yml b/.github/workflows/runTestSinglePython.yml index 9b9aeff3f..8364cf24f 100644 --- a/.github/workflows/runTestSinglePython.yml +++ b/.github/workflows/runTestSinglePython.yml @@ -29,28 +29,6 @@ jobs: - name: Pixi run pytest run: | pixi run pytest -ra --cov --cov-report=xml --cov-report lcov:cov.info --cov-config=.coveragerc - -# - name: Set up Python -# uses: actions/setup-python@v5 -# with: -# python-version: '3.12' -# check-latest: true -# - name: Install dependencies -# run: | -# python -m pip install --upgrade pip -# pip install flake8 pytest pytest-cov -# pip install numpy cython -# pip install setuptools -# pip install pytest-mock -# - name: Compile cython code -# run: | -# python setup.py build_ext --inplace --define CYTHON_TRACE -# - name: Install avaframe -# run: | -# pip install . -# - name: Test with pytest -# run: | -# pytest -ra --cov --cov-report=xml --cov-report lcov:cov.info --cov-config=.coveragerc - uses: qltysh/qlty-action/coverage@main with: coverage-token: ${{secrets.QLTY_COVERAGE_TOKEN}} diff --git a/.gitignore b/.gitignore index e8bf69210..0982d9c80 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,7 @@ Work build -RELEASE-VERSION +RELEASE-VERSION.txt *.egg* diff --git a/MANIFEST.in b/MANIFEST.in index 81b0acf77..323c5fec4 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ -include avaframe/RELEASE-VERSION +include avaframe/RELEASE-VERSION.txt include avaframe/version.py include avaframe/in3Utils/logging.conf include avaframe/com1DFA/*.pyx diff --git a/avaframe/version.py b/avaframe/version.py index 9d5c18a11..53f7585b0 100644 --- a/avaframe/version.py +++ b/avaframe/version.py @@ -4,7 +4,7 @@ # scheme that setuptools uses. If “git describe” returns an error # (most likely because we're in an unpacked copy of a release tarball, # rather than in a git working copy), then we fall back on reading the -# contents of the RELEASE-VERSION file. +# contents of the RELEASE-VERSION.txt file. # # To use this script, simply import it your setup.py file, and use the # results of getVersion() as your package version: @@ -27,7 +27,7 @@ # sdist tarballs; to do this, just create a MANIFEST.in file that # contains the following line: # -# include RELEASE-VERSION +# include RELEASE-VERSION.txt from subprocess import check_output, run, CalledProcessError, DEVNULL, Popen, PIPE import os @@ -89,7 +89,7 @@ def releaseFile(): ------- path to RELEASE-VERSION file """ - return os.path.join(getProjectPath(), 'RELEASE-VERSION') + return os.path.join(getProjectPath(), 'RELEASE-VERSION.txt') def readReleaseVersion(): diff --git a/pyproject.toml b/pyproject.toml index e1af36302..4c0373624 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,6 +58,7 @@ exclude = ["docs*", "tests*"] [tool.setuptools_scm] version_scheme = "no-guess-dev" local_scheme = "node-and-date" +version_file = "avaframe/RELEASE-VERSION.txt" # Cibuildwhell [tool.cibuildwheel]