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

windows tests #374

Merged
merged 5 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 8 additions & 13 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
- uses: actions/checkout@v4

- name: setup micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ${{ matrix.environment-file }}
micromamba-version: "latest"
micromamba-version: 'latest'

- name: Install geosnap
run: pip install . ;python geosnap/tests/_dl_data.py;
Expand All @@ -46,16 +46,11 @@ jobs:

- name: Test geosnap
run: |
pytest -v --color yes --cov geosnap/tests --cov-append --cov-report term-missing --cov-report xml .
pytest -v --color yes --cov=geosnap --cov-append --cov-report term-missing --cov-report xml .

- uses: codecov/codecov-action@v3

- name: Generate and publish the report
if: |
failure()
&& steps.status.outcome == 'failure'
&& github.event_name == 'schedule'
&& github.repository_owner == 'pysal'
uses: xarray-contrib/issue-from-pytest-log@v1
- name: codecov
uses: codecov/codecov-action@v3
with:
log-path: pytest-log.jsonl
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
name: geosnap-codecov
5 changes: 3 additions & 2 deletions geosnap/tests/test_constructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
LTDB = None
NCDB = None

import sys

store = DataStore()

Expand All @@ -23,12 +24,12 @@ def test_nces_school_dists():
dists = io.get_nces(store, dataset="school_districts")
assert dists.shape == (13352, 18)


@pytest.mark.skipif(sys.platform.startswith("win"), reason="skipping test on windows due to mem failure")
def test_ejscreen():
ej = io.get_ejscreen(store, years=[2018], fips=["11"])
assert ej.shape == (450, 369)


@pytest.mark.skipif(sys.platform.startswith("win"), reason="skipping test on windows due to mem failure")
def test_nces_sabs():
sabs = io.get_nces(store, dataset="sabs")
assert sabs.shape == (75128, 15)
Expand Down