Skip to content
Commits on Source (5)
......@@ -3,6 +3,12 @@ Changes
All issue numbers are relative to https://github.com/Toblerity/Fiona/issues.
1.8.6 (2019-03-18)
------------------
- The advertisement for JSON driver enablement in 1.8.5 was false (#176), but
in this release they are ready for use.
1.8.5 (2019-03-15)
------------------
......
fiona (1.8.6-1~exp1) experimental; urgency=medium
* Team upload.
* New upstream release.
* Ignore test_data_paths.
-- Bas Couwenberg <sebastic@debian.org> Tue, 19 Mar 2019 06:50:58 +0100
fiona (1.8.5-1~exp1) experimental; urgency=medium
* Team upload.
......
......@@ -17,6 +17,7 @@ export PYBUILD_BEFORE_TEST=cp -r {dir}/tests {build_dir}
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/tests
export PYBUILD_TEST_ARGS=--ignore tests/test_bytescollection.py \
--ignore tests/test_collection.py \
--ignore tests/test_data_paths.py \
--ignore tests/test_feature.py \
--ignore tests/test_filter_vsi.py \
--ignore tests/test_fio_bounds.py \
......
......@@ -101,7 +101,7 @@ import uuid
__all__ = ['bounds', 'listlayers', 'open', 'prop_type', 'prop_width']
__version__ = "1.8.5"
__version__ = "1.8.6"
__gdal_version__ = get_gdal_release_name()
gdal_version = get_gdal_version_tuple()
......
......@@ -19,6 +19,7 @@ import threading
from fiona._err cimport exc_wrap_int, exc_wrap_ogrerr
from fiona._err import CPLE_BaseError
from fiona.errors import EnvError
level_map = {
......
......@@ -43,11 +43,15 @@ supported_drivers = dict([
("OpenFileGDB", "r"),
# ESRI Personal GeoDatabase PGeo No Yes No, needs ODBC library
# ESRI ArcSDE SDE No Yes No, needs ESRI SDE
# ESRIJSON ESRIJSON No Yes Yes
("ESRIJSON", "r"),
# ESRI Shapefile ESRI Shapefile Yes Yes Yes
("ESRI Shapefile", "raw"),
# FMEObjects Gateway FMEObjects Gateway No Yes No, needs FME
# GeoJSON GeoJSON Yes Yes Yes
("GeoJSON", "rw"),
# GeoJSONSeq GeoJSON sequences Yes Yes Yes
("GeoJSONSeq", "rw"),
# Géoconcept Export Geoconcept Yes Yes Yes
# multi-layers
# ("Geoconcept", "raw"),
......@@ -114,6 +118,8 @@ supported_drivers = dict([
# SUA SUA No Yes Yes
("SUA", "r"),
# SVG SVG No Yes No, needs libexpat
# TopoJSON TopoJSON No Yes Yes
("TopoJSON", "r"),
# UK .NTF UK. NTF No Yes Yes
# multi-layer
# ("UK. NTF", "r"),
......
......@@ -260,6 +260,10 @@ requires_gdal22 = pytest.mark.skipif(
not gdal_version.at_least('2.2'),
reason="Requires GDAL 2.2.x")
requires_gdal24 = pytest.mark.skipif(
not gdal_version.at_least('2.4'),
reason="Requires GDAL 2.4.x")
@pytest.fixture(scope="class")
def unittest_data_dir(data_dir, request):
......
"""Tests of _env util module"""
import pytest
try:
from unittest import mock
except ImportError:
import mock
from fiona._env import GDALDataFinder, PROJDataFinder
......
"""Tests of GDAL and PROJ data finding"""
import os.path
from click.testing import CliRunner
import pytest
import fiona
from fiona._env import GDALDataFinder, PROJDataFinder
from fiona.fio.main import main_group
@pytest.mark.wheel
def test_gdal_data_wheel():
"""Get GDAL data path from a wheel"""
assert GDALDataFinder().search() == os.path.join(os.path.dirname(fiona.__file__), 'gdal_data')
@pytest.mark.wheel
def test_proj_data_wheel():
"""Get GDAL data path from a wheel"""
assert PROJDataFinder().search() == os.path.join(os.path.dirname(fiona.__file__), 'proj_data')
@pytest.mark.wheel
def test_env_gdal_data_wheel():
runner = CliRunner()
result = runner.invoke(main_group, ['env', '--gdal-data'])
assert result.exit_code == 0
assert result.output.strip() == os.path.join(os.path.dirname(fiona.__file__), 'gdal_data')
@pytest.mark.wheel
def test_env_proj_data_wheel():
runner = CliRunner()
result = runner.invoke(main_group, ['env', '--proj-data'])
assert result.exit_code == 0
assert result.output.strip() == os.path.join(os.path.dirname(fiona.__file__), 'proj_data')
def test_env_gdal_data_environ(monkeypatch):
monkeypatch.setenv('GDAL_DATA', '/foo/bar')
runner = CliRunner()
result = runner.invoke(main_group, ['env', '--gdal-data'])
assert result.exit_code == 0
assert result.output.strip() == '/foo/bar'
def test_env_proj_data_environ(monkeypatch):
monkeypatch.setenv('PROJ_LIB', '/foo/bar')
runner = CliRunner()
result = runner.invoke(main_group, ['env', '--proj-data'])
assert result.exit_code == 0
assert result.output.strip() == '/foo/bar'
"""Tests of driver support"""
import pytest
from .conftest import requires_gdal24
import fiona.drvsupport
@requires_gdal24
@pytest.mark.parametrize('format', ['GeoJSON', 'ESRIJSON', 'TopoJSON', 'GeoJSONSeq'])
def test_geojsonseq(format):
"""Format is available"""
assert format in fiona.drvsupport.supported_drivers.keys()