-
Notifications
You must be signed in to change notification settings - Fork 25
Reorganization to Core Structure - Phase 1 #836
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
Conversation
Fix duplicate imports update cli build entry point fix this relative import that didn't seem to get patched. All other similar "form . import X" statements are fine. patch extension installation Fix some ast.Name references to hexrd modules Updated documentation that references old modules
Forgot to add the "hexrd." when I moved this. Replace "/" with "." in C extension path Fix unpickling error in non-Windows env Change to a human readable file_table instead of a pickle object. Also addresses the unpickling issue across platforms. mypy doesn't like the reassignment. hand patches for the preprocess file updates. + slightly more robust module_map Had to add to update module_map to support maintaining all imports. put a TYPE_CHECKING guard around this, so we don't have a circular import These files need to be copied across workflows as well to preserve imports and resolve circular dependencies. Fix the import mapping to allow for unpickling use cases. switch these things to absolute import. Since we are changing the actual depth of these modules, it can cause issues due to the following: * We need to register these modules with the old names as well so that comparisons work correctly * Importlib seems to use the key in sys.modules to determine if a relative import goes "outside of the module" Since we changed things like `hexrd.thing` -> `hexrd.core.thing`. If you think the module is @ `hexrd.thing` and you import `. . .other` it will look like you are escaping the package. (note, number of dots and effective depth depends on what `thing` actually is) Move this __init__ + fix the file_table a bit
Also copied over the detector.py
Reorganization
Also fixed some more imports
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #836 +/- ##
==========================================
+ Coverage 51.31% 55.97% +4.66%
==========================================
Files 143 143
Lines 22545 21960 -585
==========================================
+ Hits 11568 12292 +724
+ Misses 10977 9668 -1309 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
These lines look like they were accidentally added. Signed-off-by: Patrick Avery <[email protected]>
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.
LGTM.
There seem to be a few files where the history might have not been kept (it looks like at least GitHub thinks they are new files, although maybe not git itself). But those files are a small minority.
This also seems to be working fine with HEXRDGUI as things are. I think it is ready.
This is the first phase in migrating the HEXRD library to the Core structure. Here, we reach the end of the second part of Slide 2 in the HEXRD Migration State documentation, following guidance from the good work on sorting the HEXRD functions done by the community's subcommittees.
The result of this effort categorizes the HEXRD codebase into 5 useful high-level workflows:
corehedhedmlauepowderThis reorganization makes it easier for new users of HEXRD to dive into their particular workflow, without having to search through the entire codebase for necessary functions. It also strives to make development contributions easier, by focusing the contributor on just the area that matters for their work.
While we believe we have done our best to work in good faith to adhere to the documented categorization, the development community expects that there will be necessary conversation with the community to make sure everything is in its rightful place before this can be merged.
As well, ensuring that old scripts and workflows that HEXRD users have will still work in the new architecture is presently difficult, considering the limited documented scripts the developers have access to. To that end, before a final merge into
mastercan be conducted, the community will need to provide more examples of how HEXRD is used in real-world scenarios.