Skip to content

Commit 4d8a136

Browse files
authored
Merge pull request #905 from ComputationalCryoEM/develop
`develop` ~~> `master` v0.11.0
2 parents 1554bbb + e49758e commit 4d8a136

File tree

152 files changed

+10406
-3802
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+10406
-3802
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.10.1
2+
current_version = 0.11.0
33
commit = True
44
tag = True
55

.github/workflows/daily_workflow.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: ASPIRE Python Long Running Test Suite
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
- 'develop'
8+
9+
jobs:
10+
expensive_tests:
11+
runs-on: self-hosted
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Install dependencies
15+
run: |
16+
python -m pip install --upgrade pip
17+
pip install -e ".[dev]"
18+
- name: Customize config
19+
run: |
20+
echo "Setup tmp dirs and chmod so others can cleanup."
21+
CI_TMP_DIR=/var/ci/tmp
22+
mkdir -p ${CI_TMP_DIR}
23+
chmod g+rwx ${CI_TMP_DIR}
24+
echo "Create and assign a unique temp dir to hold our config."
25+
WORK_DIR=$(mktemp -d -p "${CI_TMP_DIR}")
26+
echo "WORK_DIR=${WORK_DIR}"
27+
echo "Stash the WORK_DIR to GitHub env so we can clean it up later."
28+
echo "WORK_DIR=${WORK_DIR}" >> $GITHUB_ENV
29+
echo -e "ray:\n temp_dir: ${WORK_DIR}\n" > ${WORK_DIR}/config.yaml
30+
echo -e "nufft:\n backends: [finufft, pynfft]\n" >> ${WORK_DIR}/config.yaml
31+
echo "Log the config: ${WORK_DIR}/config.yaml"
32+
cat ${WORK_DIR}/config.yaml
33+
- name: Run
34+
run: |
35+
ASPIREDIR=${{ env.WORK_DIR }} python -c \
36+
"import aspire; print(aspire.config['ray']['temp_dir'])"
37+
ASPIREDIR=${{ env.WORK_DIR }} pytest -m "expensive" --durations=0
38+
- name: Cleanup
39+
run: rm -rf ${{ env.WORK_DIR }}

.github/workflows/workflow.yml

Lines changed: 86 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name: ASPIRE Python Pip CI
22

33
on:
4-
- push
5-
- pull_request
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
push:
7+
68

79
jobs:
810
check:
@@ -15,26 +17,27 @@ jobs:
1517
python-version: '3.7'
1618
- name: Install dependencies
1719
run: |
18-
python -m pip install --upgrade pip
1920
pip install tox tox-gh-actions
2021
- name: Run Tox Check
2122
run: tox -e check
2223

2324
build:
2425
needs: check
2526
runs-on: ubuntu-latest
27+
# Run on every code push, but only on review ready PRs
28+
if: ${{ github.event_name == 'push' || github.event.pull_request.draft == false }}
2629
strategy:
2730
matrix:
2831
python-version: ['3.7', '3.8', '3.9', '3.10']
29-
pyenv: [stable, dev]
32+
pyenv: [pip]
3033
exclude:
31-
# Exclude 3.7-stable so we can add pre and post tasks to that environment.
34+
# Exclude 3.7-pip so we can add pre/post tasks to that environment.
3235
- python-version: '3.7'
33-
pyenv: stable
36+
pyenv: pip
3437
include:
35-
# Re-include 3.7-stable with additional tox tasks.
38+
# Re-include 3.7 with additional tox tasks.
3639
- python-version: '3.7'
37-
pyenv: stable,docs
40+
pyenv: pip,docs
3841

3942

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

57+
conda-build:
58+
needs: check
59+
runs-on: ${{ matrix.os }}
60+
# Only run on review ready pull_requests
61+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }}
62+
defaults:
63+
run:
64+
shell: bash -el {0}
65+
strategy:
66+
matrix:
67+
os: [ubuntu-latest, ubuntu-20.04, macOS-latest, macOS-11]
68+
backend: [default, openblas]
69+
python-version: ['3.8']
70+
include:
71+
- os: ubuntu-latest
72+
backend: intel
73+
- os: macOS-latest
74+
backend: accelerate
75+
- os: windows-2019
76+
backend: default
5577

