-
Notifications
You must be signed in to change notification settings - Fork 15
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
pytests for output paths mcorr, cnmf, cnmfe #10
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,18 +133,49 @@ def test_mcorr(): | |
print(df.iloc[-1]['outputs']['traceback']) | ||
assert df.iloc[-1]['outputs']['success'] is True | ||
assert df.iloc[-1]['outputs']['traceback'] is None | ||
assert vid_dir.joinpath(df.iloc[-1]['outputs']['mcorr-output-path'] | ||
) == \ | ||
vid_dir.joinpath( | ||
f'{df.iloc[-1]["uuid"]}-mcorr_els__d1_60_d2_80_d3_1_order_F_frames_2000_.mmap') | ||
# assert vid_dir.joinpath(df.iloc[-1]['outputs']['mcorr-output-path'] | ||
# ) == \ | ||
# vid_dir.joinpath( | ||
# f'{df.iloc[-1]["uuid"]}-mcorr_els__d1_60_d2_80_d3_1_order_F_frames_2000_.mmap') | ||
|
||
# parentdir + df_output_name = get_full_data_path(df_output_name) = parentdir+manual_output_name | ||
# Expected name = uuid+_mean.npy | ||
|
||
#projections | ||
#correlations | ||
|
||
# test to check mmap output path | ||
assert vid_dir.joinpath(df.iloc[-1]['outputs']['mcorr-output-path'] | ||
) == \ | ||
get_full_data_path(df.iloc[-1]['outputs']['mcorr-output-path'] | ||
)== \ | ||
vid_dir.joinpath( | ||
f'{df.iloc[-1]["uuid"]}-mcorr_els__d1_60_d2_80_d3_1_order_F_frames_2000_.mmap') | ||
|
||
# test to check mean-projection output path | ||
assert vid_dir.joinpath(df.iloc[-1]['outputs']['mean-projection-path']) == \ | ||
get_full_data_path(df.iloc[-1]['outputs']['mean-projection-path']) == \ | ||
vid_dir.joinpath( | ||
f'{df.iloc[-1]["uuid"]}_mean.npy') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. append projection, so |
||
|
||
# test to check std-projection output path | ||
assert vid_dir.joinpath(df.iloc[-1]['outputs']['std-projection-path']) == \ | ||
get_full_data_path(df.iloc[-1]['outputs']['std-projection-path']) == \ | ||
vid_dir.joinpath( | ||
f'{df.iloc[-1]["uuid"]}_std.npy') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. append projection |
||
|
||
# test to check max-projection output path | ||
assert vid_dir.joinpath(df.iloc[-1]['outputs']['max-projection-path']) == \ | ||
get_full_data_path(df.iloc[-1]['outputs']['max-projection-path']) == \ | ||
vid_dir.joinpath( | ||
f'{df.iloc[-1]["uuid"]}_max.npy') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. append projection |
||
|
||
# test to check correlation image output path | ||
assert vid_dir.joinpath(df.iloc[-1]['outputs']['corr-img-path']) == \ | ||
get_full_data_path(df.iloc[-1]['outputs']['corr-img-path']) == \ | ||
vid_dir.joinpath( | ||
f'{df.iloc[-1]["uuid"]}_cn.npy') | ||
|
||
|
||
def test_cnmf(): | ||
set_parent_data_path(vid_dir) | ||
|
@@ -223,16 +254,43 @@ def test_cnmf(): | |
# Confirm output path is as expected | ||
assert df.iloc[-1]['outputs']['success'] is True | ||
assert df.iloc[-1]['outputs']['traceback'] is None | ||
|
||
|
||
assert vid_dir.joinpath( | ||
f'{df.iloc[-1]["uuid"]}.hdf5') == \ | ||
get_full_data_path(df.iloc[-1]['outputs']['cnmf-hdf5-path']) == \ | ||
vid_dir.joinpath(df.iloc[-1]['outputs']['cnmf-hdf5-path']) | ||
|
||
# test to check mmap output path | ||
assert vid_dir.joinpath( | ||
f'{df.iloc[-1]["uuid"]}_cnmf-memmap__d1_60_d2_80_d3_1_order_C_frames_2000_.mmap') == \ | ||
get_full_data_path(df.iloc[-1]['outputs']['cnmf-memmap-path']) == \ | ||
vid_dir.joinpath(df.iloc[-1]['outputs']['cnmf-memmap-path'] | ||
) | ||
|
||
assert vid_dir.joinpath( | ||
f'{df.iloc[-1]["uuid"]}.hdf5') == \ | ||
get_full_data_path(df.iloc[-1]['outputs']['cnmf-hdf5-path']) == \ | ||
vid_dir.joinpath(df.iloc[-1]['outputs']['cnmf-hdf5-path']) | ||
# test to check mean-projection output path | ||
assert vid_dir.joinpath(df.iloc[-1]['outputs']['mean-projection-path']) == \ | ||
get_full_data_path(df.iloc[-1]['outputs']['mean-projection-path']) == \ | ||
vid_dir.joinpath( | ||
f'{df.iloc[-1]["uuid"]}_mean.npy') | ||
|
||
# test to check std-projection output path | ||
assert vid_dir.joinpath(df.iloc[-1]['outputs']['std-projection-path']) == \ | ||
get_full_data_path(df.iloc[-1]['outputs']['std-projection-path']) == \ | ||
vid_dir.joinpath( | ||
f'{df.iloc[-1]["uuid"]}_std.npy') | ||
|
||
# test to check max-projection output path | ||
assert vid_dir.joinpath(df.iloc[-1]['outputs']['max-projection-path']) == \ | ||
get_full_data_path(df.iloc[-1]['outputs']['max-projection-path']) == \ | ||
vid_dir.joinpath( | ||
f'{df.iloc[-1]["uuid"]}_max.npy') | ||
|
||
# test to check correlation image output path | ||
assert vid_dir.joinpath(df.iloc[-1]['outputs']['corr-img-path']) == \ | ||
get_full_data_path(df.iloc[-1]['outputs']['corr-img-path']) == \ | ||
vid_dir.joinpath( | ||
f'{df.iloc[-1]["uuid"]}_cn.npy') | ||
|
||
|
||
def test_cnmfe(): | ||
|
@@ -320,6 +378,43 @@ def test_cnmfe(): | |
get_full_data_path(df.iloc[-1]['outputs']['cnmf-memmap-path']) | ||
assert vid_dir.joinpath(f'{df.iloc[-1]["uuid"]}.hdf5') == \ | ||
get_full_data_path(df.iloc[-1]['outputs']['cnmf-hdf5-path']) | ||
|
||
# test to check mmap output path | ||
assert vid_dir.joinpath( | ||
f'{df.iloc[-1]["uuid"]}_cnmf-memmap__d1_60_d2_80_d3_1_order_C_frames_2000_.mmap') == \ | ||
get_full_data_path(df.iloc[-1]['outputs']['cnmf-memmap-path']) == \ | ||
vid_dir.joinpath(df.iloc[-1]['outputs']['cnmf-memmap-path'] | ||
) | ||
|
||
# test to check mean-projection output path | ||
assert vid_dir.joinpath(df.iloc[-1]['outputs']['mean-projection-path']) == \ | ||
get_full_data_path(df.iloc[-1]['outputs']['mean-projection-path']) == \ | ||
vid_dir.joinpath( | ||
f'{df.iloc[-1]["uuid"]}_mean.npy') | ||
|
||
# test to check std-projection output path | ||
assert vid_dir.joinpath(df.iloc[-1]['outputs']['std-projection-path']) == \ | ||
get_full_data_path(df.iloc[-1]['outputs']['std-projection-path']) == \ | ||
vid_dir.joinpath( | ||
f'{df.iloc[-1]["uuid"]}_std.npy') | ||
|
||
# test to check max-projection output path | ||
assert vid_dir.joinpath(df.iloc[-1]['outputs']['max-projection-path']) == \ | ||
get_full_data_path(df.iloc[-1]['outputs']['max-projection-path']) == \ | ||
vid_dir.joinpath( | ||
f'{df.iloc[-1]["uuid"]}_max.npy') | ||
|
||
# test to check correlation image output path | ||
assert vid_dir.joinpath(df.iloc[-1]['outputs']['corr-img-path']) == \ | ||
get_full_data_path(df.iloc[-1]['outputs']['corr-img-path']) == \ | ||
vid_dir.joinpath( | ||
f'{df.iloc[-1]["uuid"]}_cn.npy') | ||
|
||
# test to check pnr image output path | ||
assert vid_dir.joinpath(df.iloc[-1]['outputs']['pnr-image-path']) == \ | ||
get_full_data_path(df.iloc[-1]['outputs']['pnr-image-path']) == \ | ||
vid_dir.joinpath( | ||
f'{df.iloc[-1]["uuid"]}_pn.npy') | ||
|
||
|
||
def test_remove_item(): | ||
|
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.
remove these commented lines