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

Add spade shape #225

Merged
merged 7 commits into from
Oct 5, 2024
Merged

Add spade shape #225

merged 7 commits into from
Oct 5, 2024

Conversation

kunxianhuang
Copy link
Contributor

@kunxianhuang kunxianhuang commented Sep 23, 2024

Fixes #163

Describe your changes

Add spade shape

Checklist

  • Test cases have been modified/added to cover any code changes.
  • Docstrings have been modified/created for any code changes.
  • All linting and formatting checks pass (see the contributing guidelines for more information).
  • If you added a new dataset or shape, please comment on which datasets worked best for your shape or which shapes worked best for your dataset and provide the GIFs for those here.

@github-actions github-actions bot added the shapes Work relating to shapes module label Sep 23, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congratulations on making your first pull request to Data Morph! Please familiarize yourself with the contributing guidelines, if you haven't already.

Copy link

codecov bot commented Sep 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.47%. Comparing base (51b8d26) to head (849b16b).
Report is 25 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #225      +/-   ##
==========================================
+ Coverage   98.42%   98.47%   +0.04%     
==========================================
  Files          43       43              
  Lines        1775     1832      +57     
  Branches      358      357       -1     
==========================================
+ Hits         1747     1804      +57     
  Misses         25       25              
  Partials        3        3              
Files with missing lines Coverage Δ
src/data_morph/shapes/factory.py 100.00% <ø> (ø)
src/data_morph/shapes/points.py 100.00% <100.00%> (ø)
tests/shapes/test_points.py 100.00% <100.00%> (ø)

@stefmolin stefmolin added this to the 0.3.0 milestone Sep 25, 2024
@stefmolin stefmolin changed the title add spade codes Add spade shape Sep 27, 2024
Copy link
Owner

@stefmolin stefmolin left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, @kunxianhuang! I pushed some changes to clean things up after working with the code from the other PR. Can you please add a test class for the spade?

You can start from what was in #195:

class TestSpade(PointsModuleTestBase):
"""Test the Spade class."""
shape_name = 'spade'
distance_test_cases = [
[(20.02810385, 75.43271708), 0],
[(29.90222827231392, 63.4652469587905), 0],
[(19.52424889753761, 60.33944515816489), 0],
[(20, 75), 0.2214756],
]

src/data_morph/shapes/points.py Outdated Show resolved Hide resolved
@github-actions github-actions bot added the testing Relating to the testing suite label Oct 1, 2024
@github-actions github-actions bot removed the testing Relating to the testing suite label Oct 1, 2024
@github-actions github-actions bot added the testing Relating to the testing suite label Oct 5, 2024
Copy link
Owner

@stefmolin stefmolin left a comment

Choose a reason for hiding this comment

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

Thanks for your help with this one @kunxianhuang!

@stefmolin stefmolin merged commit 5726e35 into stefmolin:main Oct 5, 2024
19 checks passed
@stefmolin stefmolin mentioned this pull request Oct 5, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
shapes Work relating to shapes module testing Relating to the testing suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add spade target shape
2 participants