56-
docs:
78+
steps:
79+
- uses: actions/checkout@v3
80+
- name: Set up Conda ${{ matrix.os }} Python ${{ matrix.python-version }}
81+
uses: conda-incubator/setup-miniconda@v2
82+
with:
83+
auto-update-conda: true
84+
python-version: ${{ matrix.python-version }}
85+
activate-environment: aspire
86+
environment-file: environment-${{ matrix.backend }}.yml
87+
auto-activate-base: false
88+
- name: Complete Install and Log Environment ${{ matrix.os }} Python ${{ matrix.python-version }}
89+
run: |
90+
conda info
91+
conda list
92+
pip install -e ".[dev]"
93+
pip freeze
94+
python -c "import numpy; numpy.show_config()"
95+
- name: Execute Pytest Conda ${{ matrix.os }} Python ${{ matrix.python-version }}
96+
run: |
97+
export OMP_NUM_THREADS=2
98+
# -n runs test in parallel using pytest-xdist
99+
pytest -n2 --durations=50 -s
100+
101+
# Build and Deploy production (master) docs.
102+
docs_deploy:
57103
if: github.ref == 'refs/heads/master'
58104
runs-on: ubuntu-latest
59105
steps:
60106
- uses: actions/checkout@v3
61107
- name: Setup Python
62108
uses: actions/setup-python@v4
63109
with:
64-
python-version: '3.7'
110+
python-version: '3.8'
65111
- name: Install Dependencies
66112
run: |
67-
python -m pip install --upgrade pip
68113
pip install -e ".[dev]"
69114
- name: Run Sphinx doc build script
70115
env:
@@ -77,11 +122,12 @@ jobs:
77122
ampere_gpu:
78123
needs: check
79124
runs-on: self-hosted
125+
# Run on every code push, but only on review ready PRs
126+
if: ${{ github.event_name == 'push' || github.event.pull_request.draft == false }}
80127
steps:
81128
- uses: actions/checkout@v3
82129
- name: Install dependencies
83130
run: |
84-
python -m pip install --upgrade pip
85131
pip install -e ".[dev,gpu_11x]"
86132
- name: Customize config
87133
run: |
@@ -104,3 +150,30 @@ jobs:
104150
ASPIREDIR=${{ env.WORK_DIR }} pytest --durations=50
105151
- name: Cleanup
106152
run: rm -rf ${{ env.WORK_DIR }}
153+
154+
# Build branch's docs and gallery.
155+
docs:
156+
needs: check
157+
runs-on: ubuntu-latest
158+
steps:
159+
- uses: actions/checkout@v3
160+
- name: Setup Python
161+
uses: actions/setup-python@v4
162+
with:
163+
python-version: '3.8'
164+
- name: Install Dependencies
165+
run: |
166+
python -m pip install --upgrade pip
167+
pip install -e ".[dev]"
168+
- name: Build Sphinx docs
169+
run: |
170+
make distclean
171+
sphinx-apidoc -f -o ./source ../src -H Modules
172+
make html
173+
working-directory: ./docs
174+
- name: Archive Sphinx docs
175+
uses: actions/upload-artifact@v3
176+
with:
177+
name: sphinx-docs
178+
path: docs/build
179+
retention-days: 7

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![codecov](https://codecov.io/gh/ComputationalCryoEM/ASPIRE-Python/branch/master/graph/badge.svg?token=3XFC4VONX0)](https://codecov.io/gh/ComputationalCryoEM/ASPIRE-Python)
66
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5657281.svg)](https://doi.org/10.5281/zenodo.5657281)
77

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

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

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

2222
```
23-
ComputationalCryoEM/ASPIRE-Python: v0.10.1 https://doi.org/10.5281/zenodo.5657281
23+
ComputationalCryoEM/ASPIRE-Python: v0.11.0 https://doi.org/10.5281/zenodo.5657281
2424
2525
```
2626

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

0 commit comments

Comments
 (0)