From 32539dd53508484bbf4450f467832ca4d4901b33 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 11 Oct 2024 08:28:19 -0500 Subject: [PATCH 1/3] Bump version to 1.3.11 --- conda-recipe-cf/meta.yaml | 2 +- conda-recipe/meta.yaml | 2 +- mkl_fft/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conda-recipe-cf/meta.yaml b/conda-recipe-cf/meta.yaml index cede0a43..ecd1290e 100644 --- a/conda-recipe-cf/meta.yaml +++ b/conda-recipe-cf/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "1.3.10" %} +{% set version = "1.3.11" %} {% set buildnumber = 0 %} package: diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index e68c505d..701c61c2 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "1.3.10" %} +{% set version = "1.3.11" %} {% set buildnumber = 0 %} package: diff --git a/mkl_fft/_version.py b/mkl_fft/_version.py index f1a3fb0e..6c6a2bea 100644 --- a/mkl_fft/_version.py +++ b/mkl_fft/_version.py @@ -1 +1 @@ -__version__ = '1.3.10' +__version__ = '1.3.11' From a90d6a82dfc6bb5dac323239bab85429f64e0d76 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 11 Oct 2024 08:28:29 -0500 Subject: [PATCH 2/3] Add entry for 1.3.11 --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index a50865a5..787d3b60 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ mkl_fft changelog ================= +1.3.11 +====== + +Bugfix release, resolving gh-109 and updating installation instructions + + 1.3.10 ====== From ba9478d9924b4ba2df925fca82240592a51f7e7e Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 11 Oct 2024 08:50:18 -0500 Subject: [PATCH 3/3] Fix for windows step of workflow --- .github/workflows/conda-package-cf.yml | 54 ++++++++++++++++++------- .github/workflows/conda-package.yml | 56 ++++++++++++++++++-------- 2 files changed, 79 insertions(+), 31 deletions(-) diff --git a/.github/workflows/conda-package-cf.yml b/.github/workflows/conda-package-cf.yml index 32384eb6..81396629 100644 --- a/.github/workflows/conda-package-cf.yml +++ b/.github/workflows/conda-package-cf.yml @@ -126,18 +126,23 @@ jobs: strategy: matrix: python: ['3.9', '3.10', '3.11', '3.12'] - env: - conda-bld: C:\Miniconda\conda-bld\win-64\ steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: conda-incubator/setup-miniconda@v3 with: + miniforge-version: latest auto-activate-base: true - conda-build-version: "*" - activate-environment: true + activate-environment: build python-version: ${{ matrix.python }} + channels: conda-forge,nodefaults + + - name: Remove defaults channel + run: conda config --remove channels defaults + + - name: Install conda-build + run: conda install -n base conda-build - name: Cache conda packages uses: actions/cache@v4 @@ -150,13 +155,22 @@ jobs: restore-keys: | ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}- ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}- + - name: Build conda package with NumPy 2.0 - run: conda build --no-test --python ${{ matrix.python }} --numpy 2 -c conda-forge --override-channels conda-recipe-cf + run: | + conda activate + conda build --no-test --python ${{ matrix.python }} --numpy 2 -c conda-forge --override-channels conda-recipe-cf + + - name: Store conda paths as envs + shell: bash -l {0} + run: | + echo "CONDA_BLD=$CONDA/conda-bld/win-64/" | tr "\\\\" '/' >> $GITHUB_ENV + - name: Upload artifact uses: actions/upload-artifact@v4 with: name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} - path: ${{ env.conda-bld }}${{ env.PACKAGE_NAME }}-*.tar.bz2 + path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.tar.bz2 test_windows: needs: build_windows @@ -180,20 +194,30 @@ jobs: uses: actions/download-artifact@v4 with: name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python_ver }} + - uses: conda-incubator/setup-miniconda@v3 with: - auto-update-conda: true - conda-build-version: '*' - miniconda-version: 'latest' - activate-environment: mkl_fft_test - python-version: ${{ matrix.python_ver }} + miniforge-version: latest + activate-environment: ${{ env.TEST_ENV_NAME }} + python-version: ${{ matrix.python }} + channels: conda-forge + + - name: Remove defaults channel + run: conda config --remove channels defaults + - name: Create conda channel with the artifact bit shell: cmd /C CALL {0} run: | echo ${{ env.workdir }} + mkdir ${{ env.workdir }}\channel\ mkdir ${{ env.workdir }}\channel\win-64 move ${{ env.PACKAGE_NAME }}-*.tar.bz2 ${{ env.workdir }}\channel\win-64 dir ${{ env.workdir }}\channel\win-64 + + - name: Install conda index + shell: cmd /C CALL {0} + run: conda install -n base conda-index + - name: Index the channel shell: cmd /C CALL {0} run: conda index ${{ env.workdir }}\channel @@ -215,7 +239,7 @@ jobs: FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO ( SET PACKAGE_VERSION=%%F ) - conda install -n mkl_fft_test ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python_ver }} ${{ matrix.numpy }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile + conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python_ver }} ${{ matrix.numpy }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile - name: Display lockfile content shell: pwsh run: Get-Content -Path .\lockfile @@ -242,15 +266,15 @@ jobs: SET PACKAGE_VERSION=%%F ) SET "TEST_DEPENDENCIES=pytest pytest-cov" - conda install -n mkl_fft_test ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python=${{ matrix.python }} ${{ matrix.numpy }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} + conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python=${{ matrix.python }} ${{ matrix.numpy }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} - name: Report content of test environment shell: cmd /C CALL {0} run: | echo "Value of CONDA enviroment variable was: " %CONDA% echo "Value of CONDA_PREFIX enviroment variable was: " %CONDA_PREFIX% - conda info && conda list -n mkl_fft_test + conda info && conda list -n ${{ env.TEST_ENV_NAME }} - name: Run tests shell: cmd /C CALL {0} run: >- - conda activate mkl_fft_test && python -m pytest -v -s --pyargs ${{ env.MODULE_NAME }} + conda activate ${{ env.TEST_ENV_NAME }} && python -m pytest -v -s --pyargs ${{ env.MODULE_NAME }} diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index e0d15aaa..7e639589 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -125,18 +125,24 @@ jobs: strategy: matrix: python: ['3.9', '3.10'] - env: - conda-bld: C:\Miniconda\conda-bld\win-64\ steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4.2.0 with: fetch-depth: 0 - uses: conda-incubator/setup-miniconda@v3 with: - auto-activate-base: true - conda-build-version: "*" - activate-environment: true + miniforge-version: latest + activate-environment: build python-version: ${{ matrix.python }} + channels: conda-forge + + - name: Remove defaults channel + run: conda config --remove channels defaults + + - name: Install conda-build + run: | + conda activate + conda install -n base conda-build - name: Cache conda packages uses: actions/cache@v4 @@ -149,13 +155,22 @@ jobs: restore-keys: | ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}- ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}- + - name: Build conda package - run: conda build --no-test --python ${{ matrix.python }} -c https://software.repos.intel.com/python/conda -c conda-forge --override-channels conda-recipe + run: | + conda activate + conda build --no-test --python ${{ matrix.python }} -c https://software.repos.intel.com/python/conda -c conda-forge --override-channels conda-recipe + + - name: Store conda paths as envs + shell: bash -l {0} + run: | + echo "CONDA_BLD=$CONDA/conda-bld/win-64/" | tr "\\\\" '/' >> $GITHUB_ENV + - name: Upload artifact uses: actions/upload-artifact@v4 with: name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} - path: ${{ env.conda-bld }}${{ env.PACKAGE_NAME }}-*.tar.bz2 + path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.tar.bz2 test_windows: needs: build_windows @@ -180,18 +195,27 @@ jobs: name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} - uses: conda-incubator/setup-miniconda@v3 with: - auto-update-conda: true - conda-build-version: '*' - miniconda-version: 'latest' - activate-environment: mkl_fft_test + miniforge-version: latest + activate-environment: ${{ env.TEST_ENV_NAME }} python-version: ${{ matrix.python }} + channels: conda-forge + + - name: Remove defaults channel + run: conda config --remove channels defaults + - name: Create conda channel with the artifact bit shell: cmd /C CALL {0} run: | echo ${{ env.workdir }} + mkdir ${{ env.workdir }}\channel\ mkdir ${{ env.workdir }}\channel\win-64 move ${{ env.PACKAGE_NAME }}-*.tar.bz2 ${{ env.workdir }}\channel\win-64 dir ${{ env.workdir }}\channel\win-64 + + - name: Install conda index + shell: cmd /C CALL {0} + run: conda install -n base conda-index + - name: Index the channel shell: cmd /C CALL {0} run: conda index ${{ env.workdir }}\channel @@ -213,7 +237,7 @@ jobs: FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO ( SET PACKAGE_VERSION=%%F ) - conda install -n mkl_fft_test ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile + conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile - name: Display lockfile content shell: pwsh run: Get-Content -Path .\lockfile @@ -240,15 +264,15 @@ jobs: SET PACKAGE_VERSION=%%F ) SET "TEST_DEPENDENCIES=pytest pytest-cov" - conda install -n mkl_fft_test ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} + conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} - name: Report content of test environment shell: cmd /C CALL {0} run: | echo "Value of CONDA enviroment variable was: " %CONDA% echo "Value of CONDA_PREFIX enviroment variable was: " %CONDA_PREFIX% - conda info && conda list -n mkl_fft_test + conda info && conda list -n ${{ env.TEST_ENV_NAME }} - name: Run tests shell: cmd /C CALL {0} run: >- - conda activate mkl_fft_test && python -m pytest -v -s --pyargs ${{ env.MODULE_NAME }} + conda activate ${{ env.TEST_ENV_NAME }} && python -m pytest -v -s --pyargs ${{ env.MODULE_NAME }}