-
Notifications
You must be signed in to change notification settings - Fork 6
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
Simplify package design for label reading #88
Comments
@leewujung Which label reading components are you referring to? I am a bit lost as to what you mean by scaffolding in this context. |
oh sorry, should make it more explicit. Label reading meaning to read EVR or EVL files. Scaffolding is the double layers of objects initiation needed to read these files. |
Oh, I see. Simplifying seems like a lot of changes need to happen in the convert modules. Let's make sure to talk about this in-depth during tomorrow's meeting. |
Yep, it would be quite a bit of change, but I think it may be easiest to just build it from ground up by grabbing the necessary components, instead of trying to modify from the existing structure. Let's definitely talk about this tomorrow -- bring your thoughts! |
I'll add a few tasks needed to complete this task:
|
This will be done in the refactoring, since this heavily coincides with what refactoring is meant to do. |
### Refactoring This PR closes the following issues: #91, #88, #83, #43. **The main folders are now:** - utils - lines - regions2d **As opposed to before:** - utils - convert - formats - mask - plot **Refactoring notes:** - `core.py` contains `read_evl` and `read_evr`. - In both regions2d and lines, plotting is still kept as a class function: `r2d.plot() `and `lines.plot()`. - In both regions2d and lines, masking is still kept as a class function: `r2d.mask() `and `lines.mask()`. - In both regions2d and lines, parsing is kept outside of class: `parse_regions_file(input_file)` and `parse_lines_file(input_file)`. - We now always initialize regions2d and lines with appropriate .evr and .evl functions at initialization ALWAYS. This is enforced with an error if not initialized properly (incorrect .evr or .evl file). **Other Changes Include:** - Added line masking based on Valentina's example notebook with options for what to do with NA values and what interpolation method to use.
The design of the label reading components contains the scaffolding that is too cumbersome for the couple simple geometries we are dealing with (polygons and lines). Let's simply the design to make reading labels into objects more straightforward.
The text was updated successfully, but these errors were encountered: