Skip to content

Commit b65807f

Browse files
authored
Merge pull request #17 from DahnJ/feature/dj-separate-tests-general-update
Separate tests + General update
2 parents efa450e + 987d4de commit b65807f

8 files changed

+19
-13
lines changed

Diff for: .pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 21.6b0
3+
rev: 23.1.0
44
hooks:
55
- id: black
66
language_version: python3
77

8-
- repo: https://gitlab.com/pycqa/flake8
8+
- repo: https://github.com/PyCQA/flake8
99
rev: 3.9.2
1010
hooks:
1111
- id: flake8

Diff for: environment-dev.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
channels:
2+
- conda-forge
3+
dependencies:
4+
# Test
5+
- pytest
6+
- pytest-cov

Diff for: environment.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ channels:
33
- conda-forge
44
dependencies:
55
# Required
6-
- python=3.9
6+
- python>=3.9
77
- shapely
8-
- h3-py=3.7.*
98
- geopandas>=0.9.*
109
- pandas
11-
# For Python <3.8
12-
# - typing_extensions
13-
# Test
14-
- pytest
15-
- pytest-cov
1610
# Notebooks
1711
- matplotlib
12+
# Pip
13+
- pip
14+
- pip:
15+
# Installing through pip to avoid segfault on Apple Silicon
16+
# https://github.com/uber/h3-py/issues/313
17+
- h3==3.7.6

Diff for: tests/__init__.py

Whitespace-only changes.

Diff for: h3pandas/test_h3pandas.py renamed to tests/test_h3pandas.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from . import h3pandas # noqa: F401
1+
from h3pandas import h3pandas # noqa: F401
22
from h3 import h3
33
import pytest
44
from shapely.geometry import Polygon, box
@@ -546,7 +546,7 @@ def test_polyfill_resample(h3_geodataframe_with_values):
546546

547547

548548
def test_polyfill_resample_uncovered_rows(basic_geodataframe_polygons):
549-
basic_geodataframe_polygons.loc[2] = box(0, 0, 3, 3)
549+
basic_geodataframe_polygons.iloc[1] = box(0, 0, 3, 3)
550550
with pytest.warns(UserWarning):
551551
result = basic_geodataframe_polygons.h3.polyfill_resample(2)
552552

Diff for: tests/util/__init__.py

Whitespace-only changes.

Diff for: h3pandas/util/test_decorator.py renamed to tests/util/test_decorator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from h3 import h3
22
import pytest
33

4-
from .decorator import catch_invalid_h3_address
4+
from h3pandas.util.decorator import catch_invalid_h3_address
55

66

77
def test_catch_invalid_h3_address():

Diff for: h3pandas/util/test_shapely.py renamed to tests/util/test_shapely.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from shapely.geometry import Polygon, MultiPolygon, LineString
22
import pytest
3-
from .shapely import polyfill
3+
from h3pandas.util.shapely import polyfill
44

55

66
@pytest.fixture

0 commit comments

Comments
 (0)