diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3e5172b..8a5eda3 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -61,7 +61,7 @@ jobs: push_docs: needs: build_docs runs-on: ubuntu-latest - if: ${{ github.event_name != 'pull_request' && github.repository == 'hyperspy/hyperspy-bundle' }} + if: ${{ startsWith(github.ref, 'refs/tags/') && github.repository == 'hyperspy/hyperspy-bundle' }} permissions: # needs write permission to push the docs to gh-pages contents: write diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d3bef43..77ad267 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,8 @@ permissions: env: MPLBACKEND: 'agg' - TEST_DEPS: pytest pytest-qt pytest-xdist pytest-rerunfailures + # pin pytest to 7.4.4 to get the test suite of pyxem to work + TEST_DEPS: pytest==7.4.4 pytest-qt pytest-xdist pytest-rerunfailures pytest-mpl jobs: create_release_job: @@ -67,44 +68,50 @@ jobs: build: name: ${{ matrix.TARGET_PLATFORM }}-${{ matrix.BLAS_IMPL }} needs: create_release_job - runs-on: ${{ matrix.os }}-latest + runs-on: ${{ matrix.os }}-${{ matrix.os_version }} strategy: fail-fast: false matrix: include: - os: ubuntu + os_version: latest INSTALLER_EXTENSION: sh BLAS_IMPL: mkl ARCH: x86_64 TARGET_PLATFORM: linux-64 - os: ubuntu + os_version: latest INSTALLER_EXTENSION: sh BLAS_IMPL: openblas ARCH: x86_64 TARGET_PLATFORM: linux-64 - os: windows + os_version: latest INSTALLER_EXTENSION: exe BLAS_IMPL: mkl ARCH: x86_64 TARGET_PLATFORM: win-64 - os: windows + os_version: latest INSTALLER_EXTENSION: exe BLAS_IMPL: openblas ARCH: x86_64 TARGET_PLATFORM: win-64 - os: macos + os_version: latest INSTALLER_EXTENSION: pkg BLAS_IMPL: mkl ARCH: x86_64 TARGET_PLATFORM: osx-64 - os: macos + os_version: 14 INSTALLER_EXTENSION: pkg - BLAS_IMPL: openblas + BLAS_IMPL: accelerate ARCH: arm64 TARGET_PLATFORM: osx-arm64 env: DISPLAY: ':0' - MICROMAMBA_VERSION: '1.5.1' + MICROMAMBA_VERSION: '1.5.6' steps: - uses: actions/checkout@v4 @@ -186,7 +193,7 @@ jobs: bash ${{ env.asset_name }} -b -p ${{ env.install_dir }} - name: Install new distribution (MacOS) - if: runner.os == 'macos' && matrix.ARCH == 'x86_64' + if: runner.os == 'macos' run: | echo "install_dir=/Users/runner" >> $GITHUB_ENV installer -pkg ${{ env.asset_name }} -target CurrentUserHomeDirectory @@ -213,7 +220,6 @@ jobs: name: ${{ env.asset_name }} - shell: bash -l {0} - if: matrix.ARCH == 'x86_64' name: Info new distribution run: | conda activate "${{ env.install_dir }}" @@ -223,7 +229,6 @@ jobs: conda list - shell: bash -l {0} - if: matrix.ARCH == 'x86_64' name: Check latest available hyperspy version run: | conda activate "${{ env.install_dir }}" @@ -241,48 +246,85 @@ jobs: - shell: bash -l {0} name: Install test dependencies - if: matrix.ARCH == 'x86_64' && always() + if: always() run: | conda activate "${{ env.install_dir }}" mamba install ${{ env.TEST_DEPS }} - shell: bash -l {0} # TODO: revisit at some point, to get it to work on linux (hyperspyui CI works fine...) - if: runner.os != 'linux' && matrix.ARCH == 'x86_64' && always() + if: runner.os != 'linux' && always() name: Test new distribution (HyperSpyUI) run: | conda activate "${{ env.install_dir }}" pytest --pyargs hyperspyui + - shell: bash -l {0} + name: Test RosettaSciIO + if: always() + run: | + conda activate "${{ env.install_dir }}" + pytest --pyargs rsciio --reruns 3 + - shell: bash -l {0} name: Test hyperspy - if: matrix.ARCH == 'x86_64' && always() + if: always() run: | conda activate "${{ env.install_dir }}" pytest --pyargs hyperspy --reruns 3 -n 2 - shell: bash -l {0} - name: Run test lumispy - if: matrix.ARCH == 'x86_64' && always() + name: Test hyperspy_gui_ipywidgets + if: always() run: | conda activate "${{ env.install_dir }}" - pytest --pyargs lumispy + pytest --pyargs hyperspy_gui_ipywidgets - shell: bash -l {0} - name: Run test pyxem - if: matrix.ARCH == 'x86_64' && always() + name: Test hyperspy_gui_traitsui + if: runner.os != 'linux' && always() run: | conda activate "${{ env.install_dir }}" - pytest --pyargs pyxem + pytest --pyargs hyperspy_gui_traitsui -k "not test_image_contrast_tool" - shell: bash -l {0} - name: Run test kikuchipy - if: matrix.ARCH == 'x86_64' && always() - env: - MPLBACKEND: 'agg' + name: Run test exspy + if: always() + run: | + conda activate "${{ env.install_dir }}" + pytest --pyargs exspy + + - shell: bash -l {0} + name: Run test holospy + if: always() + run: | + conda activate "${{ env.install_dir }}" + pytest --pyargs holospy + + - shell: bash -l {0} + name: Run test lumispy + if: always() + run: | + conda activate "${{ env.install_dir }}" + pytest --pyargs lumispy + + - shell: bash -l {0} + name: Run test pyxem + if: always() run: | conda activate "${{ env.install_dir }}" - pytest --pyargs kikuchipy + # cause of the TestAddEllipseArrayAsMarkers failure is unknown (seems to be on blas mkl only) + # test_offest_and_scale failure fixed in https://github.com/pyxem/pyxem/pull/1016 + pytest --pyargs pyxem -k "not TestAddEllipseArrayAsMarkers and not test_offest_and_scale" + + # - shell: bash -l {0} + # name: Run test kikuchipy + # if: always() + # env: + # MPLBACKEND: 'agg' + # run: | + # conda activate "${{ env.install_dir }}" + # pytest --pyargs kikuchipy - name: Upload Release Asset if: startsWith(github.ref, 'refs/tags/') @@ -303,7 +345,8 @@ jobs: WP_SHA256: 0b2037660064589dd73a58ac17f44d9e657cfc5fcea92cec9223185243a0a3bc WP_EXE: winpython.exe WP_DIR_NAME: WPy64-31150 - LIB_TO_INSTALL: abtem ase atomap graphviz hdf5plugin hyperspy[all] hyperspyui kikuchipy lumispy matplotlib-scalebar nglview particlespy py4dstem pymatgen pystackreg python-rapidjson pyxem scanning_drift_corr start_jupyter_cm + #LIB_TO_INSTALL: abtem ase atomap exspy graphviz holospy hdf5plugin hyperspy[all] hyperspyui kikuchipy lumispy matplotlib-scalebar nglview particlespy py4dstem pymatgen pystackreg python-rapidjson pyxem scanning_drift_corr start_jupyter_cm + LIB_TO_INSTALL: abtem ase exspy graphviz holospy hdf5plugin hyperspy[all] hyperspyui lumispy matplotlib-scalebar nglview particlespy py4dstem pymatgen pystackreg python-rapidjson pyxem scanning_drift_corr start_jupyter_cm steps: - uses: actions/checkout@v4 @@ -401,32 +444,66 @@ jobs: shell: cmd run: | call "${{ env.WP_DIR_NAME }}\scripts\env.bat" - # Remove for 1.7.6 release - del WPy64-31150\python-3.11.5.amd64\Lib\site-packages\hyperspy\tests\signals\test_find_peaks2D.py - pytest --pyargs hyperspy --reruns 3 -n 2 + pytest --pyargs hyperspy --reruns 3 -n 4 - - name: Run test lumispy + - name: Run test RosettaSciIO if: always() shell: cmd run: | call "${{ env.WP_DIR_NAME }}\scripts\env.bat" - # Skip these tests until there are fixed - pytest --pyargs lumispy + pytest --pyargs rsciio --reruns 3 - - name: Run test pyxem + - name: Run test hyperspy_gui_ipywidgets if: always() shell: cmd run: | call "${{ env.WP_DIR_NAME }}\scripts\env.bat" - pytest --pyargs pyxem + # test_spikes_removal_tool fails randomly, fixed in https://github.com/hyperspy/hyperspy_gui_ipywidgets/pull/51 + pytest --pyargs hyperspy_gui_ipywidgets -k "not test_image_contrast_tool and not test_spikes_removal_tool" - - name: Run test kikuchipy + - name: Run test hyperspy_gui_traitsui + if: always() + shell: cmd + run: | + call "${{ env.WP_DIR_NAME }}\scripts\env.bat" + pytest --pyargs hyperspy_gui_traitsui -k "not test_image_contrast_tool" + + - name: Run test exspy + if: always() + shell: cmd + run: | + call "${{ env.WP_DIR_NAME }}\scripts\env.bat" + pytest --pyargs exspy + + - name: Run test holospy + if: always() + shell: cmd + run: | + call "${{ env.WP_DIR_NAME }}\scripts\env.bat" + pytest --pyargs holospy + + - name: Run test lumispy + if: always() + shell: cmd + run: | + call "${{ env.WP_DIR_NAME }}\scripts\env.bat" + pytest --pyargs lumispy + + - name: Run test pyxem if: always() shell: cmd run: | call "${{ env.WP_DIR_NAME }}\scripts\env.bat" - # Skip these tests until there are fixed - pytest --pyargs kikuchipy -k "not test_load_with_padding" + # cause of the TestAddEllipseArrayAsMarkers failure is unknown (seems to be on blas mkl only) + pytest --pyargs pyxem -k "not TestAddEllipseArrayAsMarkers" + + # - name: Run test kikuchipy + # if: always() + # shell: cmd + # run: | + # call "${{ env.WP_DIR_NAME }}\scripts\env.bat" + # # Skip these tests until there are fixed + # pytest --pyargs kikuchipy -k "not test_load_with_padding" - name: Upload Release Asset if: startsWith(github.ref, 'refs/tags/') diff --git a/RELEASE_TEXT.md b/RELEASE_TEXT.md index 1caf745..42ba9c7 100644 --- a/RELEASE_TEXT.md +++ b/RELEASE_TEXT.md @@ -1,20 +1,20 @@ -The HyperSpy bundle is based on the [Anaconda](https://docs.anaconda.com/anaconda/) distribution and uses the `conda` or `mamba` package manager. +The HyperSpy bundle is similar to the [Miniforge](https://github.com/conda-forge/miniforge)/[Anaconda](https://docs.anaconda.com/anaconda/) distribution and uses the `conda` or `mamba` package manager. **[Installation instructions](https://hyperspy.org/hyperspy-bundle/install.html)** ## Recommended: Anaconda-type distribution (Linux, MacOS and Windows) For Windows and Linux, there is the choice between two variants, which are optimised for Intel or AMD CPUs: -- `Intel`: with the MKL libraries, -- `AMD`: with the openblas libraries. +- `Intel`: with the MKL library, +- `AMD`: with the openblas library. For Mac, there are also two variants available: -- `Intel` for Mac computers with Intel CPU -- `Silicon` for Mac computers with Apple Silicon (M1, M2, etc.) CPU +- `Intel` for Mac computers with Intel CPU, with MKL library +- `Silicon` for Mac computers with Apple Silicon (M1, M2, etc.) CPU, with the Accelerate library For included packages, [see documentation](https://hyperspy.org/hyperspy-bundle/index.html#included-software-and-libraries). -This distribution is built using [constructor 3.4.3](https://github.com/conda/constructor). +This distribution is built using [constructor 3.6.0](https://github.com/conda/constructor). ## Portable (Windows only) The portable distribution is based on the [WinPython](https://winpython.github.io) distribution and is a self-extracting archive. Running the installer will install the distribution in the current directory. Since the distribution is portable, it can be moved to any directory or run from an external drive. diff --git a/conda_distribution/construct.yaml b/conda_distribution/construct.yaml index e139d6c..400003b 100644 --- a/conda_distribution/construct.yaml +++ b/conda_distribution/construct.yaml @@ -17,19 +17,21 @@ channels: specs: - abtem - ase - - atomap - - conda >=23.9 + #- atomap + - conda >=23.11 - dask >=2023.6.0 - dask-labextension + - exspy - hdf5plugin - - hyperspy >=1.7.6 - - hyperspyui >=1.3.1 + - holospy + - hyperspy >=2.0 + - hyperspyui >=2.0 - ipympl - jupyterlab - - kikuchipy >=0.9 + #- kikuchipy >=0.9 - libblas=*=*{{ blas_impl }} - lumispy >=0.2.2 - - mamba >=1.5.2 + - mamba >=1.5.6 - mamba_gator - matplotlib-scalebar - miniforge_console_shortcut # [win] @@ -41,14 +43,14 @@ specs: - ovito # [win] # - ovito =3.7 # [not win] - particlespy - - pillow <10.1 + - pillow - py4dstem - pymatgen - pystackreg - python 3.11* - python-graphviz - python-rapidjson - - pyxem >=0.16 + - pyxem >=0.17 - openpyxl - qtconsole >=5.4.3 - scanning_drift_corr diff --git a/docs/conf.py b/docs/conf.py index 37499bb..63c4730 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -113,5 +113,9 @@ "**": ["search-field.html", "sidebar-nav-bs.html", "sidebar-ethical-ads.html"] } +linkcheck_ignore = [ + "https://github.com/conda-forge/miniforge#Install", # Anchor on github.com not supported +] + def setup(app): app.add_css_file("custom-styles.css") diff --git a/docs/install.rst b/docs/install.rst index 6a5b761..64fc1a3 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -113,7 +113,7 @@ Linux The process is exactly the same as `installing Anaconda `_ -or `Miniforge `_: +or `Miniforge `_: 1. In your terminal window, run: