Skip to content

Conversation

moellep
Copy link
Collaborator

@moellep moellep commented Sep 5, 2025

I need to add some test cases, but this is ready for a draft review.

@moellep moellep requested a review from robnagler September 5, 2025 23:09
Copy link
Collaborator

@robnagler robnagler left a comment

Choose a reason for hiding this comment

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

I made all these comments so I'm sending them. After this, I'm going to commit my changes to this branch, and I'll need you to get it working. There should be a test.

@moellep moellep requested a review from robnagler September 16, 2025 21:02
import h5py

i = _imageset()
with pkio.save_chdir(pkunit.work_dir()) as w:
Copy link
Collaborator

Choose a reason for hiding this comment

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

save_chdir_work() which empties the directory first



def test_imageset_save_to_file():
from glob import glob
Copy link
Collaborator

Choose a reason for hiding this comment

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

generally we just import glob, which is the module, but since you already import pkio. just use pkoio.sorted_glob

:license: http://www.apache.org/licenses/LICENSE-2.0.html
"""

from pykern import pkunit
Copy link
Collaborator

Choose a reason for hiding this comment

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

generally we don't import it here just out of formality so that all tests defer imports, which can be very important.

[3, 5, 7.5, 3],
)
pkunit.pkeq(round(f.x.fit.results.sig, 2), 0.53)
pkunit.pkeq([round(v, 2) for v in f.x.fit.fit_line], [0.5, 2.5, 12.5, 2.5, 0.5])
Copy link
Collaborator

Choose a reason for hiding this comment

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

this probably should be returned in i

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