Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
294 commits
Select commit Hold shift + click to select a range
ece96f5
Enforce single blank line between docstring body and parameters.
j-c-c Sep 29, 2023
c2f201b
initial add coef class
garrettwrong Sep 12, 2023
e3af043
stash partial basis migration
garrettwrong Sep 12, 2023
5e84991
fspca basis conversion
garrettwrong Sep 12, 2023
37899b4
stash initial pswf Coef conversion
garrettwrong Sep 12, 2023
6e59026
stash initial steerable Coef conversion
garrettwrong Sep 12, 2023
a608a5b
initial migration classification towards Coef
garrettwrong Sep 13, 2023
e49c145
initial migration ctf towards Coef
garrettwrong Sep 13, 2023
127fc77
initial migration reconstruction towards Coef
garrettwrong Sep 13, 2023
ee7410f
migration some tests towards using Ceof
garrettwrong Sep 13, 2023
cc79782
cleanup typos
garrettwrong Sep 13, 2023
99fc3fe
migrate PSWF FPSWF tests towards Coef
garrettwrong Sep 13, 2023
da080b1
class2D updates
garrettwrong Sep 14, 2023
4402a8f
initial cov2d Coef updates
garrettwrong Sep 14, 2023
7807e6d
pass FLE2d and FB2D tests
garrettwrong Sep 14, 2023
93482fc
fixup covar2d test cases (Coef)
garrettwrong Sep 14, 2023
b5ce013
restore cov2d and batched cov2d tests after Coef changes
garrettwrong Sep 14, 2023
0e78be8
restore pswf and fpswf tests
garrettwrong Sep 15, 2023
8f5971c
restore class2d tests
garrettwrong Sep 15, 2023
2ad3d89
restore more class2d tests
garrettwrong Sep 15, 2023
6fc7b30
restore more class2d tests again
garrettwrong Sep 15, 2023
43d60dc
fix rebase bug, missing _t
garrettwrong Sep 15, 2023
e3690cd
Fixup circular dependence
garrettwrong Sep 18, 2023
aa785d6
Add Coef unit test
garrettwrong Sep 18, 2023
b3addca
Minor cleanup, mostly strings.
garrettwrong Sep 18, 2023
27abfa1
revert unnessecary volume asnumpy conversion
garrettwrong Sep 18, 2023
75313f0
add missing tests and misc string cleanup
garrettwrong Sep 19, 2023
c4eb963
Extend Coef unit tests to all steerable basis subclass
garrettwrong Sep 19, 2023
a7af697
more touchups
garrettwrong Sep 19, 2023
b4c94a6
evaluate test tolerance (floats)
garrettwrong Sep 19, 2023
bed8b5e
scope the fixtures to resuse instead of parameterizing
garrettwrong Sep 19, 2023
bb4b0be
strings
garrettwrong Sep 21, 2023
bc56566
tmp variable name change.
garrettwrong Sep 21, 2023
4e47256
change dim expansion expression
garrettwrong Sep 21, 2023
511282b
spell out sizes in unit test comment
garrettwrong Sep 21, 2023
466621e
change __len__ behavior
garrettwrong Sep 27, 2023
6e2317a
string changes
garrettwrong Sep 27, 2023
717ef41
revert eigval return type
garrettwrong Sep 27, 2023
b58af53
string changes
garrettwrong Sep 27, 2023
b1549af
coeff to coef bin filename conversion
garrettwrong Sep 28, 2023
f047bde
initial stub ComplexCoef
garrettwrong Sep 27, 2023
9cc65a1
minimal test updates to support ComplexCoef addition
garrettwrong Sep 28, 2023
11214ff
address recent numpy deprecation warning in related code
garrettwrong Sep 28, 2023
624baf0
touch ups
garrettwrong Sep 28, 2023
3b300c9
improve test coverage of new ComplexCoef class
garrettwrong Sep 28, 2023
8e1b9dc
fix string spelling typo
garrettwrong Sep 28, 2023
f9051a4
remove redundant check
garrettwrong Sep 28, 2023
fa3727d
stash initial attempt at \#897 and \#904
garrettwrong Sep 8, 2023
7c009dd
cleanup some imports and tests
garrettwrong Sep 8, 2023
517a315
address denoise() usage in code/examples
garrettwrong Sep 8, 2023
84dcb9b
lint cleanup
garrettwrong Sep 8, 2023
27c3ece
self review, dict cleanup
garrettwrong Sep 11, 2023
d8583df
self review strings
garrettwrong Sep 11, 2023
5c093fe
cover new code branches
garrettwrong Sep 11, 2023
5ffe3a8
reconcile conflict
garrettwrong Sep 13, 2023
9fc848a
rename DesnoisedImageSource DesnoisedSource
garrettwrong Sep 21, 2023
1a79773
remove src arg from DenoisedSource
garrettwrong Sep 21, 2023
785f316
Revert "remove src arg from DenoisedSource"
garrettwrong Sep 28, 2023
1bcc9cc
refactor and add test for denoiser source
garrettwrong Sep 28, 2023
bee5baa
Better fixup those strings
garrettwrong Sep 28, 2023
990a30b
Use the usual allclose tolerance.
garrettwrong Sep 28, 2023
217861d
Add utest_tolerance to flaky test. Remove unecessary loop.
j-c-c Oct 4, 2023
4d87dd4
Use random rotations.
j-c-c Oct 4, 2023
85b5c29
Use n_vols instead of hardcoded value.
j-c-c Oct 5, 2023
19780fe
Add pyshtool dependency
garrettwrong Oct 17, 2023
d1ed1bb
Use pyshtools for higher order sph harm functions in FB
garrettwrong Oct 17, 2023
a366091
Add files from commonline_sdp branch
j-c-c Oct 13, 2023
57aabe9
replace manual grid construction with grid_2d in pswf
garrettwrong Oct 25, 2023
e2211d4
swap x,y vars, then remove a bunch of excess code
garrettwrong Oct 25, 2023
cef9c5f
Use indexing arg instead of transpose
garrettwrong Oct 26, 2023
528127b
nearest_rotations method with unit tests.
j-c-c Oct 31, 2023
d008888
Check we retain singleton shape.
j-c-c Oct 31, 2023
a001896
Clarifying comment.
j-c-c Oct 31, 2023
1df6ec2
Edit more comments.
j-c-c Oct 31, 2023
1dae00c
Test error message.
j-c-c Oct 31, 2023
1334ae1
address review.
j-c-c Nov 3, 2023
6c714f1
black
j-c-c Nov 3, 2023
a9cab5b
Fill in docstrings in docstring check file.
j-c-c Oct 2, 2023
9c1b756
use glob
j-c-c Oct 4, 2023
87c2020
Use re.finditer instead of re.findall to remove double search.
j-c-c Oct 4, 2023
ca5f0f2
Fix found docstring error in basis/steerable.py
j-c-c Oct 4, 2023
9fcfa07
Only need one str.startswith().
j-c-c Oct 5, 2023
d69fd35
Check that target directory is actual directory
j-c-c Oct 5, 2023
dc78653
Replace logic with regex.
j-c-c Oct 17, 2023
1e723ab
refactor docstrings to sphinx format.
j-c-c Oct 17, 2023
9be1832
line wrap regex
j-c-c Oct 17, 2023
b4afe45
Initial test
j-c-c Oct 17, 2023
9fe3393
tox
j-c-c Oct 17, 2023
f0ae1c5
update test
j-c-c Oct 17, 2023
9ea7efa
os.path.join, test cleanup.
j-c-c Oct 17, 2023
73edd7f
Better use of OR logic.
j-c-c Oct 17, 2023
427d1cf
Just test docstring checking function, not entire script.
j-c-c Oct 18, 2023
d19c87f
test name
j-c-c Oct 18, 2023
b4e1faf
add missing test case.
j-c-c Oct 19, 2023
9d9e1ee
remove basis check
garrettwrong Oct 3, 2023
3687e06
draft extend denoiser test
garrettwrong Oct 3, 2023
ddf3306
Squash stashed work refactoring filter to basis mat tests for FB/FFB.
garrettwrong Oct 3, 2023
a5aa404
Add from_dense BlkDiagMatrix helper
garrettwrong Oct 20, 2023
051471e
Fix DiagMatrix.apply
garrettwrong Oct 23, 2023
54ee4a4
Minimal FLE change
garrettwrong Oct 23, 2023
a4666e2
Refactor for inheriting PSWF/FPSWF basis mat
garrettwrong Oct 23, 2023
2cbab5a
classifier default
garrettwrong Oct 23, 2023
1fb471d
Fixup the FLE coef order returned form filter to basis mat
garrettwrong Oct 24, 2023
324812c
Restore unit tests
garrettwrong Oct 24, 2023
613182d
Add optional warning code to BlkDiagMatrix.from_dense
garrettwrong Oct 26, 2023
eb9885c
Extend cov2d_denoiser tests with current performance refs
garrettwrong Oct 26, 2023
fa00955
Cleanup tox (unused import, warning stacklevel)
garrettwrong Oct 26, 2023
1f879e1
Address rotation convention change I missed when breaking the code up
garrettwrong Oct 26, 2023
d001631
cleanup basis_utils imports
garrettwrong Oct 27, 2023
d62758f
Reduce filter_to_basis_mat docstrings.
garrettwrong Oct 27, 2023
996e5dc
Reduce redundate rotate doctrings in pswf2d
garrettwrong Oct 27, 2023
2556f59
Move blk diag truncation hack from cov2d into basis
garrettwrong Oct 27, 2023
862389f
misc string cleanup
garrettwrong Oct 27, 2023
cc5a4de
Add test coverage for new ftbm branch cases
garrettwrong Oct 27, 2023
95ef792
Add BlkDiag from dense incorrect shape test
garrettwrong Oct 27, 2023
7247e37
Extend class_2d tests
garrettwrong Oct 27, 2023
8e96f90
Try to speed up the class_2d tests
garrettwrong Oct 27, 2023
d1b405d
Optionally apply truncation to filter_to_basis_mat
garrettwrong Oct 30, 2023
3de3ca9
Move tests into expensive
garrettwrong Oct 31, 2023
ef14fbb
Fixup some strings
garrettwrong Nov 1, 2023
fdcec67
reduce cov2d_denoise test size/time and update refs
garrettwrong Nov 2, 2023
f994151
Update blk diag test docstring to reflect simplified test
garrettwrong Nov 6, 2023
c883561
Clarify DiagMatrix apply transposes.
garrettwrong Nov 6, 2023
c72b5f5
Revert "cleanup basis_utils imports"
garrettwrong Nov 8, 2023
bda169e
set 1e-3 default for truncation
garrettwrong Nov 8, 2023
e115db6
Add comment about ftbm abstractmethod
garrettwrong Nov 8, 2023
441bfea
Safeguard dividing by small values in PowerFilter. Temporary change i…
j-c-c Oct 9, 2023
b8193e9
Add warning message.
j-c-c Oct 10, 2023
f3bfedd
Revert _rlnOpticsGroup type after altering example starfile.
j-c-c Oct 10, 2023
e4ef77b
test for PowerFilter safeguard.
j-c-c Oct 18, 2023
7e148fe
refactor safeguard.
j-c-c Oct 19, 2023
455f16c
tmp extend develop timeout to 12 hours
garrettwrong Nov 9, 2023
3a86325
reduce class_avg_src test size and compute time
garrettwrong Nov 9, 2023
8f936d4
restore 6hour long running time out
garrettwrong Nov 9, 2023
030c89e
transform Relion rotations.
j-c-c Oct 20, 2023
84b5566
negate averager rotations.
j-c-c Oct 24, 2023
11435f2
fix grid axes insert in fuzzy_mask
j-c-c Oct 24, 2023
44760b4
resolve FLE test
j-c-c Oct 25, 2023
f8bacd8
Switch synthetic volume grid indexing. Resolves failing orient_symmet…
j-c-c Oct 25, 2023
3e6cfd2
rotated_grid_3d xyz ~~> zyx. Resolved failing synthetic vol test.
j-c-c Oct 25, 2023
0c0dd2a
Resolve failing volume rotate test.
j-c-c Oct 25, 2023
902dca8
swap axes of volume in test_simulation.
j-c-c Oct 25, 2023
f1d6e09
Initial rotation swap.
j-c-c Oct 26, 2023
f960cc0
Rotation transformation method. Fix test_simulation.
j-c-c Oct 26, 2023
90b2cac
Resolve failing hardcoded volume test.
j-c-c Oct 26, 2023
ab67f65
Resolve failing hardcoded anisotropic_noise test.
j-c-c Oct 26, 2023
c9e9f65
Resolve failing hardcoded covar2d test.
j-c-c Oct 26, 2023
7797bc7
Resolve failing hardcoded covar3d test.
j-c-c Oct 26, 2023
9db24fa
legacy_simulation helper function. Resolve mean_estimator failing tests.
j-c-c Oct 26, 2023
e0b2c86
resolve failing hardcoded weighted_mean_estimator test.
j-c-c Oct 27, 2023
53b20f6
remove relion rotation transformation
j-c-c Oct 27, 2023
4cc3806
negate rotations in averager2d test. Revert rots in averager methods.
j-c-c Oct 27, 2023
0cec119
update pipeline demo section title.
j-c-c Oct 27, 2023
af3d550
use legacy_simulation everywhere.
j-c-c Oct 27, 2023
c270fa8
add commment about grid conversion in rotated_grids.
j-c-c Oct 27, 2023
f30a961
update relion interop comments.
j-c-c Oct 27, 2023
b32e036
enforce that Legacy_Volume is still that same volume. Subclass Legacy…
j-c-c Nov 2, 2023
fb8a243
Use LegacySimulation in anisotropic noise test.
j-c-c Nov 2, 2023
4a44ece
Use LegacySimulation in test_covar2d.py.
j-c-c Nov 2, 2023
7f7e699
Use LegacySimulation in test_covar3d.py.
j-c-c Nov 2, 2023
1a2ea65
Use LegacySimulation in test_mean_estimator.py.
j-c-c Nov 2, 2023
c3e5bd7
Use LegacySimulation in test_weighted_mean_estimator.py.
j-c-c Nov 2, 2023
5e9451e
Remove helper functions from relion_interop
j-c-c Nov 2, 2023
ad67945
Fix import of moved function.
j-c-c Nov 2, 2023
7ff2e7d
refactor _init_angles.
j-c-c Nov 2, 2023
054acbb
one more refactor of _init_angles
j-c-c Nov 2, 2023
bfd54d3
negate thetas instead of rotations.
j-c-c Nov 2, 2023
c97d18a
Remove added blank lines.
j-c-c Nov 3, 2023
67def1f
update docstring.
j-c-c Nov 6, 2023
3ec0523
LegacySimulation ~~> _LegacySimulation.
j-c-c Nov 8, 2023
9a645de
Add comment about negative thetas.
j-c-c Nov 8, 2023
9d5d9b4
add author note and paper to ctf module
garrettwrong Nov 8, 2023
6b2f7a7
add extra backticks for sphinx markup
garrettwrong Nov 9, 2023
fba69be
Add small array handling hack used in MATLAB code
garrettwrong Nov 10, 2023
4cc4d61
fix seed for class avg src classifier
garrettwrong Nov 10, 2023
c9e224a
remove unused pswf indices
garrettwrong Nov 14, 2023
ba46bca
remove deprecated 2d `indices` and `_indices`
garrettwrong Nov 14, 2023
1e7648c
update deprecated 2d `indices` and `_indices` test references to clas…
garrettwrong Nov 14, 2023
dc8df29
continue updating tests, removing old indice refs
garrettwrong Nov 15, 2023
b8b46c0
update internal 2d prolate grid orientation to yx
garrettwrong Nov 8, 2023
3ae2a1c
remove rotation orientation hack
garrettwrong Nov 8, 2023
4e4ba41
update prolate unit tests after 'yx' internal grid change
garrettwrong Nov 8, 2023
84450f6
restore ptx_{x,y} labels, swap in returned param order
garrettwrong Nov 16, 2023
750517d
increase sample_n for small class averaging problems
garrettwrong Nov 17, 2023
f3b4319
Loosen test tolerance for nonzero shifts.
j-c-c Nov 17, 2023
ff14f5a
Add some details to the cg call under test.
garrettwrong Nov 10, 2023
da3f6e7
set constant amplitudes and offsets for FLE basis test
garrettwrong Nov 13, 2023
7a1a165
add docstring for optional params
garrettwrong Nov 13, 2023
326347a
improve basis.expand docstring
garrettwrong Nov 16, 2023
8d2275a
use magnitude of eigvals in bispect random vector selection
garrettwrong Nov 20, 2023
a676e0f
Revert "use magnitude of eigvals in bispect random vector selection"
garrettwrong Nov 21, 2023
81abef9
Update arg order.
garrettwrong Nov 27, 2023
0831298
Fix mistake in class name param log
garrettwrong Nov 21, 2023
8947c55
reduce bispect settings for smaller image size (32~>16)
garrettwrong Nov 22, 2023
e64841a
force workflow run
garrettwrong Nov 22, 2023
8d664b2
Revert "force workflow run"
garrettwrong Nov 27, 2023
711f4bb
Refactor Volume.rotate to rotate grid by inverse. Arbitrary rotations…
j-c-c Nov 13, 2023
33409ce
Adjust test_rotate_axes reference points.
j-c-c Nov 13, 2023
4b0bba8
use fixtures instead of parametrize in rotate test.
j-c-c Nov 15, 2023
d6fad15
hot cold volume fixture. test_project with arbitrary rotations.
j-c-c Nov 16, 2023
6f2757c
remove unused variable
j-c-c Nov 16, 2023
2468a29
one-line call to matrices
j-c-c Nov 21, 2023
76a7325
cleaner matrix multiplication
j-c-c Nov 21, 2023
d105087
more cleanup
j-c-c Nov 21, 2023
865f84a
loosen tolerance for 1hot rotate test.
j-c-c Nov 28, 2023
b31bb56
add simulated_channelspin dataset to registry
garrettwrong Nov 15, 2023
0cf2d9c
stash initial wt vol nb
garrettwrong Nov 16, 2023
b103b15
stashing
garrettwrong Nov 16, 2023
3bd85c2
convert legacy rots in reference simulated_channelspin dataset loader
garrettwrong Nov 16, 2023
238f003
add initial text to weighted volume tutorial
garrettwrong Nov 17, 2023
a34889e
lint data_fetcher
garrettwrong Nov 17, 2023
7a557d4
update hyperlinks etc
garrettwrong Nov 17, 2023
b350422
Gallery string updates
garrettwrong Nov 20, 2023
95da13b
More wt vol gallery cleanup
garrettwrong Nov 20, 2023
ec9f7f9
Review suggestions round 1
garrettwrong Nov 21, 2023
7eee240
Fixup some words in wt vol gallery doc strings
garrettwrong Nov 29, 2023
b484910
Add test_relion_interop.py.
j-c-c Nov 20, 2023
71494be
remove unused imports
j-c-c Nov 20, 2023
a07965e
typo
j-c-c Nov 20, 2023
69b9c4b
add test files
j-c-c Nov 20, 2023
53bca8d
Test for even res. Use fixtures.
j-c-c Nov 21, 2023
8569f4f
remove blank line
j-c-c Nov 21, 2023
095aed6
Remove unnecessary fixture. Set sim amplitudes to 1.
j-c-c Nov 27, 2023
b08c8c4
Relion projection tutorial.
j-c-c Nov 28, 2023
861c657
Use global mean and std. Add relative error test.
j-c-c Nov 29, 2023
2ed0094
Make cutoff+resolution plotting optional for frc/fsc
garrettwrong Dec 4, 2023
f722817
Resolve new Flake8 concern, unprinted tuple
garrettwrong Dec 4, 2023
6f9c58f
Cleanup warnings
garrettwrong Dec 4, 2023
fd34087
Add simple rotation test across bases
garrettwrong Nov 27, 2023
0e13ffa
Convert basis rotation test to use Gaussian blob
garrettwrong Nov 27, 2023
47e5aa3
Update rot test params to run doubles in long running
garrettwrong Nov 28, 2023
e296011
Remove old FFB and FLE specific rotation tests
garrettwrong Nov 28, 2023
dc395e1
move new steerable rotate tests out of test_rotation
garrettwrong Nov 28, 2023
96f967e
Add a shared steerable reflection test.
garrettwrong Nov 28, 2023
e7a8f87
Touch up tests
garrettwrong Nov 28, 2023
3402710
normalize the images in steerable tests
garrettwrong Nov 29, 2023
9876e59
Tighten up steerable rotate tol after normalization
garrettwrong Nov 30, 2023
bc3481b
refactor eval_coords to handle >2 vols
j-c-c Nov 30, 2023
b4e5e20
add description for return values.
j-c-c Nov 30, 2023
51577d6
Use 3 volumes in the gallery.
j-c-c Nov 30, 2023
5f2748a
Fix test
j-c-c Nov 30, 2023
cf2ef25
Bump version: 0.12.0 → 0.12.1
j-c-c Dec 7, 2023
4eafdec
Enforce blk diag dtype on assign/insert.
garrettwrong Dec 8, 2023
3526468
Workaround Ray dependency conflict
garrettwrong Dec 12, 2023
347c779
Fix incorrect basis in Coef wrapper
garrettwrong Dec 14, 2023
e222b1b
Remove importlib pre-import
garrettwrong Dec 11, 2023
89f1ce1
Resolve circular import
garrettwrong Dec 11, 2023
1053eeb
Import aspire.downloader before use
garrettwrong Dec 11, 2023
8951060
Dynamically load sub module via getattr overload
garrettwrong Dec 14, 2023
8f94a24
Backtik string err str change
garrettwrong Dec 15, 2023
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
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.12.0
current_version = 0.12.1
commit = True
tag = True

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/long_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
jobs:
expensive_tests:
runs-on: self-hosted
timeout-minutes: 360
steps:
- uses: actions/checkout@v3
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
- name: Cache Data
run: |
ASPIREDIR=${{ env.WORK_DIR }} python -c \
"import aspire; print(aspire.config['common']['cache_dir']); aspire.downloader.emdb_2660()"
"import aspire; print(aspire.config['common']['cache_dir']); import aspire.downloader; aspire.downloader.emdb_2660()"
- name: Cleanup
run: rm -rf ${{ env.WORK_DIR }}

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5657281.svg)](https://doi.org/10.5281/zenodo.5657281)
[![Downloads](https://static.pepy.tech/badge/aspire/month)](https://pepy.tech/project/aspire)

# ASPIRE - Algorithms for Single Particle Reconstruction - v0.12.0
# ASPIRE - Algorithms for Single Particle Reconstruction - v0.12.1

The ASPIRE-Python project supersedes [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.12.0 https://doi.org/10.5281/zenodo.5657281
ComputationalCryoEM/ASPIRE-Python: v0.12.1 https://doi.org/10.5281/zenodo.5657281

```

Expand Down
62 changes: 62 additions & 0 deletions docs/check_docstrings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import logging
import os
import re
import sys
from glob import glob

logger = logging.getLogger(__name__)


def check_blank_line_above_param_section(file_path):
"""
Check that every docstring with both a body section and a parameter
section separates the two sections with exactly one blank line. Log
errors and return count.

:param file_path: File path to check for error.
:return: Per file error count.
"""
error_count = 0
with open(file_path, "r") as file:
content = file.read()

regex = (
r" {4,}\"\"\"\n(?:^[^:]+?[^\n])+(\n|\n\n\n+) {4,}(:p|:r)(?:.*\n)+? {4,}\"\"\""
)

bad_docstrings = re.finditer(regex, content, re.MULTILINE)
for docstring in bad_docstrings:
line_number = content.count("\n", 0, docstring.start()) + 1

# Log error message.
msg = "Must have exactly 1 blank line between docstring body and parameter sections."
logger.error(f"{file_path}: {line_number}: {msg}")
error_count += 1

return error_count


def process_directory(directory):
"""
Recursively walk through directories and check for docstring errors.
If any errors found, log error count and exit.

:param directory: Directory path to walk.
"""
error_count = 0
for file in glob(os.path.join(directory, "**/*.py"), recursive=True):
error_count += check_blank_line_above_param_section(file)
if error_count > 0:
logger.error(f"Found {error_count} docstring errors.")
sys.exit(1)


if __name__ == "__main__":
if len(sys.argv) != 2:
logger.warning("Usage: python check_docstrings.py <directory>")
sys.exit(1)

target_directory = sys.argv[1]
if not os.path.isdir(target_directory):
raise RuntimeError(f"Invalid target directory path: {target_directory}")
process_directory(target_directory)
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
# built documents.
#
# The full version, including alpha/beta/rc tags.
release = version = "0.12.0"
release = version = "0.12.1"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Aspire v0.12.0
Aspire v0.12.1
==============

Algorithms for Single Particle Reconstruction
Expand Down
58 changes: 0 additions & 58 deletions gallery/experiments/cov2d_experiment.py.dontrun

This file was deleted.

66 changes: 0 additions & 66 deletions gallery/experiments/cov3d_experiment.dontrun

This file was deleted.

4 changes: 2 additions & 2 deletions gallery/experiments/experimental_abinitio_pipeline_10028.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

from aspire.abinitio import CLSyncVoting
from aspire.basis import FFBBasis3D
from aspire.denoising import DefaultClassAvgSource, DenoiserCov2D
from aspire.denoising import DefaultClassAvgSource, DenoisedSource, DenoiserCov2D
from aspire.noise import AnisotropicNoiseEstimator
from aspire.reconstruction import MeanEstimator
from aspire.source import OrientedSource, RelionSource
Expand Down Expand Up @@ -121,7 +121,7 @@
# Use CWF denoising
cwf_denoiser = DenoiserCov2D(src)
# Use denoised src for classification
classification_src = cwf_denoiser.denoise()
classification_src = DenoisedSource(src, cwf_denoiser)
# Cache for speedup. Avoids recomputing.
classification_src = classification_src.cache()
# Peek, what do the denoised images look like...
Expand Down
33 changes: 0 additions & 33 deletions gallery/experiments/orient3d_experiment.dontrun

This file was deleted.

87 changes: 0 additions & 87 deletions gallery/experiments/preprocess_imgs_exp.py.dontrun

This file was deleted.

Loading