Skip to content

Commit

Permalink
Merge 8b904fe into b70db59
Browse files Browse the repository at this point in the history
  • Loading branch information
cehbrecht committed Jan 18, 2021
2 parents b70db59 + 8b904fe commit 28e2281
Show file tree
Hide file tree
Showing 8 changed files with 194 additions and 151 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
lxml: [true, false]
env:
LXML: ${{ matrix.lxml }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand All @@ -27,7 +29,10 @@ jobs:
run: python3 -m pytest
- name: run coveralls ⚙️
run: coveralls
if: matrix.python-version == 3.6
- name: build docs 🏗️
run: cd docs && make html
if: matrix.python-version == 3.6
- name: run flake8 ⚙️
run: flake8 owslib
if: matrix.python-version == 3.6
3 changes: 2 additions & 1 deletion owslib/iso.py
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,8 @@ def __init__(self, img_desc=None):
val = img_desc.find(util.nspath_eval('gmd:cloudCoverPercentage/gco:Real', namespaces))
self.cloud_cover = util.testXMLValue(val)

val = img_desc.find(util.nspath_eval('gmd:processingLevelCode/gmd:RS_Identifier/gmd:code/gco:CharacterString', namespaces))
val = img_desc.find(util.nspath_eval(
'gmd:processingLevelCode/gmd:RS_Identifier/gmd:code/gco:CharacterString', namespaces))
self.processing_level = util.testXMLValue(val)

for i in img_desc.findall(util.nspath_eval('gmd:dimension/gmd:MD_Band', namespaces)):
Expand Down
4 changes: 3 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
-r requirements.txt
flake8
pytest>=3.6
pytest>=3.8
pytest-cov
Pillow
sphinx
tox
twine
wheel
coverage
coveralls
148 changes: 0 additions & 148 deletions tests/doctests/wfs1_generic.txt

This file was deleted.

2 changes: 1 addition & 1 deletion tests/test_ows_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# TODO, we should run all these from local XML documents (as per the WMS and WFS services)
# CSW_SERVICE_URL = 'http://data.nodc.noaa.gov/geoportal/csw'
CSW_SERVICE_URL = 'http://demo.pycsw.org/cite/csw'
CSW_SERVICE_URL = 'https://demo.pycsw.org/cite/csw'
WCS_SERVICE_URL = 'http://thredds.ucar.edu/thredds/wcs/grib/NCEP/NAM/CONUS_80km/best'


Expand Down
13 changes: 13 additions & 0 deletions tests/test_remote_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def read(*args, **kwargs):
monkeypatch.setattr(
owslib.feature.common.WFSCapabilitiesReader, 'read', read)


@pytest.fixture
def mp_wfs_110_nometadata(monkeypatch):
"""Monkeypatch the call to the remote GetCapabilities request of WFS
Expand Down Expand Up @@ -821,6 +822,7 @@ def test_wms_130_noremotemd_parse_none(self, mp_wms_130_nometadata):


class TestOnline(object):
@pytest.mark.xfail
@pytest.mark.online
@pytest.mark.skipif(not service_ok(WFS_SERVICE_URL),
reason="WFS service is unreachable")
Expand Down Expand Up @@ -848,6 +850,7 @@ def test_wfs_remotemd_parse_single(self, wfs_version):
for m in mdrecords:
assert type(m) is owslib.iso.MD_Metadata

@pytest.mark.xfail
@pytest.mark.online
@pytest.mark.skipif(not service_ok(WFS_SERVICE_URL),
reason="WFS service is unreachable")
Expand All @@ -874,6 +877,7 @@ def test_wfs_remotemd_parse_all(self, wfs_version):
for m in mdrecords:
assert type(m) is owslib.iso.MD_Metadata

@pytest.mark.xfail
@pytest.mark.online
@pytest.mark.skipif(not service_ok(WFS_SERVICE_URL),
reason="WFS service is unreachable")
Expand All @@ -897,6 +901,7 @@ def test_wfs_remotemd_parse_none(self, wfs_version):
assert type(mdrecords) is list
assert len(mdrecords) == 0

@pytest.mark.xfail
@pytest.mark.online
@pytest.mark.skipif(not service_ok(WFS_SERVICE_URL),
reason="WFS service is unreachable")
Expand All @@ -922,6 +927,7 @@ def test_wfs_noremotemd_parse_single(self, wfs_version):
assert type(mdrecords) is list
assert len(mdrecords) == 0

@pytest.mark.xfail
@pytest.mark.online
@pytest.mark.skipif(not service_ok(WFS_SERVICE_URL),
reason="WFS service is unreachable")
Expand All @@ -946,6 +952,7 @@ def test_wfs_noremotemd_parse_all(self, wfs_version):
assert type(mdrecords) is list
assert len(mdrecords) == 0

@pytest.mark.xfail
@pytest.mark.online
@pytest.mark.skipif(not service_ok(WFS_SERVICE_URL),
reason="WFS service is unreachable")
Expand All @@ -969,6 +976,7 @@ def test_wfs_noremotemd_parse_none(self, wfs_version):
assert type(mdrecords) is list
assert len(mdrecords) == 0

@pytest.mark.xfail
@pytest.mark.online
@pytest.mark.skipif(not service_ok(WMS_SERVICE_URL),
reason="WMS service is unreachable")
Expand Down Expand Up @@ -996,6 +1004,7 @@ def test_wms_remotemd_parse_single(self, wms_version):
for m in mdrecords:
assert type(m) is owslib.iso.MD_Metadata

@pytest.mark.xfail
@pytest.mark.online
@pytest.mark.skipif(not service_ok(WMS_SERVICE_URL),
reason="WMS service is unreachable")
Expand All @@ -1022,6 +1031,7 @@ def test_wms_remotemd_parse_all(self, wms_version):
for m in mdrecords:
assert type(m) is owslib.iso.MD_Metadata

@pytest.mark.xfail
@pytest.mark.online
@pytest.mark.skipif(not service_ok(WMS_SERVICE_URL),
reason="WMS service is unreachable")
Expand All @@ -1045,6 +1055,7 @@ def test_wms_remotemd_parse_none(self, wms_version):
assert type(mdrecords) is list
assert len(mdrecords) == 0

@pytest.mark.xfail
@pytest.mark.online
@pytest.mark.skipif(not service_ok(WMS_SERVICE_URL),
reason="WMS service is unreachable")
Expand All @@ -1070,6 +1081,7 @@ def test_wms_noremotemd_parse_single(self, wms_version):
assert type(mdrecords) is list
assert len(mdrecords) == 0

@pytest.mark.xfail
@pytest.mark.online
@pytest.mark.skipif(not service_ok(WMS_SERVICE_URL),
reason="WMS service is unreachable")
Expand All @@ -1094,6 +1106,7 @@ def test_wms_noremotemd_parse_all(self, wms_version):
assert type(mdrecords) is list
assert len(mdrecords) == 0

@pytest.mark.xfail
@pytest.mark.online
@pytest.mark.skipif(not service_ok(WMS_SERVICE_URL),
reason="WMS service is unreachable")
Expand Down

0 comments on commit 28e2281

Please sign in to comment.