Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,28 +222,18 @@ jobs:
retention-days: 7

osx_arm:
defaults:
run:
shell: bash -l {0}
needs: check
runs-on: macos-14
# Run on every code push, but only on review ready PRs
if: ${{ github.event_name == 'push' || github.event.pull_request.draft == false }}
steps:
- uses: actions/checkout@v4
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2.3.0
- uses: actions/setup-python@v5
with:
miniconda-version: "latest"
auto-update-conda: true
python-version: '3.8'
activate-environment: aspire
environment-file: environment-accelerate.yml
auto-activate-base: false
- name: Complete Install and Log Environment ${{ matrix.os }} Python ${{ matrix.python-version }}
python-version: '3.11'
- name: Complete Install and Log Environment
run: |
conda info
conda list
python --version
pip install -e ".[dev]" # install aspire
pip freeze
- name: Test
Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ install `aspire` safely in that environment.

If you are unfamiliar with `conda`, the
[Miniconda](https://docs.conda.io/en/latest/miniconda.html)
distribution for `x86_64` is recommended. For Apple silicon to use
the osx-arm platform, patching and building some dependencies from
source is currently required. The Intel `osx-64` install is still
preferred even for Apple silicon users, otherwise [notes are
provided.](https://github.com/ComputationalCryoEM/ASPIRE-Python/discussions/969)
distribution for `x86_64` is recommended.

Assuming you have `conda` and a compatible system, the following steps
will checkout current code release, create an environment, and install
Expand Down
6 changes: 0 additions & 6 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ to view Conda's installation instructions.
.. note:: If you're not sure which distribution is right for you, go
with `Miniconda <https://conda.io/miniconda.html>`__

.. note:: For Apple silicon to use the osx-arm platform, patching and
building some dependencies from source is currently required. The
Intel ``osx-64`` install is still preferred even for Apple silicon
users, otherwise `notes are
provided. <https://github.com/ComputationalCryoEM/ASPIRE-Python/discussions/969>`_

Getting Started - Installation
************************************

Expand Down
9 changes: 7 additions & 2 deletions tests/test_FLEbasis2D.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import platform
import sys

import numpy as np
Expand Down Expand Up @@ -70,8 +71,12 @@ def relerr(base, approx):

@pytest.mark.parametrize("basis", test_bases, ids=show_fle_params)
class TestFLEBasis2D(UniversalBasisMixin):
# Loosen the tolerance for `cufinufft` to be within 15%
test_eps = 1.15 if backend_available("cufinufft") else 1.0
# Loosen the tolerance for `cufinufft` and `osx_arm`
test_eps = 1.0
if backend_available("cufinufft"):
test_eps = 1.15
elif platform.system() == "Darwin":
test_eps = 1.20

# check closeness guarantees for fast vs dense matrix method
def testFastVDense_T(self, basis):
Expand Down
8 changes: 6 additions & 2 deletions tests/test_indexed_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@ def test_remapping(sim_fixture):
sim, sim2 = sim_fixture

# Check images are served correctly, using internal index.
assert np.allclose(sim.images[sim2.index_map].asnumpy(), sim2.images[:].asnumpy())
np.testing.assert_allclose(
sim.images[sim2.index_map].asnumpy(), sim2.images[:].asnumpy(), atol=1e-6
)

# Check images are served correctly, using known index (evens).
index = list(range(0, sim.n, 2))
assert np.allclose(sim.images[index].asnumpy(), sim2.images[:].asnumpy())
np.testing.assert_allclose(
sim.images[index].asnumpy(), sim2.images[:].asnumpy(), atol=1e-6
)

# Check meta is served correctly.
assert np.all(sim.get_metadata(indices=sim2.index_map) == sim2.get_metadata())
Expand Down
2 changes: 1 addition & 1 deletion tests/test_preprocess_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def testInvertContrast(L, dtype):

# all images should be the same after inverting contrast
np.testing.assert_allclose(
imgs1_rc.asnumpy(), imgs2_rc.asnumpy(), rtol=1e-05, atol=1e-08
imgs1_rc.asnumpy(), imgs2_rc.asnumpy(), rtol=1e-05, atol=1e-06
)
# dtype of returned images should be the same
assert dtype == imgs1_rc.dtype
Expand Down
Loading