diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0012f58c..67037870 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,12 +17,12 @@ env: COVERAGE_PYTHON: "3.11" jobs: - test: + test: # standard support: failures block merges runs-on: ubuntu-latest strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.10", "3.11"] steps: - uses: actions/checkout@v6 @@ -65,3 +65,37 @@ jobs: pytest.yml pr_number.txt retention-days: 3 + + test-legacy: # legacy support: failures are visible but do not block merges + runs-on: ubuntu-latest + continue-on-error: true + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9"] + + steps: + - uses: actions/checkout@v6 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + cache: "pip" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install pytest pytest-cov "pytest-github-actions-annotate-failures!=0.3.0" + pip install .[dev] + # NOTE: pytest-github-actions-annotate-failures v0.3.0 causes INTERNALERROR in Python 3.8 and 3.9. + # c.f. https://github.com/pytest-dev/pytest-github-actions-annotate-failures/issues/106 + + # https://stackoverflow.com/questions/985876/tee-and-exit-status + - name: Test with pytest + run: | + ( + set -o pipefail + pytest --junitxml=pytest.yml \ + --cov-report=term-missing:skip-covered --cov=bdpy tests | tee pytest-coverage.txt + ) diff --git a/.github/workflows/test_old.yml b/.github/workflows/test_old.yml deleted file mode 100644 index be0a5c95..00000000 --- a/.github/workflows/test_old.yml +++ /dev/null @@ -1,68 +0,0 @@ -name: test_old - -on: - push: - branches: [ "maintenance/legacy" ] - -jobs: - test_py36: - runs-on: ubuntu-22.04 - - # NOTE: Python 3.6 is not supported in Ubuntu 22.04, so we use a container with Python 3.6 installed. - container: - image: python:3.6-buster - steps: - - uses: actions/checkout@v6 - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install pytest pytest-cov pytest-github-actions-annotate-failures - pip install Cython==0.29.36 numpy - pip install .[dev] - - - name: Test with pytest - shell: bash - run: | - ( - set -o pipefail - pytest \ - --ignore=tests/dl/torch \ - --ignore=tests/recon/torch \ - --ignore=tests/task \ - --junitxml=pytest.yml \ - --cov-report=term-missing:skip-covered --cov=bdpy tests | tee pytest-coverage.txt - ) - - - test_py37: - runs-on: ubuntu-22.04 - strategy: - fail-fast: false - matrix: - python-version: ["3.7"] - - steps: - - uses: actions/checkout@v6 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 - with: - python-version: ${{ matrix.python-version }} - cache: "pip" - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install pytest pytest-cov pytest-github-actions-annotate-failures - pip install Cython==0.29.36 numpy - pip install .[dev] - - - name: Test with pytest - run: | - ( - set -o pipefail - pytest \ - --junitxml=pytest.yml \ - --cov-report=term-missing:skip-covered --cov=bdpy tests | tee pytest-coverage.txt - ) diff --git a/README.md b/README.md index e56a7835..0ccdfaaa 100644 --- a/README.md +++ b/README.md @@ -58,16 +58,6 @@ To install the latest development version ("master" branch of the repository), p $ pip install git+https://github.com/KamitaniLab/bdpy.git ``` -## Installation (Python 3.6~3.8) -For Python 3.6, use the following commands: - -```shell -$ pip install "Cython==0.29.36" "numpy" -$ pip install bdpy -``` - - - ## Packages - bdata: BdPy data format (BData) core package diff --git a/pyproject.toml b/pyproject.toml index a3cd00d6..8f153111 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,23 +10,20 @@ authors = [ { name = "Shuntaro C. Aoki", email = "s_aoki@i.kyoto-u.ac.jp" } ] readme = "README.md" -requires-python = ">= 3.6, < 3.12" +requires-python = ">= 3.8, < 3.12" license = { file = "LICENSE" } keywords = ["neuroscience", "neuroimaging", "brain decoding", "fmri", "machine learning"] dependencies = [ - "numpy>=1.19; python_version < '3.7'", - "numpy>=1.20; python_version >= '3.7'", + "numpy>=1.20", "scipy", "scikit-learn", - "h5py>=3.0; python_version >= '3.7'", - "h5py<3.0; python_version < '3.7'", + "h5py>=3.0", "hdf5storage", "pyyaml", "pandas", "tqdm", - "typing-extensions>=4.1.0; python_version < '3.8'", - "typing-extensions>=4.5.0; python_version >= '3.8'" + "typing-extensions>=4.5.0" ] [project.optional-dependencies] @@ -45,8 +42,7 @@ fig = [ mri = [ "numpy<1.24", "nibabel==3.2", - "nipy>=0.6.0; python_version >= '3.8'", - "nipy<0.6.0; python_version < '3.8'" + "nipy>=0.6.0" ] pipeline = [ "hydra-core", @@ -79,9 +75,9 @@ dev = [ "mypy" ] docs = [ - "mkdocs>=1.6; python_version >= '3.8'", - "mkdocs-material>=9.5; python_version >= '3.8'", - "mkdocstrings[python]>=0.25; python_version >= '3.8'", + "mkdocs>=1.6", + "mkdocs-material>=9.5", + "mkdocstrings[python]>=0.25", ] [tool.uv]