-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: docstrings and overall design for expectation maximization iterative refinement #21
Open
jedyeo
wants to merge
175
commits into
master
Choose a base branch
from
itr_ref_docstrings
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 142 commits
Commits
Show all changes
175 commits
Select commit
Hold shift + click to select a range
a2629da
Init
jedyeo ccc4359
precommit yaml
jedyeo 186fddc
remove ref
jedyeo 62b9f42
Format code with black and isort
deepsource-autofix[bot] ee5adab
Docstrings, precommit broken?
jedyeo b027987
Format code with black and isort
deepsource-autofix[bot] 26dcf79
Update docstrings
jedyeo 2110a8a
Format code with black and isort
deepsource-autofix[bot] f493da6
Dummy tests
00b8afb
docstrings and tests
jedyeo 387c8ed
Format code with black and isort
deepsource-autofix[bot] be31e4c
Minor ds change. Fixed tests w/ fixture
jedyeo bb3b232
Minor ds change. Fixed tests w/ fixture
jedyeo 7d42322
Format code with black and isort
deepsource-autofix[bot] e3becc4
Minor docstring changes
jedyeo e12673d
minor ds changes
jedyeo dd4d35b
ds changes
jedyeo 2429d1b
Change class docstring
jedyeo e8503c2
Remove todo's breaking deepsource
jedyeo 87a9a87
Format code with black and isort
deepsource-autofix[bot] 65273f0
DeepSource changes
jedyeo 5309ac8
deepsoruce changes
jedyeo d5ea497
Format code with black and isort
deepsource-autofix[bot] 1a79772
literals removed
jedyeo c473d43
literals removed
jedyeo 38a9a5e
add pre commit
jedyeo 7a4de6f
Init tests
jedyeo df6c749
temporary static methods
jedyeo 6849b0c
Format code with black and isort
deepsource-autofix[bot] 4e927ab
temporary static methods
jedyeo 93ca7fc
ds changes
jedyeo ea2c766
ds changes
jedyeo 714b33d
changed deepsource
jedyeo 5b4db6e
lint
jedyeo ccd0d04
add black back
jedyeo c8f3c60
Format code with black
deepsource-autofix[bot] c2726b2
update toml
jedyeo 7f96273
ds
jedyeo 3d4ad77
added .ini for pytest
jedyeo b293181
init
jedyeo 02eec0a
Codecov files
49138c7
Linting files
6135c72
Dev requirements
f54ece8
Environment config
b9b540e
Added setup.py
afd7290
env yaml
jedyeo 5a4a56e
Reformatted docstrings
e504e32
Format code with black
deepsource-autofix[bot] a282ffc
Testing workspace changes
43a440e
Merge branch 'itr_ref_docstrings' of github.com:compSPI/reconstructSP…
1a0af09
Fixed test docstrings
3d1be9b
Format code with black
deepsource-autofix[bot] 5268b73
Edited module name
3e638af
Merge branch 'itr_ref_docstrings' of github.com:compSPI/reconstructSP…
984af8a
Linting fixes
eecb97e
Format code with black
deepsource-autofix[bot] f7f98b4
Linting fixes
1a79652
Linting fixes
d2faa25
Fixed imports
a3eedd6
Readded simSPI import
c898048
Fixed function reference
71356a5
Fixed test_build_ctf_array
0522a91
tets
jedyeo ee0ef8f
Format code with black
deepsource-autofix[bot] 7141f37
Reworked tests to use consistent array sizing
5d0d1a1
Tab snuck in
7289762
Format code with black
deepsource-autofix[bot] f1bd414
Comment change to force checks
756adbe
Fixes to tests
40a6fb0
Refactored tests a bit
5c74fb3
Fix to test_split_array
c210d36
Fix to test_generate_xy_plane
8753a1f
Docstring fix
1ce2209
Deepsource tricked me
0673ebb
Dosctring to force checks
ae8c96f
Fixture fix:
16a0b90
Format code with black
deepsource-autofix[bot] 3c3595c
Format code with black
deepsource-autofix[bot] a5bc9ee
Format code with black
deepsource-autofix[bot] b76ec98
Format code with black
deepsource-autofix[bot] b58ba2f
Forcing checks again...
1fb62fa
Merge branch 'itr_ref_docstrings' of github.com:compSPI/reconstructSP…
98a879c
Format code with black
deepsource-autofix[bot] a1dc0cd
Better ctf_info for tests
5818e9e
Merge branch 'itr_ref_docstrings' of github.com:compSPI/reconstructSP…
4bcf15a
Format code with black
deepsource-autofix[bot] ecee780
Strings not variables...
f9c4196
Merging
0ac923c
Format code with black
deepsource-autofix[bot] cb7b069
Fix
0fb3b1b
Fix
966ed3c
test fixes
ccbd07b
Format code with black
deepsource-autofix[bot] 4858d54
Test fixes
b7b8688
Merge branch 'itr_ref_docstrings' of github.com:compSPI/reconstructSP…
bc88498
Force checks
ab014c5
Format code with black
deepsource-autofix[bot] 656b5d2
test fixes
4a86e20
Merge branch 'itr_ref_docstrings' of github.com:compSPI/reconstructSP…
b9e72ad
Forcing checks
5577ded
Reshape fix
bb6e258
Shape fix
81e5faa
Structure changes
a2f4b52
Test framework adjustment
17f94ca
Import change
9f7ee21
Small typo fixes
thisFreya 0d418b9
Added a slightly more comprehensive split test
thisFreya e6410cd
Format code with black
deepsource-autofix[bot] 511d105
Added back references
b575e13
Added the big method
thisFreya 41a5807
Format code with black
deepsource-autofix[bot] 22efe76
Pre-commit and black changes
thisFreya 5a22371
Merging
thisFreya bda6275
Deepsource
thisFreya 976be19
Expanded split_array to allow lists and tuples
thisFreya 00e7281
Format code with black
deepsource-autofix[bot] ff36588
Deepsource fix
thisFreya 8de2090
Merge branch 'itr_ref_docstrings' of https://github.com/compSPI/recon…
thisFreya b8e37ef
Fixed split_array expansion
thisFreya abfd9aa
Fix to fsc test
thisFreya e1cd120
Data type fix
thisFreya 83d9cf7
Concatenate fix
thisFreya f8dc07a
Change to insert slice shape
352a989
Format code with black
deepsource-autofix[bot] d381e3c
fix to numpy array initialization
56f02a1
Merging
294d4b5
Format code with black
deepsource-autofix[bot] 3819306
num rotations change
2b25434
Merge branch 'itr_ref_docstrings' of github.com:compSPI/reconstructSP…
f28ccfa
Format code with black
deepsource-autofix[bot] c053980
fsc fix
89cdaa8
Merge branch 'itr_ref_docstrings' of github.com:compSPI/reconstructSP…
7083a54
Forgot what a dot product did for a second there
2a1eda7
Updated iterative refinement test to reflect fsc fix
cba9320
Removed superfluous imports
d40e6ae
Updated docstrings, fixed splitting arrs
6c6e1f0
Split n into n_pix, n_particles
1e11a9d
Format code with black
deepsource-autofix[bot] d621fb1
Added back numba
b48b5ef
Merge branch 'itr_ref_docstrings' of github.com:compSPI/reconstructSP…
496f88a
Force checks
8aaff78
n_pix in fft docstrings
33e3229
Normalizing half maps
01ceaf5
Format code with black
deepsource-autofix[bot] 20f2232
Removed comments, refactored big method, fixed bayesian weights shapes
e76d8a2
Format code with black
deepsource-autofix[bot] 6e7ed32
Infrastructure files
6a9ee69
Infrastructure files
fd9cefa
Missed a name
bb8b274
Removed last few comments, will re-add if needed
66c0ef3
Format code with black
deepsource-autofix[bot] b9e8c10
Merging changes
579f716
Fixed variable name
6fe971c
Merge branch 'itr_ref_docstrings' of github.com:compSPI/reconstructSP…
55ee718
Changed codecov parameters
0d18f66
Removed __init__.py files
7f81456
Revert "Removed __init__.py files"
887bff7
Merging
e583a54
Revert "Changed codecov parameters"
aa607f3
Merge branch 'reconstructSPI_infrastructure' of github.com:compSPI/re…
15840cf
Refactoring library format
2f91bc6
Directory fixes
bccb41c
Revert "Refactoring library format"
2c42e8d
Revert "Directory fixes"
9126f86
Removed dependencies
3330c11
Testing something
aaf1078
Merge branch 'reconstructSPI_infrastructure' of github.com:compSPI/re…
ef10249
Testing things
d15bdb6
Merge branch 'reconstructSPI_infrastructure' of github.com:compSPI/re…
8dda440
Force checks
749bcd2
Testing things
2ea9459
Added library requirements
5152547
Added dev branch to branches on which tests will run.
5a4ebb5
Merging changes. Have temporarily added infrastructure branch to work…
9d05c1a
removed itr_ref_docstrings branch checks
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
coverage: | ||
round: up | ||
precision: 2 | ||
status: | ||
patch: | ||
default: | ||
# basic | ||
target: 90% | ||
threshold: 2% | ||
base: auto | ||
flags: | ||
- unit | ||
# advanced | ||
branches: | ||
- master | ||
if_no_uploads: error | ||
if_not_found: error | ||
if_ci_failed: error | ||
only_pulls: false | ||
|
||
# Files to ignore | ||
ignore: | ||
- "data" | ||
- "notebooks" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[report] | ||
fail_under = 90 | ||
show_missing = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,18 @@ | ||
version = 1 | ||
|
||
test_patterns = ["test/**"] | ||
test_patterns = ["tests/**"] | ||
|
||
exclude_patterns = ["README.md"] | ||
|
||
[[analyzers]] | ||
name = "python" | ||
enabled = true | ||
|
||
[analyzers.meta] | ||
runtime_version = "3.x.x" | ||
|
||
[[analyzers]] | ||
name = "test-coverage" | ||
enabled = true | ||
|
||
[[transformers]] | ||
name = "isort" | ||
enabled = true | ||
|
||
[[transformers]] | ||
name = "black" | ||
enabled = true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[flake8] | ||
docstring-convention = numpy | ||
import_order_style = smarkets | ||
max-line-length = 88 | ||
extend-ignore = E203,I202,I100 | ||
exclude = reconstructSPI/__init__.py,reconstructSPI/iterative_refinement/__init.py,tests/__init__.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: "Lint" | ||
|
||
on: | ||
push: | ||
branches: [master,github-actions-test] | ||
paths-ignore: | ||
- 'README.md' | ||
- '.deepsource.toml' | ||
- '.gitignore' | ||
- 'setup.py' | ||
|
||
|
||
pull_request: | ||
branches: [master] | ||
paths-ignore: | ||
- 'README.md' | ||
- '.deepsource.toml' | ||
- '.gitignore' | ||
- 'setup.py' | ||
|
||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ${{matrix.os}} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-18.04] | ||
python-version: [3.9] | ||
test-folder : ['tests'] | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Build using Python ${{matrix.python-version}} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{matrix.python-version}} | ||
- name: install dependencies [pip] | ||
run: | | ||
pip install --upgrade pip setuptools wheel | ||
for req in dev-requirements.txt; do | ||
pip install -q -r $req | ||
done | ||
pip install -e . | ||
- name: linting [black and isort] | ||
run: | | ||
black . --check | ||
isort --profile black --check . | ||
- name: linting [flake8] | ||
run: | | ||
flake8 reconstructSPI tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: "Test" | ||
|
||
on: | ||
push: | ||
branches: [master,github-actions-test] | ||
paths-ignore: | ||
- 'README.md' | ||
- '.deepsource.toml' | ||
- '.gitignore' | ||
- 'setup.py' | ||
|
||
|
||
pull_request: | ||
branches: [master] | ||
paths-ignore: | ||
- 'README.md' | ||
- '.deepsource.toml' | ||
- '.gitignore' | ||
- 'setup.py' | ||
|
||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ${{matrix.os}} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-18.04] | ||
python-version: [3.7,3.8,3.9] | ||
test-folder : ['tests'] | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Build using Python ${{matrix.python-version}} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{matrix.python-version}} | ||
|
||
- name: cache conda | ||
uses: actions/cache@v1 | ||
with: | ||
path: $CONDA | ||
key: ${{ runner.os }}-conda-${{ hashFiles('environment.yml') }} | ||
restore-keys: | | ||
${{ runner.os }}-conda- | ||
- name: install dependencies [conda] | ||
run: | | ||
# $CONDA is an environment variable pointing to the root of the miniconda directory | ||
$CONDA/bin/conda env update --file environment.yml --name base | ||
$CONDA/bin/pip install -e . | ||
- name: unit testing [pytest] | ||
env: | ||
TEST_TOKEN: ${{ secrets.TEST_TOKEN }} | ||
run: | | ||
$CONDA/bin/pytest --cov-report term --cov-report xml:coverage.xml --cov=reconstructSPI ${{matrix.test-folder}} | ||
- name: uploading code coverage [codecov] | ||
if: ${{matrix.python-version == 3.7}} | ||
run: | | ||
bash <(curl -s https://codecov.io/bash) -c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
default_language_version : | ||
python : python3 | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.1.0 | ||
hooks: | ||
- id: check-byte-order-marker | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-yaml | ||
- id: mixed-line-ending | ||
args: | ||
- --fix=no | ||
- id: no-commit-to-branch | ||
args: | ||
- --branch=master | ||
- id: check-added-large-files | ||
args: | ||
- --maxkb=2048 | ||
- id: trailing-whitespace | ||
- repo: https://github.com/psf/black | ||
rev: 21.8b0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.9.3 | ||
hooks: | ||
- id : isort | ||
args : ["--profile", "black", "--filter-files"] | ||
- repo: https://github.com/asottile/blacken-docs | ||
rev: v1.8.0 | ||
hooks: | ||
- id: blacken-docs | ||
additional_dependencies: [black==20.8b0] | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.7.9 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: | ||
- flake8-docstrings | ||
- flake8-import-order | ||
exclude: reconstructSPI/__init__.py,tests/__init__.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
black | ||
flake8 | ||
flake8-docstrings | ||
isort | ||
pre-commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: reconstructSPI | ||
channels: | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
- codecov | ||
- coverage | ||
- gemmi | ||
- numpy | ||
- numba | ||
- pillow>=8.2.0 | ||
- pip | ||
- pytest | ||
- pytest-cov | ||
- pytorch | ||
- pip : | ||
- git+https://github.com/compSPI/simSPI.git | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[pytest] | ||
testpaths = tests | ||
python_files = *.py | ||
python_functions = test_* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""Various particle reconstruction methods.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""Iterative refinement reconstruction methods.""" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I see reconstructSPI is missing files like this that are present in the other repos. I assume you got them from the other ones and adapted anything that needed to be.
Would have been better to split into another PR (bite sized pieces!)... but let's go with it.