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

Planform implementation #82

Merged
merged 16 commits into from
Dec 6, 2021
Merged

Conversation

amoodie
Copy link
Contributor

@amoodie amoodie commented Nov 28, 2021

Development on an implementation for a Planform api consistent with the Section api. Planform inherits dimensions from the underlying data cube. The shoreline-related planforms now subclass from a SpecialtyPlanform which can be used for any planform data that is not just a slice of the cube.

NOTE: this includes a non-breaking change for the cube.show_plan method. Code will still work, but should be updated to use quick_show or show_planform, see below.

Examples:

plan.Planform(cube, t=3e6)
cube.register_planform('final', plan.Planform(idx=-1))
  • The cube.show_planform() method now calls the show() method of the Planform in question.
  • The cube.show_plan() method has been deprecated, and passes arguments along to the new cube.quick_show() method.
  • The new cube.quick_show() method wraps Planform and Section to easily show any straight-line slice from the underlying cube. e.g., cube.quick_show('eta', idx=-1, axis=0) will show a planform from the last index.

todo:

  • documentation in user guide
  • developer documentation on specialty planforms and what needs to be implemented

closes #12

@amoodie amoodie added enhancement New feature or request planform labels Nov 28, 2021
Andrew Moodie added 2 commits November 29, 2021 10:55
…tyPlanform for base class for anythign other than the basic DataPlanform. Both subclass the Base Planform.
@codecov
Copy link

codecov bot commented Dec 1, 2021

Codecov Report

Merging #82 (969e908) into develop (bd5a4df) will increase coverage by 0.60%.
The diff coverage is 78.42%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #82      +/-   ##
===========================================
+ Coverage    87.50%   88.10%   +0.60%     
===========================================
  Files            9        9              
  Lines         2912     3027     +115     
===========================================
+ Hits          2548     2667     +119     
+ Misses         364      360       -4     
Impacted Files Coverage Δ
deltametrics/mask.py 87.91% <ø> (ø)
deltametrics/cube.py 80.06% <44.92%> (+2.01%) ⬆️
deltametrics/plan.py 89.50% <97.43%> (+2.38%) ⬆️
deltametrics/section.py 95.32% <100.00%> (-0.03%) ⬇️
deltametrics/strat.py 87.36% <100.00%> (+1.09%) ⬆️
deltametrics/io.py 89.21% <0.00%> (+0.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bd5a4df...969e908. Read the comment docs.

@amoodie amoodie marked this pull request as ready for review December 3, 2021 20:19
@amoodie amoodie requested a review from elbeejay December 5, 2021 18:35
@amoodie
Copy link
Contributor Author

amoodie commented Dec 5, 2021

@elbeejay non breaking changes, implements the Planform base object, similar to Section API. Some changes to methods and inheritance for the objects, but all non-breaking, I think. Wanted to see if you had interest in looking it over, or not 😬

Copy link
Contributor

@elbeejay elbeejay left a comment

Choose a reason for hiding this comment

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

I've had a cursory look and I like most of the changes. The SpecialtyPlanform in particular seems like a good way to help standardize the different types of planform objects even if it introduces another "object-layer / inheritance-level".

@amoodie
Copy link
Contributor Author

amoodie commented Dec 6, 2021

Cool, ya, I think so too. I guess we'll see how things work out and keep iterating, but that's okay 🤷

thanks for taking a look

@amoodie amoodie merged commit 9b823be into sandpiper-toolchain:develop Dec 6, 2021
@amoodie amoodie deleted the planform branch March 20, 2022 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request planform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

implement the planforms
2 participants