Skip to content

Commit

Permalink
chore: exclude some tests for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mdtanker committed Dec 9, 2023
1 parent 9e0c64d commit 29451a0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ jobs:

- name: Run the tests
run: >-
pytest -ra --cov --cov-report=xml --cov-report=term --durations=20
pytest -m "not earthdata and not issue" -ra --cov --cov-report=xml
--cov-report=term --durations=20
- name: Upload coverage report
uses: codecov/[email protected]
12 changes: 2 additions & 10 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,12 @@ def tests(session: nox.Session) -> None:
session.conda_install("pygmt", "geopandas")
session.install(".[test]")

# run tests with numba jit disabled to get real coverage
session.run(
"pytest",
*session.posargs,
env={"NUMBA_DISABLE_JIT": "1"},
)

# run just the numba tests with numba jit enabled
# run the tests
session.run(
"pytest",
"-m",
"use_numba",
"not earthdata and not issue",
*session.posargs,
env={"NUMBA_DISABLE_JIT": "0"},
)


Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"earthdata: marks tests as requiring earthdata login info (deselect with '-m \"not earthdata\"')",
"issue: mark tests with current issues (deselect with '-m \"not issues\"')",
"working: marks tests which are working",
"fetch: marks tests which fetch data",
]

Expand Down
11 changes: 2 additions & 9 deletions tests/test_fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def test_():
]


@pytest.mark.working()
@pytest.mark.fetch()
@pytest.mark.parametrize(("test_input", "expected"), resample_test)
@pytest.mark.filterwarnings("ignore::RuntimeWarning")
def test_resample_grid(test_input, expected):
Expand Down Expand Up @@ -321,7 +321,6 @@ def test_imagery():


@pytest.mark.fetch()
@pytest.mark.working()
@pytest.mark.filterwarnings("ignore::RuntimeWarning")
def test_basement():
grid = fetch.basement()
Expand Down Expand Up @@ -516,6 +515,7 @@ def test_ibcso_coverage():


@pytest.mark.fetch()
@pytest.mark.issue()
@pytest.mark.filterwarnings("ignore::RuntimeWarning")
@pytest.mark.parametrize(("test_input", "expected"), ibcso_test)
def test_ibcso(test_input, expected):
Expand Down Expand Up @@ -804,7 +804,6 @@ def test_bedmap_points():


# @pytest.mark.fetch()
# @pytest.mark.working()
# @pytest.mark.slow()
# @pytest.mark.filterwarnings("ignore::RuntimeWarning")
# def test_deepbedmap():
Expand Down Expand Up @@ -866,7 +865,6 @@ def test_bedmap_points():


@pytest.mark.fetch()
@pytest.mark.working()
@pytest.mark.filterwarnings("ignore::RuntimeWarning")
@pytest.mark.parametrize(("test_input", "expected"), gravity_test)
def test_gravity(test_input, expected):
Expand Down Expand Up @@ -978,7 +976,6 @@ def test_rosetta_gravity():


@pytest.mark.fetch()
@pytest.mark.working()
@pytest.mark.filterwarnings("ignore::RuntimeWarning")
@pytest.mark.parametrize(("test_input", "expected"), magnetics_test)
def test_magnetics(test_input, expected):
Expand Down Expand Up @@ -1112,7 +1109,6 @@ def test_basal_melt(test_input, expected):


@pytest.mark.fetch()
@pytest.mark.working()
@pytest.mark.filterwarnings("ignore::RuntimeWarning")
@pytest.mark.parametrize(("test_input", "expected"), ghf_test)
def test_ghf(test_input, expected):
Expand All @@ -1127,7 +1123,6 @@ def test_ghf(test_input, expected):


@pytest.mark.fetch()
@pytest.mark.working()
def test_ghf_points():
df = fetch.ghf(version="burton-johnson-2020", points=True)
expected = [
Expand Down Expand Up @@ -1217,7 +1212,6 @@ def test_gia(test_input, expected):


@pytest.mark.fetch()
@pytest.mark.working()
@pytest.mark.filterwarnings("ignore::RuntimeWarning")
@pytest.mark.parametrize(("test_input", "expected"), crust_test)
def test_crustal_thickness(test_input, expected):
Expand Down Expand Up @@ -1261,7 +1255,6 @@ def test_crustal_thickness(test_input, expected):


@pytest.mark.fetch()
@pytest.mark.working()
@pytest.mark.filterwarnings("ignore::RuntimeWarning")
@pytest.mark.parametrize(("test_input", "expected"), moho_test)
def test_moho(test_input, expected):
Expand Down

0 comments on commit 29451a0

Please sign in to comment.