Skip to content

Commit

Permalink
Merge pull request #905 from ComputationalCryoEM/develop
Browse files Browse the repository at this point in the history
`develop` ~~> `master` v0.11.0
  • Loading branch information
garrettwrong authored Apr 27, 2023
2 parents 1554bbb + e49758e commit 4d8a136
Show file tree
Hide file tree
Showing 152 changed files with 10,406 additions and 3,802 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.10.1
current_version = 0.11.0
commit = True
tag = True

Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/daily_workflow.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/long_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: ASPIRE Python Long Running Test Suite

on:
push:
branches:
- 'master'
- 'develop'

jobs:
expensive_tests:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Customize config
run: |
echo "Setup tmp dirs and chmod so others can cleanup."
CI_TMP_DIR=/var/ci/tmp
mkdir -p ${CI_TMP_DIR}
chmod g+rwx ${CI_TMP_DIR}
echo "Create and assign a unique temp dir to hold our config."
WORK_DIR=$(mktemp -d -p "${CI_TMP_DIR}")
echo "WORK_DIR=${WORK_DIR}"
echo "Stash the WORK_DIR to GitHub env so we can clean it up later."
echo "WORK_DIR=${WORK_DIR}" >> $GITHUB_ENV
echo -e "ray:\n temp_dir: ${WORK_DIR}\n" > ${WORK_DIR}/config.yaml
echo -e "nufft:\n backends: [finufft, pynfft]\n" >> ${WORK_DIR}/config.yaml
echo "Log the config: ${WORK_DIR}/config.yaml"
cat ${WORK_DIR}/config.yaml
- name: Run
run: |
ASPIREDIR=${{ env.WORK_DIR }} python -c \
"import aspire; print(aspire.config['ray']['temp_dir'])"
ASPIREDIR=${{ env.WORK_DIR }} pytest -m "expensive" --durations=0
- name: Cleanup
run: rm -rf ${{ env.WORK_DIR }}
99 changes: 86 additions & 13 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: ASPIRE Python Pip CI

on:
- push
- pull_request
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:


jobs:
check:
Expand All @@ -15,26 +17,27 @@ jobs:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Run Tox Check
run: tox -e check

build:
needs: check
runs-on: ubuntu-latest
# Run on every code push, but only on review ready PRs
if: ${{ github.event_name == 'push' || github.event.pull_request.draft == false }}
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
pyenv: [stable, dev]
pyenv: [pip]
exclude:
# Exclude 3.7-stable so we can add pre and post tasks to that environment.
# Exclude 3.7-pip so we can add pre/post tasks to that environment.
- python-version: '3.7'
pyenv: stable
pyenv: pip
include:
# Re-include 3.7-stable with additional tox tasks.
# Re-include 3.7 with additional tox tasks.
- python-version: '3.7'
pyenv: stable,docs
pyenv: pip,docs


steps:
Expand All @@ -45,26 +48,68 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox --skip-missing-interpreters false -e py${{ matrix.python-version }}-${{ matrix.pyenv }}
- name: Upload Coverage to CodeCov
uses: codecov/codecov-action@v3

conda-build:
needs: check
runs-on: ${{ matrix.os }}
# Only run on review ready pull_requests
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }}
defaults:
run:
shell: bash -el {0}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-20.04, macOS-latest, macOS-11]
backend: [default, openblas]
python-version: ['3.8']
include:
- os: ubuntu-latest
backend: intel
- os: macOS-latest
backend: accelerate
- os: windows-2019
backend: default

docs:
steps:
- uses: actions/checkout@v3
- name: Set up Conda ${{ matrix.os }} Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: aspire
environment-file: environment-${{ matrix.backend }}.yml
auto-activate-base: false
- name: Complete Install and Log Environment ${{ matrix.os }} Python ${{ matrix.python-version }}
run: |
conda info
conda list
pip install -e ".[dev]"
pip freeze
python -c "import numpy; numpy.show_config()"
- name: Execute Pytest Conda ${{ matrix.os }} Python ${{ matrix.python-version }}
run: |
export OMP_NUM_THREADS=2
# -n runs test in parallel using pytest-xdist
pytest -n2 --durations=50 -s
# Build and Deploy production (master) docs.
docs_deploy:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.7'
python-version: '3.8'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run Sphinx doc build script
env:
Expand All @@ -77,11 +122,12 @@ jobs:
ampere_gpu:
needs: check
runs-on: self-hosted
# 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@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev,gpu_11x]"
- name: Customize config
run: |
Expand All @@ -104,3 +150,30 @@ jobs:
ASPIREDIR=${{ env.WORK_DIR }} pytest --durations=50
- name: Cleanup
run: rm -rf ${{ env.WORK_DIR }}

# Build branch's docs and gallery.
docs:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Build Sphinx docs
run: |
make distclean
sphinx-apidoc -f -o ./source ../src -H Modules
make html
working-directory: ./docs
- name: Archive Sphinx docs
uses: actions/upload-artifact@v3
with:
name: sphinx-docs
path: docs/build
retention-days: 7
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![codecov](https://codecov.io/gh/ComputationalCryoEM/ASPIRE-Python/branch/master/graph/badge.svg?token=3XFC4VONX0)](https://codecov.io/gh/ComputationalCryoEM/ASPIRE-Python)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5657281.svg)](https://doi.org/10.5281/zenodo.5657281)

# ASPIRE - Algorithms for Single Particle Reconstruction - v0.10.1
# ASPIRE - Algorithms for Single Particle Reconstruction - v0.11.0

This is the Python version to supersede the [Matlab ASPIRE](https://github.com/PrincetonUniversity/aspire).

Expand All @@ -20,7 +20,7 @@ For more information about the project, algorithms, and related publications ple
Please cite using the following DOI. This DOI represents all versions, and will always resolve to the latest one.

```
ComputationalCryoEM/ASPIRE-Python: v0.10.1 https://doi.org/10.5281/zenodo.5657281
ComputationalCryoEM/ASPIRE-Python: v0.11.0 https://doi.org/10.5281/zenodo.5657281
```

Expand Down Expand Up @@ -50,7 +50,7 @@ After cloning this repo, the simplest option is to use Anaconda 64-bit for your
cd /path/to/git/clone/folder
# Creates the conda environment and installs base dependencies.
conda env create -f environment.yml --name aspire_dev
conda env create -f environment-default.yml --name aspire_dev
# Enable the environment
conda activate aspire_dev
Expand Down
Loading

0 comments on commit 4d8a136

Please sign in to comment.