Commit Graph
29 Commits
Author SHA1 Message Date
Martin Fleischmann 7e595d08a5 DOC/CI: remove Travis from docs and paths (#1632)
* DOC/CI: remove Travis from docs and paths

* use envs

* fix

* typo

* how to trigger check
2020-10-10 20:03:25 +01:00
Martin Fleischmann 63de9bd182 DOC/CI: enable doctest (#1651)
* inital doctest work

* doctest

* skip from_file

* test docstring with postgis only

* use doctest-plus

* c-f

* conditional imports

* revert

* revert conda

* fixture to conftest.py

* minimise changes, verbose output

* remove blank line

* revert pandas doc
2020-10-10 18:44:11 +01:00
Martin Fleischmann d1d4b46673 CI: keep pygeos master in dev environment only (#1639) 2020-09-28 08:53:15 +02:00
Adrian Garcia Badaracco dc50b69896 MAINT/TST: Add GitHub actions tests for single workflow cross-platform testing (#1576) 2020-09-19 21:29:35 +02:00
Ian RoseandMartin Fleischmann 38fd095fa5 ENH: Allow for more general file-like objects to be used when opening files. (#1535)
* Allow for more general file-like objects to be used when opening files.

* Add a zip scheme to a local path if it is missing on a .zip file. This
allows similar zip inference to happen for remote and local files.

* Add tests using file-like objects and for inferring zip file.

* Make fsspec an optional dep for CI.

* Handle case where windows drive names are present.

* Add test using GDAL-style vsi path.

* Try to increase test coverage a bit.

* Handle case where an archive path is included for a zip

Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>

* Fix fiona-style path handling for zip archives.

* Remove debug log.

* Remove remote fsspec test as mostly-redundant.

* Simplify reading of bytes by using BytesCollection everywhere. At some
point it may be better to move to the more-supported
MemoryFile/ZipMemoryFile.

* Add fsspec example to the io docs.

* Slight reorg of zip scheme logic.

Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>
2020-09-02 20:56:06 +01:00
Martin Fleischmann 785f2386d7 CI: pin mapclassify (#1545) 2020-07-28 21:56:25 +01:00
Martin Fleischmann 7a093643fc DEP: drop support for older versions of dependencies (#1492)
* change requirements

* ci

* remove compatibility layers

* ci recipe

* ci versions

* version in setup.py
2020-07-28 18:22:47 +01:00
Sergio ReyandMartin Fleischmann 81fbc3cf1d ENH: choropleth legend formatting (#1253)
Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>
2020-06-23 22:33:57 +02:00
d19afa4ece ENH: Add parquet IO support (#1180)
* WIP: initial migration of geofeather into geopandas

* WIP: initial implementation of parquet support for geometries

* Refactored approach to retain same geometry column names

* fix CI errors

* Fix CI errors, improve test coverage

* Py2.7 CI fix for decoding binary strings

* Remove feather support (for now) and address PR comments

* Make primary geometry column more clear

* Address PR comments, allow parameter overrides

* Refactor to_paquet(), read_parquet() per PR feedback

* Migrate to column-level CRS metadata

* Refactored parqut I/O to align with latest parquet metadata spec

* Use GeometryArray in read_parquet to set crs directly

* Updated parquet I/O per PR feedback

* Update parquet I/O per PR feedback

* Fix fstrings in compat

* Undo whitespace autoformatting in .travis.yml

* Add stability warning for parquet metadata spec

* Revert pyarrow version for travis

* Add classmethod from_parquet and fix skips for pyarrow

* TEMP: add test for pandas parquet I/O for appveyor

* Add test for parquet columns parameter repeated column names

* try to fix appveyor

* add to reference

* add pyarrow to show_versins

* skip parquet tests on windows

* try again to skip parquet tests on windows

* remove from_parquet classmethod

* undo space

* Updates per metadata spec PR feedback

* Update parquet metadata to match spec, make io methods private

* Add warning for initial parquet implementation

* Add basic read / write benchmarks for parquet

* Add whitespace to make CI happy

* Ignore parquet warnings in tests except where testing the warnings

Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>
2020-05-20 09:23:26 +01:00
Joris Van den Bossche e1eb476495 CI: add a build without optional dependencies (#1426) 2020-05-14 15:53:20 -07:00
433c39bab7 ENH: Add method to write GeoDataFrame to PostGIS (#1248)
Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>
Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
2020-05-05 12:06:14 +02:00
Joris Van den Bossche 55c372e978 CI: set up postgresql/postgis on Travis (#1391) 2020-04-23 21:00:32 +02:00
Joris Van den Bossche 5d1181af6b ENH: (optionally) use pygeos for vectorized GeometryArray operations (#1154) 2020-03-24 09:08:27 +01:00
Alan D. Snow 1d212b2a0c ENH: updated to use pyproj.CRS & pin pyproj >= 2.2.0 (#1101) 2020-01-25 09:49:27 +01:00
Martin Fleischmann add5fe9139 CI: test python 3.8 (#1243) 2020-01-07 11:53:30 +01:00
Martin Fleischmann 65c2d55ae2 CLN: Remove Python 2 support (#1183) 2019-10-28 11:11:03 +01:00
Joris Van den Bossche 5e0ead84b8 CI: pin python to 3.7.3 (pip install issues with 3.7.4) (#1092) 2019-08-12 11:33:57 +02:00
Martin Fleischmann 8c42164559 ENH: allow pysal alongside mapclassify for plotting scheme (#1082) 2019-08-09 09:28:04 +02:00
Joris Van den Bossche 6d3fad4ab3 CI: use defaults for py36 build (#1079) 2019-08-05 17:26:14 +02:00
Joris Van den Bossche 6ef9746a01 CI: add zstd as dependency to fix conda-forge problem with latest fiona / gdal 2019-07-29 14:07:48 +02:00
Joris Van den Bossche 69757afe6b Update minimal dependencies for pandas (>=0.23.4) and matplotlib (>=2.0.1) (#1002) 2019-05-24 13:05:38 +02:00
Joris Van den Bossche d7a5a30a6f CI: too old fiona installed on py3.5-minimal build (#985) 2019-04-25 11:40:01 +02:00
Joris Van den Bossche 59bbca801b TST/CI: pin a few builds to older fiona version (#973) 2019-04-17 12:47:32 +02:00
Joris Van den Bossche 619c99c221 CI: update travis builds (#949)
- remove py27 dev build (pandas master no longer supports python 2.7) and replace with pandas 0.23 build
- py37 dev build: move installing pandas and matplotlib master to separate steps in travis yml file (otherwise the conda create step takes too long)
- remove conda-forge/label/dev label for fiona (was still installing the rc instead of actual released version)
2019-03-25 16:23:28 +01:00
Joris Van den Bossche 02c6cf6d2b CI: fix the conda-forge env with pd 0.20 (remove pin of old matplotlib) (#903)
Travis CI tests were failing recently for one specific build, see https://github.com/conda-forge/gdal-feedstock/issues/261

Fixed by removing the pin of matplotlib to 1.5.3 (but added `gdal=2.3` to keep at older gdal version). 

Also added `nomkl` to have a built with numpy/openblas from conda-forge (not that it should matter though).
2019-01-26 14:08:18 +01:00
Martin Fleischmann f4fa69eae0 Use mapclassify instead of PySAL due to change of PySAL structure. (#872) 2018-12-08 22:36:45 +01:00
lmmarsano 201ae9cd93 BUG: fix from_postgis to accept nullable geometry (#856)
* TST: test read_postgis with NULL geometry

Though GIS databases permit NULL values in the geometry field, read_postgis throws exceptions when it encounters them.
test_read_postgis_null_geom defines this test case with sqlite3 database, and support functions are revised to support it.
create_sqlite is revised to loosen data type restrictions and follow [recommendations from the python manual](https://docs.python.org/3/library/sqlite3.html)
- connection parameter instead of filename to allow for in-memory database
- 'with' statement for transaction management
- parameter substitution instead of string operations
validate_boro_df strips NULL values before checking geometry type.

* TST: replace sqlite test with spatialite test

The original SQLite test reflected unlikely usage for geospatial analysis.
In parity with PostGIS, the new test runs against SQLite with SpatiaLite enabled.
For coverage, test geometries read as text and binary.

* TST: add libspatialite as a test dependency

* TST: add conda-forge testing environment for Python 2.7

add this environment to continuous integration
conda-forge Python 2.7 enables loadable SQLite extensions with conda-forge/python-feedstock#227
adding this environment enables SpatiaLite tests

* BUG: fix read_postgis & GeoDataFrame to accept NULL geometry values

read_postgis failed to load nullable binary geometry data while GeoDataFrame raised exceptions on NULL in the geometry field.
This fixes both issues.
It moreover adds logic to detect python version & load geometries from
python 2 buffers as necessary.

* ENH DOC: drop hex_encoded parameter from read_postgis & from_postgis

drop hex_encoded, since sqlite3 represents binary & text as distinct Python data types
adjust names to clarify this distinction
adjust documentation to clarify geometry is expected in WKB representation (which was implicit)
add example SpatiaLite usage reflecting this expectation
2018-11-29 21:05:08 -08:00
Joris Van den Bossche 556e29ed83 Test fiona 1.8b1 (#844) 2018-10-27 15:22:39 +02:00
Joris Van den Bossche 1faf62b7b6 TST/CI: refactor travis using fixed environment files (#843) 2018-10-17 00:18:06 +02:00