-
Notifications
You must be signed in to change notification settings - Fork 25
File placement improvements #733
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
File placement improvements #733
Conversation
… on scored_orientations file
|
Hello @donald-e-boyce! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2024-12-11 16:24:01 UTC |
psavery
left a comment
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.
Overall, I think this is a huge improvement! It is much better to contain the logic for files/directories within the config, rather than within the find-orientations and fit-grains functions. I left some comments - they are only minor things.
Can you make sure that the tests pass? It looks like some of the tests are failing, because apparently comparing Path objects with strings always fails (for example, cfg.working_dir == '/some/path' always fails now, because Path('/some/path') != '/some/path').
I think you just need to get the tests to use a Path object now in the comparison, or convert the Path object to str, whichever you prefer.
There are apparently some packaging issues too that I will look over.
|
Thanks Don! The changes look good so far! Now we just need to fix the tests (as mentioned here). |
psavery
left a comment
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.
Looks good to me! I fixed the packaging issues in master (so they won't be an issue after merging).
The intention of this pull request is to make the output file placement in
find-orientationsandfit-grainscleaner and simpler while cleaning up computational code that has hardwired file names and file handling that would be better done elsewhere, i. e. the config module.Roughly, this is what has been done:
analysis_dirinstead of in theworking_dirwith long names based on theanalysis_nameanalysis_nameand automatically create subdirectories as needed for theanalysis_dirYou activate the new file placement with the
new_file_placementkeyword in the root level of the config file, e.g.If the
new_file_placementis False (the default), then nothing is changed; the old file placement is used.Originally, this was intended mainly for
find-orientations, butfit-grainsis slightly affected since it looks for a file written byfind-orientations, i.e. the accepted orientations.Running this on the multiruby and single_GE NIST_Ruby examples, I get the exact same results using the new or the old file placement.