Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
8344d56
Merge pull request #1 from earthlab/master
nkorinek Feb 6, 2020
b87394d
Merge pull request #2 from earthlab/master
nkorinek Feb 12, 2020
7cf2703
Merge pull request #3 from earthlab/master
nkorinek Feb 12, 2020
c4d904e
Merge pull request #4 from earthlab/master
nkorinek Feb 13, 2020
c6deb54
Merge pull request #5 from earthlab/master
nkorinek Feb 13, 2020
30b4aa1
Merge pull request #7 from earthlab/master
nkorinek Feb 17, 2020
6ab2486
Merge pull request #8 from earthlab/master
nkorinek Mar 3, 2020
5077e25
Merge pull request #9 from earthlab/master
nkorinek Mar 7, 2020
4ff1b26
Merge pull request #10 from earthlab/master
nkorinek Mar 11, 2020
de25545
Merge pull request #11 from earthlab/master
nkorinek Mar 19, 2020
2f2f01d
Merge pull request #12 from earthlab/master
nkorinek Mar 19, 2020
031a710
Merge pull request #13 from earthlab/master
nkorinek Mar 20, 2020
7bb3216
Merge pull request #14 from earthlab/master
nkorinek Mar 23, 2020
cd169d3
Merge pull request #15 from earthlab/master
nkorinek Mar 24, 2020
e0e3c34
Merge pull request #16 from earthlab/master
nkorinek Mar 30, 2020
60e57e4
Merge pull request #17 from earthlab/master
nkorinek Apr 6, 2020
5569d18
Merge pull request #18 from earthlab/master
nkorinek Apr 20, 2020
90b8128
Update setuptools from 42.0.2 to 45.2.0 (#190)
pyup-bot Feb 11, 2020
c96321c
raster inherits from vector rather than base (#76)
Feb 12, 2020
8e26cba
Allow geodataframes in assert_polygons (#188)
nkorinek Feb 13, 2020
49c4c24
fixing a few syntax errors (#194)
Feb 13, 2020
da32ef9
update changelog for release
Feb 14, 2020
f842822
Bump version: 0.1.1 → 0.1.2
Feb 14, 2020
eee471f
Add flake8 fix [WIP] (#199)
nkorinek Mar 2, 2020
77e8f76
Assert string accept spaces (#205)
nkorinek Mar 6, 2020
99e961a
Update codecov to 2.0.16 (#202)
pyup-bot Mar 7, 2020
3c37b7d
Contributors update (#213)
nkorinek Mar 10, 2020
d2dfa5a
Update setuptools from 45.2.0 to 46.0.0 (#215)
pyup-bot Mar 10, 2020
6b142e8
Add Assert points function & cleanup duplicate methods (#203)
nkorinek Mar 19, 2020
7ea9490
Update pytest from 5.3.5 to 5.4.1
pyup-bot Mar 13, 2020
a782271
merge
nkorinek Apr 20, 2020
e7b4652
Additional vector tests (#212)
nkorinek Mar 23, 2020
0f2fc16
Add tests to the Autograde module (#224)
nkorinek Mar 24, 2020
27251c3
Hist bin midpoints (#204)
nkorinek Mar 26, 2020
f3c384f
Update setuptools from 46.1.1 to 46.1.3 (#231)
pyup-bot Mar 26, 2020
654b3d1
Title assert accepts strings (#229)
nkorinek Apr 2, 2020
34e20da
M2r remove (#247)
nkorinek Apr 20, 2020
eb4c2d8
merge
nkorinek Apr 20, 2020
3f07d9b
# This is a combination of 2 commits.
pyup-bot Feb 11, 2020
beae1b5
Updating in order to squash commits!
nkorinek Apr 20, 2020
66b8206
fix copyright on docs (#244)
Apr 21, 2020
63fa4e0
Add pillow (#254)
Apr 23, 2020
f52150a
Merge
nkorinek Apr 27, 2020
5f0fd98
Merge branch 'earthlab-master'
nkorinek Apr 27, 2020
efab5a2
Changelog to rst (#267)
nkorinek May 1, 2020
a7dfdc7
setup greetings! (#257)
May 1, 2020
7b887bd
merge
nkorinek May 7, 2020
1a2252a
Merge branch 'earthlab-master'
nkorinek May 7, 2020
d3c1ba6
Add template for PR
May 12, 2020
a850b76
Timeseries tests (#273)
nkorinek May 13, 2020
43bc9cb
Update pytest from 5.4.1 to 5.4.2 (#275)
pyup-bot May 14, 2020
f81f819
remove rebase
May 14, 2020
57646ec
Test coverage for lines (#274)
nkorinek May 14, 2020
9c5facf
merge
nkorinek May 18, 2020
082e0b9
Merge branch 'master' of https://github.com/earthlab/matplotcheck
nkorinek Jun 29, 2020
e2d1abc
Merge branch 'master' of https://github.com/earthlab/matplotcheck
nkorinek Aug 26, 2020
86d2a73
hoping this fixes make docs fails
nkorinek Aug 26, 2020
98f1b70
fixing another bug I think
nkorinek Aug 26, 2020
b9fe17f
made updates to make black happy
nkorinek Aug 26, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Improving the documentation and testing for code already in MatPlotCheck
is a great way to get started if you'd like to make a contribution. Please note
that our documentation files are in
`ReStructuredText (.rst)
<http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>`_
<https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>`_
format and format your pull request
accordingly.

Expand Down
1 change: 0 additions & 1 deletion docs/matplotcheck.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ matplotcheck.vector module
:undoc-members:
:show-inheritance:


Module contents
---------------

Expand Down
5 changes: 3 additions & 2 deletions matplotcheck/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,8 @@ def assert_xlabel_ydata(
if x_is_numeric:
try:
np.testing.assert_array_max_ulp(
np.array(xy_data["x"]), np.array(xy_expected[xcol]),
np.array(xy_data["x"]),
np.array(xy_expected[xcol]),
)
except AssertionError:
raise AssertionError(message)
Expand Down Expand Up @@ -1211,7 +1212,7 @@ def get_num_bins(self):
histogram, this is just the number of bins. If there are two
overlapping or stacked histograms in the same
`matplotlib.axis.Axis` object, then this returns the number of bins
with unique edges. """
with unique edges."""
x_data = self.get_xy()["x"]
unique_x_data = list(set(x_data))
num_bins = len(unique_x_data)
Expand Down
14 changes: 6 additions & 8 deletions matplotcheck/cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ class PlotBasicSuite(object):
ycol: string column title in data_exp that contains yaxis data
plot_type: string from list ["scatter","bar"] of expected plot type
line_types: list of strings. Acceptable strings in line_types are as
follows
["regression", "onetoone"].
if list is empty, assert is passed
follows ["regression", "onetoone"]. If list is empty, assert is passed
xlabels: boolean if using x axis labels rather than x data
lims_equal: boolean expressing if x and y limits are expected to be equal
title_contains: list of lower case strings where each string is expected to
Expand Down Expand Up @@ -140,7 +138,7 @@ def tearDown(self):
self.pt = None

class PlotCaption(unittest.TestCase):
""" Returns a unittest.TestCase containing 1 test for an
"""Returns a unittest.TestCase containing 1 test for an
appropriate caption:

Test 1 - caption_words: caption contains one string from each of
Expand Down Expand Up @@ -479,7 +477,7 @@ def tearDown(self):

@property
def cases(self):
""" Returns a list of TestCases for time series plots.
"""Returns a list of TestCases for time series plots.
Testcase are as follows:
1. LabelsCase: Asserts the title, x-axis label, and y-axis label are
as expected
Expand Down Expand Up @@ -633,7 +631,7 @@ def tearDown(self):

@property
def cases(self):
""" Returns a list of TestCases for spatial vector plots.
"""Returns a list of TestCases for spatial vector plots.
Testcase are as follows:
1. CaptionCase: assert caption is in appropriate location with
strings expressed in caption_contains
Expand Down Expand Up @@ -787,7 +785,7 @@ def tearDown(self):

@property
def cases(self):
""" Returns a list of TestCases for spatial raster plots.
"""Returns a list of TestCases for spatial raster plots.
Testcase are as follows:
1. CaptionCase: assert caption is in appropriate location with
strings expressed in caption_strings
Expand Down Expand Up @@ -843,7 +841,7 @@ def tearDown(self):

@property
def cases(self):
""" Returns a TestSuite for Folium Maps.
"""Returns a TestSuite for Folium Maps.
Testcase are as follows:
1. FoliumCase: asserts map is of type folium.map and contains
expected markers
Expand Down
2 changes: 1 addition & 1 deletion matplotcheck/notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def error_test(n, n_exp):


def remove_comments(input_string):
""" Helper function for import_test.
"""Helper function for import_test.
Removes all parts of string that would be commented out by # in python

Parameters
Expand Down
5 changes: 3 additions & 2 deletions matplotcheck/tests/test_lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@

@pytest.fixture
def multi_line_gdf(two_line_gdf):
""" Create a multi-line GeoDataFrame.
"""Create a multi-line GeoDataFrame.
This has one multi line and another regular line.
"""
# Create a single and multi line object
multiline_feat = two_line_gdf.unary_union
linec = LineString([(2, 1), (3, 1), (4, 1), (5, 2)])
out_df = gpd.GeoDataFrame(
geometry=gpd.GeoSeries([multiline_feat, linec]), crs="epsg:4326",
geometry=gpd.GeoSeries([multiline_feat, linec]),
crs="epsg:4326",
)
out_df["attr"] = ["road", "stream"]
return out_df
Expand Down
4 changes: 3 additions & 1 deletion matplotcheck/tests/test_polygons.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ def multi_polygon_gdf(basic_polygon):
"""
poly_a = Polygon([(3, 5), (2, 3.25), (5.25, 6), (2.25, 2), (2, 2)])
gdf = gpd.GeoDataFrame(
[1, 2], geometry=[poly_a, basic_polygon], crs="epsg:4326",
[1, 2],
geometry=[poly_a, basic_polygon],
crs="epsg:4326",
)
multi_gdf = gpd.GeoDataFrame(
geometry=gpd.GeoSeries(gdf.unary_union), crs="epsg:4326"
Expand Down
4 changes: 2 additions & 2 deletions matplotcheck/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __init__(self, ax):
""" Check Data """

def _convert_length(self, arr, n):
""" helper function for 'get_points_by_attributes' and
"""Helper function for 'get_points_by_attributes' and
'get_lines_by_attributes'
takes an array of either length 1 or n.
If array is length 1: array of array's only element repeating n times
Expand Down Expand Up @@ -130,7 +130,7 @@ def assert_points_grouped_by_type(
)

def sort_collection_by_markersize(self):
""" Returns a pandas dataframe of points in collections on Axes ax.
"""Returns a pandas dataframe of points in collections on Axes ax.

Returns
--------
Expand Down