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
Adding discrete curve test class to Geomstats #1814
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1814 +/- ##
==========================================
- Coverage 91.50% 90.73% -0.76%
==========================================
Files 136 137 +1
Lines 13738 13849 +111
==========================================
- Hits 12569 12565 -4
- Misses 1169 1284 +115
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
review |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
The failure of the GitHub action linting comes from an update on the black package.
|
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.
Very nice! Address my comments and we can try to merge.
|
||
# ------------------------------------------------------------------------------------------------------------------- | ||
|
||
# IMPORTS |
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.
Remove unnecessary comment
from geomstats.geometry.euclidean import Euclidean | ||
|
||
|
||
# CLASS |
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.
Remove unnecessary comment
@@ -0,0 +1,342 @@ | |||
#!/usr/bin/env python |
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.
Format the information at the top of this file: put it in a docstring format, as done in other .py files in geomstats.
|
||
# CLASS | ||
class DiscreteCurveViz: | ||
"""Space of discrete curves sampled at points in ambient_manifold. |
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.
Say """Visualization for the space of..."""
---------- | ||
curve_dimension : Manifold | ||
Manifold in which curves take values. | ||
|
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.
Remove blank line between parameter description, here and everywhere in the docstrings
|
||
|
||
# TESTING | ||
def main(): |
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.
Great example! however, this should go in a notebook or in an separate example file: remove and put in 10_pratical_methods__shape_analysis...
@@ -0,0 +1,90 @@ | |||
"""Unit tests for visualization.""" |
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.
Rename: """Unit tests for visualization of discrete curves."""
Also change the name of file --> test_visualizaztion_discrete_curves.py
|
||
|
||
class TestVisualizationDiscreteCurves(tests.conftest.TestCase): | ||
"""Sjgnfkjgfdnglk.""" |
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.
Change docstring
self.sample_point_index = 2 | ||
|
||
def test_set_curves(self): | ||
"""Sjgnfkjgfdnglk.""" |
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.
Write proper docstring here and everywhere
"""Sjgnfkjgfdnglk.""" | ||
self.dc_viz1.resample(self.adjusted_sampling_points) | ||
|
||
def test_plot_3Dcurves(self): |
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.
test_plot_curves_3d
Checklist
Description
Issue
Additional context