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

Crop Tests #4268

Merged
merged 12 commits into from
Apr 7, 2021
Merged

Crop Tests #4268

merged 12 commits into from
Apr 7, 2021

Conversation

robotprogrammer22
Copy link
Contributor

Description

Added tests for the crop app.

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation change (update to the documentation; no code change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have read and agree to abide by the Code of Conduct
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have added myself to the .zenodo.json document.
  • I have added any user impacting changes to the CHANGELOG.md document.

Licensing

This project is mostly composed of free and unencumbered software released into the public domain, and we are unlikely to accept contributions that are not also released into the public domain. Somewhere near the top of each file should have these words:

This work is free and unencumbered software released into the public domain. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain.

  • I dedicate any and all copyright interest in this software to the public domain. I make this dedication for the benefit of the public at large and to the detriment of my heirs and successors. I intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

@robotprogrammer22
Copy link
Contributor Author

robotprogrammer22 commented Feb 3, 2021

When I attempt to run the tests, I am getting an error saying "Unable to open image: USER ERROR [LINE] exceeds number of lines in the [FROM] cube." I'm thinking that the line number I am attempting to access from the original test is too big. I tried using both DefaultCube and LargeCube and am getting the same error. To solve this, I wasn't sure if I should change the line numbers in the test, or if I should be using a different cube?

@AustinSanders
Copy link
Contributor

@robotprogrammer22 The LargeCube fixture is 1000x1000 , but you're passing line 2070 as the start line via "line=2070", "nlines=300"

if you want 300 lines, then you'll have to use a starting line <= 700

@AustinSanders
Copy link
Contributor

@robotprogrammer22 It looks like there's still a few tests failing, but overall it looks like this is just about finished. Is this something that you could use some support on, or do you want to try finishing it off on your own?

@robotprogrammer22 robotprogrammer22 marked this pull request as ready for review March 3, 2021 21:51
Copy link
Contributor

@amystamile-usgs amystamile-usgs left a comment

Choose a reason for hiding this comment

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

What you have looks good! It may be worth adding a couple more tests for testing the errors in the crop app.

Also it looks like crop_app_test_tables is failing on Jenkins.

@kaitlyndlee
Copy link
Contributor

Tests are passing. One note about your recently added tests: I think @amystamile-usgs was referring to testing the exceptions that crop throws, but @amystamile-usgs correct me if I am wrong.

@amystamile-usgs
Copy link
Contributor

amystamile-usgs commented Mar 25, 2021

Tests are passing. One note about your recently added tests: I think @amystamile-usgs was referring to testing the exceptions that crop throws, but @amystamile-usgs correct me if I am wrong.

@kaitlyndlee That's right.

Here is an example of a test that checks the exceptions https://github.com/USGS-Astrogeology/ISIS3/blob/aab0e63088046690e6c031881825596c1c2cc380/isis/tests/FunctionalTestsReduce.cpp#L191

@robotprogrammer22
Copy link
Contributor Author

Thanks. I just added some tests for the exceptions.

@amystamile-usgs amystamile-usgs merged commit 2161209 into DOI-USGS:dev Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants