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

Catch and error out if max dist or max dist_list is <=0 for location mods:3d sphere and 3d cartesian #712

Merged
merged 6 commits into from
Aug 29, 2024

Conversation

hkershaw-brown
Copy link
Member

Description:

Catch and error out if max dist or max dist_list is <=0 for location mods:3d sphere and 3d cartesian

There is a test in developer_tests/get_close to show that the <=0 does get caught as an error. I am not sure if it is worth keeping this test.

Fixes issue

Fixes #626

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Documentation changes needed?

  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.

Tests

Please describe any tests you ran to verify your changes.
DART/developer_tests/get_close

Checklist for merging

  • Updated changelog entry
  • Documentation updated
  • Update conf.py

Checklist for release

  • Merge into main
  • Create release from the main branch with appropriate tag
  • Delete feature-branch

Testing Datasets

  • Dataset needed for testing available upon request
  • Dataset download instructions included
  • No dataset needed

Copy link
Contributor

@mjs2369 mjs2369 left a comment

Choose a reason for hiding this comment

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

The code looks and runs good. I've tested the developer tests by executing ./run_all normally and by editing the values for max_dist and max_dists(n) to be 1 so that the tests would fail. They performed as they should, passing with the max_dist variables set to 0 and failing with them set to 1.

I don't know if we keep the developer tests though. They will give us the ability to see if anyone edits the conditionals you put into get_close_init to make sure a maxdist of 0 or less is not passed into the subroutine, but I think we would catch a change that would remove or break those conditionals in code review very easily. And then we're left with several extra files to keep track of in the repo. I'll leave the final decision on that to you.

Approved

This reverts commit 179b869.

these tests are in the history if you need to grab them, but decided
not keep to tests that will never be run again
@hkershaw-brown hkershaw-brown added release! bundle with next release and removed release! bundle with next release labels Aug 23, 2024
@hkershaw-brown hkershaw-brown added the release! bundle with next release label Aug 26, 2024
@hkershaw-brown hkershaw-brown merged commit 6a905aa into main Aug 29, 2024
4 checks passed
@hkershaw-brown hkershaw-brown deleted the fix-get_close_init-0 branch August 29, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release! bundle with next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: passing in 0 for maxdist to get_close_init() results in unintelligible error
2 participants