Skip to content
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: s3 data validation: setup allure and bugfixes for previous s3 data validation PR bugs #237

Merged
merged 89 commits into from
Sep 5, 2024

Conversation

daniel-ji
Copy link
Contributor

@daniel-ji daniel-ji commented Aug 30, 2024

setup allure

  • add script to run allure tests
  • add allure titles to everything (and make test names consistent)
  • add documentation on how to run allure tests

small fixes

  • various, small, non-breaking fixes / renames
  • clean up type hints

actually modified tests in this PR (not just some name refactors, like many of the modified lines in this PR):

  • restrain segmentation mask ZARR to only np.int8 (utz fixed all of them to be int8 only, no more float32)
    • Thank you Utz!
    • note mrc is still not yet fixed yet
  • Delete a voxel spacing test (that checks to make sure our voxel spacing folders are named correctly) that is now covered by the fact that voxel spacings are stored as strings, so we will preserve the voxel spacing folder and ensure it is 3 decimal digits

…i/s3-data-validation-dataset-deposition-photos
…i/s3-data-validation-dataset-deposition-photos
… into daniel-ji/s3-data-validation-frames-gains
@daniel-ji daniel-ji changed the base branch from main to daniel-ji/s3-data-validation-tomograms-voxels August 30, 2024 07:35
@daniel-ji daniel-ji changed the base branch from daniel-ji/s3-data-validation-tomograms-voxels to daniel-ji/s3-data-validation-cli-improvements August 30, 2024 07:36
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just code cleanup here

return tentatives


def voxel_spacings(voxel_spacing_files: List[str]) -> List[float]:
def voxel_spacings(voxel_spacing_files: List[str]) -> List[str]:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

voxel spacings are going to be kept as strings, because we want to preserve the folder name (and ensure it's exactly 3 digits of precision)

allure.dynamic.feature(f"Run {item.callspec.params['run_name']}")
if "dataset" in item.fixturenames:
allure.dynamic.epic(f"Dataset {pytest.dataset}")
yield
Copy link
Contributor Author

@daniel-ji daniel-ji Aug 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, all of the past code be just simplified to this, which is doing the same thing 😅

action="store",
default=".",
)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleting things that were never used

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just renaming *_header functions & fixtures to _metadata, as per discussion with @manasaV3

if len(refined_files) == 0 and len(files) != 0:
pytest.skip(f"No frame files in frames directory: {frames_dir}")

return refined_files
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skip checks related to the frames files, if there's no frame files (and only gain files) in the Frames/ folder

@daniel-ji daniel-ji changed the title s3 data validation: setup allure and bugfixes for previous s3 data validation PR bugs feat: s3 data validation: setup allure and bugfixes for previous s3 data validation PR bugs Sep 3, 2024
@@ -86,7 +77,7 @@ def run_spacing_combinations(
for run in run_names:
for vs in voxel_spacings:
if f"{bucket}/{dataset}/{run}/Tomograms/VoxelSpacing{vs}" in voxel_spacing_files:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this could be "{bucket}/{dataset}/{run}/Tomograms/VoxelSpacing{vs:.3f}". It would fix the precision at 3 for the float.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking we could collect everything here (even the non-3f ones) and then in the voxel spacings test, we would confirm this?

Base automatically changed from daniel-ji/s3-data-validation-cli-improvements to main September 5, 2024 00:24
@daniel-ji daniel-ji merged commit 5082f14 into main Sep 5, 2024
6 checks passed
@daniel-ji daniel-ji deleted the daniel-ji/s3-data-validation-allure branch September 5, 2024 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants