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

Adding discrete curve test class to Geomstats #1814

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

AlirezaParsay
Copy link
Collaborator

@AlirezaParsay AlirezaParsay commented Jan 30, 2023

Checklist

  • My pull request has a clear and explanatory title.
  • If necessary, my code is vectorized.
  • I added appropriate unit tests.
  • I made sure the code passes all unit tests. (refer to comment below)
  • My PR follows PEP8 guidelines. (refer to comment below)
  • My PR follows geomstats coding style and API.
  • My code is properly documented and I made sure the documentation renders properly. (Link)
  • I linked to issues and PRs that are relevant to this PR.

Description

Issue

Additional context

@codecov
Copy link

codecov bot commented Jan 30, 2023

Codecov Report

Merging #1814 (6f69525) into master (6f37453) will decrease coverage by 0.76%.
The diff coverage is 0.91%.

@@            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     
Flag Coverage Δ
autograd 86.66% <0.91%> (-0.76%) ⬇️
numpy 86.32% <0.91%> (-0.78%) ⬇️
pytorch 79.79% <0.91%> (-0.71%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
geomstats/visualization/discrete_curves.py 0.00% <0.00%> (ø)
geomstats/geometry/discrete_curves.py 92.39% <100.00%> (-0.31%) ⬇️
geomstats/geometry/positive_reals.py 93.48% <0.00%> (-2.17%) ⬇️
geomstats/geometry/stratified/wald_space.py 89.37% <0.00%> (-0.85%) ⬇️
geomstats/learning/expectation_maximization.py 79.89% <0.00%> (-0.55%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@AlirezaParsay
Copy link
Collaborator Author

review

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@ninamiolane
Copy link
Collaborator

ninamiolane commented Feb 15, 2023

The failure of the GitHub action linting comes from an update on the black package.

Copy link
Collaborator

@ninamiolane ninamiolane left a 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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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.
Copy link
Collaborator

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.

Copy link
Collaborator

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():
Copy link
Collaborator

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."""
Copy link
Collaborator

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."""
Copy link
Collaborator

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."""
Copy link
Collaborator

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):
Copy link
Collaborator

Choose a reason for hiding this comment

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

test_plot_curves_3d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants