Skip to content

Line limits assertion fix#248

Closed
nkorinek wants to merge 55 commits intoearthlab:masterfrom
nkorinek:regression-asssert
Closed

Line limits assertion fix#248
nkorinek wants to merge 55 commits intoearthlab:masterfrom
nkorinek:regression-asssert

Conversation

@nkorinek
Copy link
Contributor

@nkorinek nkorinek commented Apr 13, 2020

Changed how the limits of a plotted line are checked to make it more generous for small mistakes.
addresses: #235

nkorinek and others added 30 commits February 6, 2020 15:04
Update setuptools from 42.0.2 to 45.2.0 (earthlab#190)
raster inherits from vector rather than base (earthlab#76)
Allow geodataframes in assert_polygons (earthlab#188)
Add Assert points function & cleanup duplicate methods (earthlab#203)
Update pytest from 5.3.5 to 5.4.1
Add tests to the Autograde module (earthlab#224)
* First draft of get_images function

* Added a test for get_image

* Changelog update

* minor formatting change.

* black changes

* fixing a few syntax errors

* Update matplotcheck/raster.py

Co-Authored-By: Leah Wasser <leah.wasser@colorado.edu>

* remove tabls

Co-authored-by: Nathan Korinek <nako1890@colorado.edu>
* add flake 8

* yay cleanup

* update change log

* add flake 8 dep

* autograde flake8 fixes

* Fixed base to be flake8 compliant (phew)

* more line length issues

* Made folium.py flake8 compliant

* made notebook.py flake8 compliant

* Fixed raster.py for flake8

* Fixed timeseries.py

* fixed conftest.py

* fixed test_base.py

* fixed test_base_axis.py

* fixed text_base_data.py

* fixed test_base_legends.py

* fixed test_base_titles_captions.py

* Format files to be flake8 acceptable (earthlab#197)

* autograde flake8 fixes

* Fixed base to be flake8 compliant (phew)

* Made folium.py flake8 compliant

* made notebook.py flake8 compliant

* Fixed raster.py for flake8

* Fixed timeseries.py

* fixed conftest.py

* fixed test_base.py

* Fixed test_raster.py and issue with legends tests

* black

* more black changes

* Fixing merge conflicts that were found

* Changing accepted changes

* minor changes

* Changing to make CI happy, modified to pass black and make -B docs

* Reformatting to make black and flake8 happy. Also updated crs assignment

* Fixed formatting issue with timeseries

* Better fix for timeseries formatting

* Black

Co-authored-by: Leah Wasser <leah.wasser@colorado.edu>
* Made it so that assert_string_contains accepts key words with spaces

* black

* renaming function

* Showed assert_title_contains working with a space in the keyword in vignette
* Update codecov from 2.0.15 to 2.0.16

* update from master (earthlab#211)

* Add flake8 fix [WIP] (earthlab#199)

* add flake 8

* yay cleanup

* update change log

* add flake 8 dep

* autograde flake8 fixes

* Fixed base to be flake8 compliant (phew)

* more line length issues

* Made folium.py flake8 compliant

* made notebook.py flake8 compliant

* Fixed raster.py for flake8

* Fixed timeseries.py

* fixed conftest.py

* fixed test_base.py

* fixed test_base_axis.py

* fixed text_base_data.py

* fixed test_base_legends.py

* fixed test_base_titles_captions.py

* Format files to be flake8 acceptable (earthlab#197)

* autograde flake8 fixes

* Fixed base to be flake8 compliant (phew)

* Made folium.py flake8 compliant

* made notebook.py flake8 compliant

* Fixed raster.py for flake8

* Fixed timeseries.py

* fixed conftest.py

* fixed test_base.py

* Fixed test_raster.py and issue with legends tests

* black

* more black changes

* Fixing merge conflicts that were found

* Changing accepted changes

* minor changes

* Changing to make CI happy, modified to pass black and make -B docs

* Reformatting to make black and flake8 happy. Also updated crs assignment

* Fixed formatting issue with timeseries

* Better fix for timeseries formatting

* Black

Co-authored-by: Leah Wasser <leah.wasser@colorado.edu>

* Assert string accept spaces (earthlab#205)

* Made it so that assert_string_contains accepts key words with spaces

* black

* renaming function

* Showed assert_title_contains working with a space in the keyword in vignette

Co-authored-by: Nathan Korinek <nako1890@colorado.edu>

Co-authored-by: Leah Wasser <leah.wasser@colorado.edu>
Co-authored-by: Nathan Korinek <nako1890@colorado.edu>
* Added contributor rst file and moved that information out of the README file

* Implemented requested changes to README
* Added a get_points() and assert_points() function to the vector tester.

* Added in get_points() and assert_points() functions with tests

* Added proper documentation

* Small fix to please codacy

* black

* Updated changelog

* Rough draft for bug fix

* Fixed bug with multiple geometries plotted alongside bug with identical x values causing failure!

* typo

* Fixed small bug with markersize

* Added comments explaining code

* Taking out redundant tests

* Typo

* Fixing how vector checks for truth value of a dataframe
@lwasser lwasser changed the title Line limits assertion fix [WIP] Line limits assertion fix Apr 23, 2020
Leah Wasser added 3 commits April 23, 2020 14:25
@lwasser
Copy link

lwasser commented Apr 27, 2020

@nkorinek are you still working on this guy? is it ready to merge if CI passes or is it a WIP?

@nkorinek
Copy link
Contributor Author

@lwasser fixing a bug with this right now, once I push up the changes it should be good to go

@nkorinek
Copy link
Contributor Author

@lwasser did more testing on this and it should be good to merge once that issue with CI is fixed

@nkorinek nkorinek changed the title [WIP] Line limits assertion fix Line limits assertion fix Apr 27, 2020
@lwasser
Copy link

lwasser commented Apr 27, 2020

thank you @nkorinek i'm going to give filipe a day or two to respond... and if he doesn't i'll come up with plan b :) but i suspect he will give me some suggestions regarding things to try!!

flag_exist = True
line_x_vals = [coord[0] for coord in path_verts]
if min(line_x_vals) <= min_val and max(line_x_vals) >= max_val:
if (
Copy link

Choose a reason for hiding this comment

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

@nkorinek can you please add a comment here that explains how this fixes this issue. i understand the issue at a high level. so what if the data have a few extreme edge cases outlier points. and the regression line only fits to 3/4 of the data or 1/2 of the data. will this fail? i think i just need a bit more clarification

did we discuss making the data limits of a line optional? that could be something else to consider OR creating a regression line and provided it to the method. i just want to talk this through a bit more so i understand and i want the code to have a comment for the same reason. thank you again!

Copy link

@lwasser lwasser left a comment

Choose a reason for hiding this comment

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

i have a question about how the data lims are tested here! ALso we have change log issues now. as always :)

nkorinek and others added 2 commits May 1, 2020 11:49
* Update setuptools from 42.0.2 to 45.2.0 (earthlab#190)

* raster inherits from vector rather than base (earthlab#76)

* Allow geodataframes in assert_polygons (earthlab#188)

* fixing a few syntax errors (earthlab#194)

* First draft of get_images function

* Added a test for get_image

* Changelog update

* minor formatting change.

* black changes

* fixing a few syntax errors

* Update matplotcheck/raster.py

Co-Authored-By: Leah Wasser <leah.wasser@colorado.edu>

* remove tabls

Co-authored-by: Nathan Korinek <nako1890@colorado.edu>

* update changelog for release

* Bump version: 0.1.1 → 0.1.2

* Add flake8 fix [WIP] (earthlab#199)

* add flake 8

* yay cleanup

* update change log

* add flake 8 dep

* autograde flake8 fixes

* Fixed base to be flake8 compliant (phew)

* more line length issues

* Made folium.py flake8 compliant

* made notebook.py flake8 compliant

* Fixed raster.py for flake8

* Fixed timeseries.py

* fixed conftest.py

* fixed test_base.py

* fixed test_base_axis.py

* fixed text_base_data.py

* fixed test_base_legends.py

* fixed test_base_titles_captions.py

* Format files to be flake8 acceptable (earthlab#197)

* autograde flake8 fixes

* Fixed base to be flake8 compliant (phew)

* Made folium.py flake8 compliant

* made notebook.py flake8 compliant

* Fixed raster.py for flake8

* Fixed timeseries.py

* fixed conftest.py

* fixed test_base.py

* Fixed test_raster.py and issue with legends tests

* black

* more black changes

* Fixing merge conflicts that were found

* Changing accepted changes

* minor changes

* Changing to make CI happy, modified to pass black and make -B docs

* Reformatting to make black and flake8 happy. Also updated crs assignment

* Fixed formatting issue with timeseries

* Better fix for timeseries formatting

* Black

Co-authored-by: Leah Wasser <leah.wasser@colorado.edu>

* Assert string accept spaces (earthlab#205)

* Made it so that assert_string_contains accepts key words with spaces

* black

* renaming function

* Showed assert_title_contains working with a space in the keyword in vignette

* Update codecov to 2.0.16 (earthlab#202)

* Update codecov from 2.0.15 to 2.0.16

* update from master (earthlab#211)

* Add flake8 fix [WIP] (earthlab#199)

* add flake 8

* yay cleanup

* update change log

* add flake 8 dep

* autograde flake8 fixes

* Fixed base to be flake8 compliant (phew)

* more line length issues

* Made folium.py flake8 compliant

* made notebook.py flake8 compliant

* Fixed raster.py for flake8

* Fixed timeseries.py

* fixed conftest.py

* fixed test_base.py

* fixed test_base_axis.py

* fixed text_base_data.py

* fixed test_base_legends.py

* fixed test_base_titles_captions.py

* Format files to be flake8 acceptable (earthlab#197)

* autograde flake8 fixes

* Fixed base to be flake8 compliant (phew)

* Made folium.py flake8 compliant

* made notebook.py flake8 compliant

* Fixed raster.py for flake8

* Fixed timeseries.py

* fixed conftest.py

* fixed test_base.py

* Fixed test_raster.py and issue with legends tests

* black

* more black changes

* Fixing merge conflicts that were found

* Changing accepted changes

* minor changes

* Changing to make CI happy, modified to pass black and make -B docs

* Reformatting to make black and flake8 happy. Also updated crs assignment

* Fixed formatting issue with timeseries

* Better fix for timeseries formatting

* Black

Co-authored-by: Leah Wasser <leah.wasser@colorado.edu>

* Assert string accept spaces (earthlab#205)

* Made it so that assert_string_contains accepts key words with spaces

* black

* renaming function

* Showed assert_title_contains working with a space in the keyword in vignette

Co-authored-by: Nathan Korinek <nako1890@colorado.edu>

Co-authored-by: Leah Wasser <leah.wasser@colorado.edu>
Co-authored-by: Nathan Korinek <nako1890@colorado.edu>

* Contributors update (earthlab#213)

* Added contributor rst file and moved that information out of the README file

* Implemented requested changes to README

* Update setuptools from 45.2.0 to 46.0.0 (earthlab#215)

* Update pytest from 5.3.5 to 5.4.1

* Add Assert points function & cleanup duplicate methods (earthlab#203)

* Added a get_points() and assert_points() function to the vector tester.

* Added in get_points() and assert_points() functions with tests

* Added proper documentation

* Small fix to please codacy

* black

* Updated changelog

* Rough draft for bug fix

* Fixed bug with multiple geometries plotted alongside bug with identical x values causing failure!

* typo

* Fixed small bug with markersize

* Added comments explaining code

* Taking out redundant tests

* Typo

* Fixing how vector checks for truth value of a dataframe

* merge

* Additional vector tests (earthlab#212)

* Added a get_points() and assert_points() function to the vector tester.

* Added in get_points() and assert_points() functions with tests

* Added proper documentation

* Small fix to please codacy

* black

* Updated changelog

* First round of tests for vector

* black

* Rough draft for bug fix

* Fixed bug with multiple geometries plotted alongside bug with identical x values causing failure!

* typo

* Fixed small bug with markersize

* Added comments explaining code

* rough drafts of more tests

* Added more tests for legends

* Added more tests, and took out broken tests

* small codacy fix

* Fixed test!

* Taking out redundant tests

* Took out unneccesary tests

* Added plt.close

* Added more tests

* Typo

* more tests for uncovered parts of the vector file

* black

* Fixed issues with vector checking truth value of dataframe, and added tests

* Fixing how vector checks for truth value of a dataframe

* Added more coverage!

* Broke tests up into individual files

* black

* Added tests for outlier cases

* Update matplotcheck/tests/test_points.py

typo

Co-Authored-By: Leah Wasser <leah.wasser@colorado.edu>

* took plt.gca() out of tests

* Added changes suggested on GitHub

* Update CHANGELOG.md

* fix import order

* import order fix

* import order

* import order

Co-authored-by: Leah Wasser <leah.wasser@colorado.edu>

* Add tests to the Autograde module (earthlab#224)

* Added tests for the autograde module

* removed unneccesary import

* Fixing issues that were failing in base_data

* codacy

* flake8

* Update matplotcheck/tests/test_autograde.py

Co-Authored-By: Leah Wasser <leah.wasser@colorado.edu>

* Update matplotcheck/tests/test_autograde.py

Co-Authored-By: Leah Wasser <leah.wasser@colorado.edu>

* Update matplotcheck/tests/test_autograde.py

Co-Authored-By: Leah Wasser <leah.wasser@colorado.edu>

* Update matplotcheck/tests/test_autograde.py

Co-Authored-By: Leah Wasser <leah.wasser@colorado.edu>

* Update matplotcheck/tests/test_autograde.py

Co-Authored-By: Leah Wasser <leah.wasser@colorado.edu>

* Updated changelog

* flake8 fix

Co-authored-by: Leah Wasser <leah.wasser@colorado.edu>

* Hist bin midpoints (earthlab#204)

* Add a get and assert function for bin midpoints, as well as tests for those functions

* Updated docstrings

* Added changelog changes and fixed minor formatting issue

* small flake8 fix

* Added midpoints functionatlity to the vignette for histogram testing

* Adding in changes suggested on GitHub1

* Fixed function description

* Took out all instances of  in example

* update docs

* Fixed small bug with section titles

* Update matplotcheck/tests/test_base_data.py

* reworded changelog

Co-authored-by: Leah Wasser <leah.wasser@colorado.edu>

* Update setuptools from 46.1.1 to 46.1.3 (earthlab#231)

* Title assert accepts strings (earthlab#229)

* Fixed assert_title_contains to take strings as well as lists

* Better implementation

* Changelog update

Co-authored-by: Leah Wasser <leah.wasser@colorado.edu>

* M2r remove (earthlab#247)

* Removed m2r from matplotcheck, and reformated code of conduct

* Seeing if rebase works

* removed an m2r import

* Fixing up the docs a bit

* changelog updates

* # This is a combination of 2 commits.
# This is the 1st commit message:

Update setuptools from 42.0.2 to 45.2.0 (earthlab#190)

raster inherits from vector rather than base (earthlab#76)

Allow geodataframes in assert_polygons (earthlab#188)

fixing a few syntax errors (earthlab#194)

* First draft of get_images function

* Added a test for get_image

* Changelog update

* minor formatting change.

* black changes

* fixing a few syntax errors

* Update matplotcheck/raster.py

Co-Authored-By: Leah Wasser <leah.wasser@colorado.edu>

* remove tabls

Co-authored-by: Nathan Korinek <nako1890@colorado.edu>

update changelog for release

Bump version: 0.1.1 → 0.1.2

Add flake8 fix [WIP] (earthlab#199)

* add flake 8

* yay cleanup

* update change log

* add flake 8 dep

* autograde flake8 fixes

* Fixed base to be flake8 compliant (phew)

* more line length issues

* Made folium.py flake8 compliant

* made notebook.py flake8 compliant

* Fixed raster.py for flake8

* Fixed timeseries.py

* fixed conftest.py

* fixed test_base.py

* fixed test_base_axis.py

* fixed text_base_data.py

* fixed test_base_legends.py

* fixed test_base_titles_captions.py

* Format files to be flake8 acceptable (earthlab#197)

* autograde flake8 fixes

* Fixed base to be flake8 compliant (phew)

* Made folium.py flake8 compliant

* made notebook.py flake8 compliant

* Fixed raster.py for flake8

* Fixed timeseries.py

* fixed conftest.py

* fixed test_base.py

* Fixed test_raster.py and issue with legends tests

* black

* more black changes

* Fixing merge conflicts that were found

* Changing accepted changes

* minor changes

* Changing to make CI happy, modified to pass black and make -B docs

* Reformatting to make black and flake8 happy. Also updated crs assignment

* Fixed formatting issue with timeseries

* Better fix for timeseries formatting

* Black

Co-authored-by: Leah Wasser <leah.wasser@colorado.edu>

Assert string accept spaces (earthlab#205)

* Made it so that assert_string_contains accepts key words with spaces

* black

* renaming function

* Showed assert_title_contains working with a space in the keyword in vignette

Update codecov to 2.0.16 (earthlab#202)

* Update codecov from 2.0.15 to 2.0.16

* update from master (earthlab#211)

* Add flake8 fix [WIP] (earthlab#199)

* add flake 8

* yay cleanup

* update change log

* add flake 8 dep

* autograde flake8 fixes

* Fixed base to be flake8 compliant (phew)

* more line length issues

* Made folium.py flake8 compliant

* made notebook.py flake8 compliant

* Fixed raster.py for flake8

* Fixed timeseries.py

* fixed conftest.py

* fixed test_base.py

* fixed test_base_axis.py

* fixed text_base_data.py

* fixed test_base_legends.py

* fixed test_base_titles_captions.py

* Format files to be flake8 acceptable (earthlab#197)

* autograde flake8 fixes

* Fixed base to be flake8 compliant (phew)

* Made folium.py flake8 compliant

* made notebook.py flake8 compliant

* Fixed raster.py for flake8

* Fixed timeseries.py

* fixed conftest.py

* fixed test_base.py

* Fixed test_raster.py and issue with legends tests

* black

* more black changes

* Fixing merge conflicts that were found

* Changing accepted changes

* minor changes

* Changing to make CI happy, modified to pass black and make -B docs

* Reformatting to make black and flake8 happy. Also updated crs assignment

* Fixed formatting issue with timeseries

* Better fix for timeseries formatting

* Black

Co-authored-by: Leah Wasser <leah.wasser@colorado.edu>

* Assert string accept spaces (earthlab#205)

* Made it so that assert_string_contains accepts key words with spaces

* black

* renaming function

* Showed assert_title_contains working with a space in the keyword in vignette

Co-authored-by: Nathan Korinek <nako1890@colorado.edu>

Co-authored-by: Leah Wasser <leah.wasser@colorado.edu>
Co-authored-by: Nathan Korinek <nako1890@colorado.edu>

Contributors update (earthlab#213)

* Added contributor rst file and moved that information out of the README file

* Implemented requested changes to README

Update setuptools from 45.2.0 to 46.0.0 (earthlab#215)

Add Assert points function & cleanup duplicate methods (earthlab#203)

* Added a get_points() and assert_points() function to the vector tester.

* Added in get_points() and assert_points() functions with tests

* Added proper documentation

* Small fix to please codacy

* black

* Updated changelog

* Rough draft for bug fix

* Fixed bug with multiple geometries plotted alongside bug with identical x values causing failure!

* typo

* Fixed small bug with markersize

* Added comments explaining code

* Taking out redundant tests

* Typo

* Fixing how vector checks for truth value of a dataframe

Update pytest from 5.3.5 to 5.4.1

merge

Additional vector tests (earthlab#212)

* Added a get_points() and assert_points() function to the vector tester.

* Added in get_points() and assert_points() functions with tests

* Added proper documentation

* Small fix to please codacy

* black

* Updated changelog

* First round of tests for vector

* black

* Rough draft for bug fix

* Fixed bug with multiple geometries plotted alongside bug with identical x values causing failure!

* typo

* Fixed small bug with markersize

* Added comments explaining code

* rough drafts of more tests

* Added more tests for legends

* Added more tests, and took out broken tests

* small codacy fix

* Fixed test!

* Taking out redundant tests

* Took out unneccesary tests

* Added plt.close

* Added more tests

* Typo

* more tests for uncovered parts of the vector file

* black

* Fixed issues with vector checking truth value of dataframe, and added tests

* Fixing how vector checks for truth value of a dataframe

* Added more coverage!

* Broke tests up into individual files

* black

* Added tests for outlier cases

* Update matplotcheck/tests/test_points.py

typo

Co-Authored-By: Leah Wasser <leah.wasser@colorado.edu>

* took plt.gca() out of tests

* Added changes suggested on GitHub

* Update CHANGELOG.md

* fix import order

* import order fix

* import order

* import order

Co-authored-by: Leah Wasser <leah.wasser@colorado.edu>

Add tests to the Autograde module (earthlab#224)

* Added tests for the autograde module

* removed unneccesary import

* Fixing issues that were failing in base_data

* codacy

* flake8

* Update matplotcheck/tests/test_autograde.py

Co-Authored-By: Leah Wasser <leah.wasser@colorado.edu>

* Update matplotcheck/tests/test_autograde.py

Co-Authored-By: Leah Wasser <leah.wasser@colorado.edu>

* Update matplotcheck/tests/test_autograde.py

Co-Authored-By: Leah Wasser <leah.wasser@colorado.edu>

* Update matplotcheck/tests/test_autograde.py

Co-Authored-By: Leah Wasser <leah.wasser@colorado.edu>

* Update matplotcheck/tests/test_autograde.py

Co-Authored-By: Leah Wasser <leah.wasser@colorado.edu>

* Updated changelog

* flake8 fix

Co-authored-by: Leah Wasser <leah.wasser@colorado.edu>

Hist bin midpoints (earthlab#204)

* Add a get and assert function for bin midpoints, as well as tests for those functions

* Updated docstrings

* Added changelog changes and fixed minor formatting issue

* small flake8 fix

* Added midpoints functionatlity to the vignette for histogram testing

* Adding in changes suggested on GitHub1

* Fixed function description

* Took out all instances of  in example

* update docs

* Fixed small bug with section titles

* Update matplotcheck/tests/test_base_data.py

* reworded changelog

Co-authored-by: Leah Wasser <leah.wasser@colorado.edu>

Update setuptools from 46.1.1 to 46.1.3 (earthlab#231)

Title assert accepts strings (earthlab#229)

* Fixed assert_title_contains to take strings as well as lists

* Better implementation

* Changelog update

Co-authored-by: Leah Wasser <leah.wasser@colorado.edu>

M2r remove (earthlab#247)

* Removed m2r from matplotcheck, and reformated code of conduct

* Seeing if rebase works

* removed an m2r import

* Fixing up the docs a bit

* changelog updates

Allow geodataframes in assert_polygons (earthlab#188)

fixing a few syntax errors (earthlab#194)

* First draft of get_images function

* Added a test for get_image

* Changelog update

* minor formatting change.

* black changes

* fixing a few syntax errors

* Update matplotcheck/raster.py

Co-Authored-By: Leah Wasser <leah.wasser@colorado.edu>

* remove tabls

Co-authored-by: Nathan Korinek <nako1890@colorado.edu>

Get images function (earthlab#193)

* First draft of get_images function

* Added a test for get_image

* Changelog update

* minor formatting change.

* black changes

* Update matplotcheck/raster.py

Co-Authored-By: Leah Wasser <leah.wasser@colorado.edu>

Co-authored-by: Leah Wasser <leah.wasser@colorado.edu>

Bump version: 0.1.1 → 0.1.2

Add flake8 fix [WIP] (earthlab#199)

* add flake 8

* yay cleanup

* update change log

* add flake 8 dep

* autograde flake8 fixes

* Fixed base to be flake8 compliant (phew)

* more line length issues

* Made folium.py flake8 compliant

* made notebook.py flake8 compliant

* Fixed raster.py for flake8

* Fixed timeseries.py

* fixed conftest.py

* fixed test_base.py

* fixed test_base_axis.py

* fixed text_base_data.py

* fixed test_base_legends.py

* fixed test_base_titles_captions.py

* Format files to be flake8 acceptable (earthlab#197)

* autograde flake8 fixes

* Fixed base to be flake8 compliant (phew)

* Made folium.py flake8 compliant

* made notebook.py flake8 compliant

* Fixed raster.py for flake8

* Fixed timeseries.py

* fixed conftest.py

* fixed test_base.py

* Fixed test_raster.py and issue with legends tests

* black

* more black changes

* Fixing merge conflicts that were found

* Changing accepted changes

* minor changes

* Changing to make CI happy, modified to pass black and make -B docs

* Reformatting to make black and flake8 happy. Also updated crs assignment

* Fixed formatting issue with timeseries

* Better fix for timeseries formatting

* Black

Co-authored-by: Leah Wasser <leah.wasser@colorado.edu>

Contributors update (earthlab#213)

* Added contributor rst file and moved that information out of the README file

* Implemented requested changes to README

Add Assert points function & cleanup duplicate methods (earthlab#203)

* Added a get_points() and assert_points() function to the vector tester.

* Added in get_points() and assert_points() functions with tests

* Added proper documentation

* Small fix to please codacy

* black

* Updated changelog

* Rough draft for bug fix

* Fixed bug with multiple geometries plotted alongside bug with identical x values causing failure!

* typo

* Fixed small bug with markersize

* Added comments explaining code

* Taking out redundant tests

* Typo

* Fixing how vector checks for truth value of a dataframe

Additional vector tests (earthlab#212)

* Added a get_points() and assert_points() function to the vector tester.

* Added in get_points() and assert_points() functions with tests

* Added proper documentation

* Small fix to please codacy

* black

* Updated changelog

* First round of tests for vector

* black

* Rough draft for bug fix

* Fixed bug with multiple geometries plotted alongside bug with identical x values causing failure!

* typo

* Fixed small bug with markersize

* Added comments explaining code

* rough drafts of more tests

* Added more tests for legends

* Added more tests, and took out broken tests

* small codacy fix

* Fixed test!

* Taking out redundant tests

* Took out unneccesary tests

* Added plt.close

* Added more tests

* Typo

* more tests for uncovered parts of the vector file

* black

* Fixed issues with vector checking truth value of dataframe, and added tests

* Fixing how vector checks for truth value of a dataframe

* Added more coverage!

* Broke tests up into individual files

* black

* Added tests for outlier cases

* Update matplotcheck/tests/test_points.py

typo

Co-Authored-By: Leah Wasser <leah.wasser@colorado.edu>

* took plt.gca() out of tests

* Added changes suggested on GitHub

* Update CHANGELOG.md

* fix import order

* import order fix

* import order

* import order

Co-authored-by: Leah Wasser <leah.wasser@colorado.edu>

# This is the commit message #2:

Update setuptools from 46.1.1 to 46.1.3 (earthlab#231)

* fix copyright on docs (earthlab#244)

* Add pillow (earthlab#254)

* add pillow as a dev requirement

* update for pillow addition

* Changed the changelog to an rst file instead of a markdown file and added it to the docs build.

* Put changelog changes into the new changelog lol

Co-authored-by: pyup.io bot <github-bot@pyup.io>
Co-authored-by: Leah Wasser <leah.wasser@colorado.edu>
@lwasser
Copy link

lwasser commented May 4, 2020

ok this guy still needs a bit of love @nkorinek before i can merge it. see my questions above. i know i need to merge this prior to merging the lines vignette so let's focus on this guy first.
update from master and then ofcourse the change log needs an update (md vs rst)

@nkorinek
Copy link
Contributor Author

nkorinek commented May 4, 2020

@lwasser oh sorry! I added a comment in the code, but I'll clarify here as well and see if this is what we want to do.

so what if the data have a few extreme edge cases outlier points. and the regression line only fits to 3/4 of the data or 1/2 of the data. will this fail?

This will not fail in this case. In fact most of the time the line does not cover the entirety of the limits, and will be within the bounds but not close to the x and y limits. It seems to do this on lines that should pass normally, however, so maybe that's why this was done this way before? Originally I had this JUST check if the limits were close to the expected limits, but that broke a lot of the tests, so if it checks that it's either within the limits or very close to the limits that's how I got around that issue. Checking that the line was within the limits is how the check was run before. We could change this check if we wanted to!

did we discuss making the data limits of a line optional? that could be something else to consider

I don't remember discussing this, but we may have discussed it and I just forgot. Either way, it would be fairly simple to add, but I'm not sure why you would turn that check off. The only time I would turn that check off is if the check was failing and it wasn't meant to fail, but hopefully this PR fixes that. Let me know what you think!

@lwasser
Copy link

lwasser commented May 7, 2020

let's just add a few tests to ensure this works in all combinations of points + outlier points

@nkorinek
Copy link
Contributor Author

nkorinek commented May 7, 2020

@lwasser this can be closed due to this pr: #274

@lwasser lwasser closed this May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working high priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants