profile
viewpoint
Bhavika Tekwani bhavika @mapbox United States bhavika.dev Data engineer | MIR enthusiast | all-around swell gal

bhavika/conf 61

Code and presentations used in conferences I attend

bhavika/JoyDivision 9

Music Mood Classification on the Million Song Dataset

bhavika/ListenMSD 5

A collection of Spotify playlists covering the Million Song Subset

bhavika/DataMiningProjects 3

A collection of data mining projects.

bhavika/IntroToML 3

Learning to use scikit-learn, scipy, pandas, numpy, lda, etc

bhavika/DMMultimedia 1

Data Mining on Multimedia Data

bhavika/airflow 0

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows

pull request commentmapbox/trace-classifier

Dg/dev

I'm encountering some strange non-deterministic behavior in the tests. At times, tensorflow appears unable to read the saved_model.pb from the unzipped model directory. This causes some tests to fail, but not all the time. The error messages vary as well. Currently seeing a bunch of

...
tensorflow.python.framework.errors_impl.OutOfRangeError: Read less bytes than requested [Op:RestoreV2]

@davidagold asked about this issue in the #machine-learning channel, so I'm jumping in with ideas.

First, it seems like the issue is definitely with the model file. I was wondering if the tests are running in parallel and not tearing down cleanly which is why on some runs of test_infer.py, the first test passes and the other 2 fail. However, this hypothesis did not hold. After several runs, I would see tests in test_infer.py fail out of order.

Second, the error might be related to the saved model. I'm not familiar with TF2 and tf.keras, so take the next few suggestions with a grain of salt. I suspected that this is a protobuf issue and upgraded protobuf to 3.8.0 since that's the version TF 2.2.0 needs. This does not fix the failing tests, however you should look to upgrading protobuf soon.

Re: the error being related to the model file, first I set ENV PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python in the Dockerfile and ran the tests. Reference for the PBF env. In production, you'd want to set that to cpp (if you want to explicitly set it, TF already might).

The error I now get is,

tensorflow.python.framework.errors_impl.DataLossError: file is too short to be an sstable [Op:RestoreV2]

See protobuf_flag.txt for the full logs. protobuf_flag.txt

This definitely points to an issue with the .pb model file itself. I Googled a bit and found this - https://github.com/tensorflow/models/issues/2676. If what they say on the ticket is true, then I would try to load the model checkpoint itself instead of using the load_model from tf.keras.

It seems like you may want to load the variables.data-???-of-??? file shown here - image

Third, if using the checkpoint file and following instructions from the tensorflow ticket above doesn't help, I wonder if there's an issue with the model itself. Was this model converted into .pb from some other format? The model metadata says "save_weights_only" is true, is this intentional? I would start with checking if the fixture you have for your tests is valid.

Fourth, this seems unlikely but I would try extracting the model.zip to /tmp or something. Sometimes using relative paths instead of absolute ones can cause an issue. I didn't try this.

Lastly, in order to isolate the problem and verify that the issue is not with your model file, I would convert it to another format like ONNX, run some inference locally and verify that the model is not corrupt.

Sorry I could not be of much help!

davidagold

comment created time in 3 hours

startedusedgoodreads/usedgoodreads

started time in 9 hours

startedschmiph2/pysepm

started time in 9 hours

startedLongguangWang/SOF-VSR

started time in 15 hours

startedmmcgrana/services-engineering

started time in 4 days

startedexpo/expo

started time in 6 days

startedspulec/moto

started time in 7 days

push eventbhavika/bhavika.github.io

Bhavika Tekwani

commit sha b83ca9d8f6dc06a899d1de791196529fa99f8c4c

Update index.html

view details

push time in 14 days

push eventbhavika/bhavika.github.io

Bhavika Tekwani

commit sha 847e7138c397ed63e8b22c2da82234c36ebd1f76

Update bio.html

view details

push time in 14 days

starteddebauchee/barrier

started time in 15 days

startedZheng222/PPON

started time in 21 days

startedeugeneyan/applied-ml

started time in 22 days

startedAwesomeCities/awesome-berlin

started time in 24 days

startedbenfred/py-spy

started time in a month

startedjasonrig/address-net

started time in a month

startedopenvenues/libpostal

started time in a month

startedluspr/awesome-ml-courses

started time in a month

startedchinesedfan/You-Dont-Know-Axios

started time in a month

startedtiangolo/typer

started time in a month

startedk14s/ytt

started time in a month

startedstatkclee/python-testing

started time in a month

starteddigantamisra98/Echo

started time in a month

startedCPJKU/madmom

started time in a month

starteddry-python/returns

started time in a month

startedawesome-selfhosted/awesome-selfhosted

started time in a month

startedh2oai/mli-resources

started time in a month

startedaio-libs/aiopg

started time in a month

startedMagicStack/uvloop

started time in a month

startedfranciscovillaescusa/Quijote-simulations

started time in a month

startedgoldbergyoni/nodebestpractices

started time in 2 months

startedspotify/scio

started time in 2 months

startedCrypto-toolbox/pandas-technical-indicators

started time in 2 months

startedtiangolo/fastapi

started time in 2 months

startedturpaultn/DESED

started time in 2 months

startedRedocly/redoc

started time in 2 months

issue commentgeopandas/geopandas

ENH: add covers() method to GeoSeries/GeoDataFrame

@jorisvandenbossche Both these PRs are now building successfully - #1462 Toblerity/Shapely#927

Please let me know if I can do anything else!

Both of these have been merged. I think we're okay to close here?

jorisvandenbossche

comment created time in 2 months

delete branch bhavika/Shapely

delete branch : covered-by

delete time in 2 months

startedmxssl/sre-interview-prep-guide

started time in 2 months

push eventbhavika/Shapely

bhavika

commit sha dea8ff245edb89c9648b5fe7550745b9219a613c

Add err check predicate on coveredby

view details

push time in 2 months

Pull request review commentToblerity/Shapely

Add support for GEOSCoveredBy

 def prototype(lgeos, geos_version):     lgeos.GEOSCovers.restype = c_byte     lgeos.GEOSCovers.argtypes = [c_void_p, c_void_p] +    lgeos.GEOSCoveredBy.restype = c_bool

You're right, we didn't need c_bool. I've reverted to c_byte.

bhavika

comment created time in 2 months

push eventbhavika/Shapely

bhavika

commit sha dbe4114cdcb7e7ed659f25fa9eb7220861e9ed7b

Remove c_bool

view details

push time in 2 months

delete branch bhavika/geopandas

delete branch : enh-1452-2

delete time in 2 months

push eventbhavika/geopandas

bhavika

commit sha 58485abcbd3e9bf77b4398cc1abdae0be7fd691d

Run black

view details

push time in 2 months

issue commentgeopandas/geopandas

ENH: add covers() method to GeoSeries/GeoDataFrame

@jorisvandenbossche Both these PRs are now building successfully - https://github.com/geopandas/geopandas/pull/1462 https://github.com/Toblerity/Shapely/pull/927

Please let me know if I can do anything else!

jorisvandenbossche

comment created time in 2 months

push eventbhavika/geopandas

bhavika

commit sha 7295467dd2051ae0889f3eb63d3a4e374d75dc39

Check if we're using pygeos

view details

push time in 2 months

push eventbhavika/geopandas

bhavika

commit sha 911f564f38bd1d7a2164a650e1849e81ea8aedc0

Phrasing in docstring for covered_by

view details

push time in 2 months

push eventbhavika/geopandas

bhavika

commit sha f40c7cd6748d5686c85d384f470dbf1eb91df8fd

Skip test if using shapely

view details

push time in 2 months

Pull request review commentToblerity/Shapely

Add support for GEOSCoveredBy

 def parallel_offset(geom, distance, resolution=16, join_style=1,         self.methods['snap'] = self.GEOSSnap         self.methods['shared_paths'] = self.GEOSSharedPaths         self.methods['buffer_with_params'] = self.GEOSBufferWithParams+        self.methods['covered_by'] = self.GEOSCoveredBy

I can't find the other link to the changelog I looked at but it seems CoveredBy was added in GEOS 3.3.0 https://git.osgeo.org/gitea/geos/geos/src/tag/3.3.0/ChangeLog#L952 so I'm adding it here to LGEOS330.

bhavika

comment created time in 2 months

push eventbhavika/Shapely

bhavika

commit sha 2dd9a49f083ddc1f7d92a4a8c8ee588ef9caff2e

Add covered_by to libgeos 330

view details

bhavika

commit sha 75b23b43ceb4e67cf50060b816c1ffdc21c24920

Add tests

view details

push time in 2 months

pull request commentToblerity/Shapely

Add support for GEOSCoveredBy

Looking a bit in the segfault (geopandas/geopandas#1452 (comment)), I see two things:

  • I think you still need to declare the argument/return types of the ctypes function here (the equivalent for covers): https://github.com/Toblerity/Shapely/blob/ea25f8cbaa177213aabfda55a8ab2f272f263b2b/shapely/ctypes_declarations.py#L288-L289
  • it seems that one difference between Covers and CoveredBy is that for CoveredBy there is only the _r version exposed. So it might be that the automatic setting of the argtypes/restype based on the non-_r version migth not work here: https://github.com/Toblerity/Shapely/blob/ea25f8cbaa177213aabfda55a8ab2f272f263b2b/shapely/geos.py#L224

@jorisvandenbossche this is what I was missing. I didn't realize I'd have to define those ctypes as well. Additionally, both GEOSCoveredBy and GEOSCoveredBy_r methods are exposed (see the "details" in my previous comment).

bhavika

comment created time in 2 months

Pull request review commentToblerity/Shapely

Add support for GEOSCoveredBy

 def __init__(self, dll):         attr.__name__ = func.__name__         setattr(self, key, attr) -        for pred in (self.GEOSisClosed,):+        coveredByKey = 'GEOSCoveredBy'+        func = getattr(self._lgeos, coveredByKey + '_r')+        attr = partial(func, self.geos_handle)+        attr.__name__ = func.__name__+        setattr(self, coveredByKey, attr)

@sgillies @jorisvandenbossche I added that because it seemed to me as if the GEOS binary wasn't exposing GEOSCoveredBy and GEOSCoveredBy_r. At first, I thought those were missing when I printed out all keys, but I have now confirmed that's not an issue (see below).

In LGEOS330, I added two lines below this which were

keys = list(self._lgeos.__dict__.keys())
print("330" , keys)

which prints all the methods found in GEOS (I am running 3.7.0) -

<details> 330 ['_name', '_FuncPtr', '_handle', 'GEOSversion', 'initGEOS', 'finishGEOS', 'GEOSGeomFromWKT', 'GEOSGeomToWKT', 'GEOS_setWKBOutputDims', 'GEOSGeomFromWKB_buf', 'GEOSGeomToWKB_buf', 'GEOSCoordSeq_create', 'GEOSCoordSeq_clone', 'GEOSGeom_clone', 'GEOSCoordSeq_destroy', 'GEOSCoordSeq_setX', 'GEOSCoordSeq_setY', 'GEOSCoordSeq_setZ', 'GEOSCoordSeq_setOrdinate', 'GEOSCoordSeq_getX', 'GEOSCoordSeq_getY', 'GEOSCoordSeq_getZ', 'GEOSCoordSeq_getSize', 'GEOSCoordSeq_getDimensions', 'GEOSProject', 'GEOSInterpolate', 'GEOSProjectNormalized', 'GEOSInterpolateNormalized', 'GEOSBuffer', 'GEOSBufferWithStyle', 'GEOSOffsetCurve', 'GEOSBufferParams_create', 'GEOSBufferParams_setEndCapStyle', 'GEOSBufferParams_setJoinStyle', 'GEOSBufferParams_setMitreLimit', 'GEOSBufferParams_setQuadrantSegments', 'GEOSBufferParams_setSingleSided', 'GEOSBufferWithParams', 'GEOSGeom_createPoint', 'GEOSGeom_createLinearRing', 'GEOSGeom_createLineString', 'GEOSGeom_createPolygon', 'GEOSGeom_createCollection', 'GEOSGeom_createEmptyCollection', 'GEOSGeom_destroy', 'GEOSEnvelope', 'GEOSIntersection', 'GEOSConvexHull', 'GEOSDifference', 'GEOSSymDifference', 'GEOSBoundary', 'GEOSUnion', 'GEOSUnaryUnion', 'GEOSUnionCascaded', 'GEOSPointOnSurface', 'GEOSGetCentroid', 'GEOSClipByRect', 'GEOSPolygonize', 'GEOSPolygonize_full', 'GEOSDelaunayTriangulation', 'GEOSVoronoiDiagram', 'GEOSLineMerge', 'GEOSSimplify', 'GEOSTopologyPreserveSimplify', 'GEOSDisjoint', 'GEOSTouches', 'GEOSIntersects', 'GEOSCrosses', 'GEOSWithin', 'GEOSContains', 'GEOSOverlaps', 'GEOSCovers', 'GEOSCoveredBy', 'GEOSEquals', 'GEOSEqualsExact', 'GEOSisEmpty', 'GEOSisValid', 'GEOSisValidReason', 'GEOSisSimple', 'GEOSisRing', 'GEOSisClosed', 'GEOSHasZ', 'GEOSRelate', 'GEOSRelatePattern', 'GEOSRelatePatternMatch', 'GEOSPrepare', 'GEOSPreparedGeom_destroy', 'GEOSPreparedDisjoint', 'GEOSPreparedTouches', 'GEOSPreparedIntersects', 'GEOSPreparedCrosses', 'GEOSPreparedWithin', 'GEOSPreparedContains', 'GEOSPreparedContainsProperly', 'GEOSPreparedOverlaps', 'GEOSPreparedCovers', 'GEOSGeomType', 'GEOSGeomTypeId', 'GEOSGetSRID', 'GEOSSetSRID', 'GEOSGetNumGeometries', 'GEOSGetGeometryN', 'GEOSGetNumInteriorRings', 'GEOSGetInteriorRingN', 'GEOSGetExteriorRing', 'GEOSGetNumCoordinates', 'GEOSGeom_getCoordSeq', 'GEOSGeom_getDimensions', 'GEOSArea', 'GEOSLength', 'GEOSDistance', 'GEOSHausdorffDistance', 'GEOSWKTReader_create', 'GEOSWKTReader_destroy', 'GEOSWKTReader_read', 'GEOSWKTWriter_create', 'GEOSWKTWriter_destroy', 'GEOSWKTWriter_write', 'GEOSWKTWriter_setTrim', 'GEOSWKTWriter_setRoundingPrecision', 'GEOSWKTWriter_setOutputDimension', 'GEOSWKTWriter_getOutputDimension', 'GEOSWKTWriter_setOld3D', 'GEOSWKBReader_create', 'GEOSWKBReader_destroy', 'GEOSWKBReader_read', 'GEOSWKBReader_readHEX', 'GEOSWKBWriter_create', 'GEOSWKBWriter_destroy', 'GEOSWKBWriter_write', 'GEOSWKBWriter_writeHEX', 'GEOSWKBWriter_getOutputDimension', 'GEOSWKBWriter_setOutputDimension', 'GEOSWKBWriter_getByteOrder', 'GEOSWKBWriter_setByteOrder', 'GEOSWKBWriter_getIncludeSRID', 'GEOSWKBWriter_setIncludeSRID', 'GEOSFree', 'GEOSSnap', 'GEOSSharedPaths', 'GEOSNearestPoints', 'GEOSQueryCallback', 'GEOSSTRtree_query', 'GEOSSTRtree_create', 'GEOSSTRtree_insert', 'GEOSSTRtree_remove', 'GEOSSTRtree_destroy', 'GEOSDistanceCallback', 'GEOSSTRtree_nearest_generic', 'GEOSMinimumClearance', 'GEOSRelatePatternMatch_r', 'GEOSSnap_r', 'GEOS_setWKBOutputDims_r', 'GEOSGeom_createPoint_r', 'GEOSCoordSeq_getZ_r', 'GEOSProjectNormalized_r', 'GEOSUnionCascaded_r', 'GEOSPolygonize_full_r', 'GEOSPreparedContainsProperly_r', 'GEOSContains_r', 'GEOSGeom_createCollection_r', 'GEOSGeom_clone_r', 'GEOSCoordSeq_clone_r', 'GEOSBufferParams_setMitreLimit_r', 'GEOSGeomType_r', 'GEOSCoordSeq_getY_r', 'GEOSDistance_r', 'GEOSWKBWriter_getIncludeSRID_r', 'GEOSGetNumGeometries_r', 'GEOSConvexHull_r', 'GEOSPreparedCovers_r', 'GEOSWKTWriter_destroy_r', 'GEOSIntersects_r', 'GEOSPreparedContains_r', 'GEOSisEmpty_r', 'GEOSHasZ_r', 'GEOSRelatePattern_r', 'GEOSSTRtree_remove_r', 'GEOSOffsetCurve_r', 'GEOSisValid_r', 'GEOSGetSRID_r', 'GEOSWKTReader_create_r', 'GEOSWKBWriter_writeHEX_r', 'GEOSGeomToWKT_r', 'GEOSTouches_r', 'GEOSIntersection_r', 'GEOSGeom_getDimensions_r', 'GEOSPreparedDisjoint_r', 'GEOSCoveredBy_r', 'GEOSGeom_getCoordSeq_r', 'GEOSGeomTypeId_r', 'GEOSSetSRID_r', 'GEOSRelate_r', 'GEOSEquals_r', 'GEOSCoordSeq_create_r', 'GEOSSTRtree_nearest_generic_r', 'GEOSSimplify_r', 'GEOSWKBWriter_create_r', 'GEOSWKBWriter_setOutputDimension_r', 'GEOSWKTWriter_setOld3D_r', 'GEOSGeomFromWKT_r', 'GEOSGeom_createEmptyCollection_r', 'GEOSWithin_r', 'GEOSPreparedOverlaps_r', 'GEOSBuffer_r', 'GEOSClipByRect_r', 'GEOSWKBWriter_getOutputDimension_r', 'GEOSBufferWithParams_r', 'GEOSBufferWithStyle_r', 'GEOSBufferParams_setEndCapStyle_r', 'GEOSCoordSeq_setOrdinate_r', 'GEOSGetGeometryN_r', 'GEOSSTRtree_destroy_r', 'GEOSSharedPaths_r', 'GEOSBufferParams_setQuadrantSegments_r', 'GEOSWKBWriter_setByteOrder_r', 'GEOSInterpolate_r', 'GEOSMinimumClearance_r', 'GEOSWKBWriter_destroy_r', 'GEOSWKTWriter_getOutputDimension_r', 'GEOSGeom_createPolygon_r', 'GEOSProject_r', 'GEOSPreparedCrosses_r', 'GEOSGetInteriorRingN_r', 'initGEOS_r', 'GEOSHausdorffDistance_r', 'GEOSWKTReader_read_r', 'GEOSUnaryUnion_r', 'GEOSNearestPoints_r', 'GEOSWKBReader_destroy_r', 'GEOSUnion_r', 'GEOSWKTWriter_setRoundingPrecision_r', 'GEOSDisjoint_r', 'GEOSisSimple_r', 'GEOSEnvelope_r', 'GEOSisValidReason_r', 'GEOSPrepare_r', 'GEOSGetNumInteriorRings_r', 'GEOSFree_r', 'GEOSSTRtree_insert_r', 'GEOSWKBReader_create_r', 'GEOSPreparedWithin_r', 'GEOSWKTWriter_setTrim_r', 'GEOSBoundary_r', 'GEOSWKBWriter_write_r', 'GEOSArea_r', 'GEOSSTRtree_query_r', 'GEOSPointOnSurface_r', 'GEOSGetCentroid_r', 'GEOSEqualsExact_r', 'GEOSWKTWriter_create_r', 'GEOSSTRtree_create_r', 'GEOSDelaunayTriangulation_r', 'GEOSGeom_createLinearRing_r', 'GEOSCoordSeq_getDimensions_r', 'GEOSGetExteriorRing_r', 'GEOSCoordSeq_getSize_r', 'GEOSWKTWriter_write_r', 'GEOSPolygonize_r', 'GEOSLineMerge_r', 'GEOSVoronoiDiagram_r', 'GEOSWKTWriter_setOutputDimension_r', 'GEOSWKBWriter_getByteOrder_r', 'GEOSCoordSeq_setX_r', 'GEOSPreparedTouches_r', 'GEOSTopologyPreserveSimplify_r', 'GEOSCoordSeq_destroy_r', 'GEOSCoordSeq_getX_r', 'GEOSInterpolateNormalized_r', 'GEOSWKTReader_destroy_r', 'GEOSSymDifference_r', 'GEOSCoordSeq_setZ_r', 'GEOSDifference_r', 'GEOSGeomToWKB_buf_r', 'GEOSGeom_destroy_r', 'GEOSBufferParams_create_r', 'GEOSCrosses_r', 'GEOSisClosed_r', 'GEOSPreparedGeom_destroy_r', 'GEOSBufferParams_setJoinStyle_r', 'GEOSCoordSeq_setY_r', 'GEOSBufferParams_setSingleSided_r', 'GEOSGetNumCoordinates_r', 'GEOSWKBWriter_setIncludeSRID_r', 'GEOSGeomFromWKB_buf_r', 'GEOSisRing_r', 'finishGEOS_r', 'GEOSLength_r', 'GEOSGeom_createLineString_r', 'GEOSPreparedIntersects_r', 'GEOSOverlaps_r', 'GEOSWKBReader_read_r', 'GEOSWKBReader_readHEX_r', 'GEOSCovers_r'] </details>

bhavika

comment created time in 2 months

startedcaddyserver/certmagic

started time in 2 months

push eventbhavika/geopandas

Bhavika Tekwani

commit sha ebc59e13c858ce7545457e8df1dd9d8f640c3369

Update geopandas/_vectorized.py Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>

view details

push time in 2 months

startedobsproject/obs-studio

started time in 2 months

issue commentgeopandas/geopandas

ENH: add covers() method to GeoSeries/GeoDataFrame

Re: adding covered_by support for when pygeos is installed, I have a PR open but it needs more tests. I wanted to check with you @jorisvandenbossche about the Shapely issue before pursuing the pygeos-only option.

jorisvandenbossche

comment created time in 2 months

PR opened geopandas/geopandas

ENH: add covered_by() method for GeoSeries

Towards #1452

+34 -0

0 comment

4 changed files

pr created time in 2 months

push eventbhavika/geopandas

bhavika

commit sha b618bf48ff897df90e3b77eb17c4122b3c6cda75

Add covered_by with NotImplementedError

view details

push time in 2 months

create barnchbhavika/geopandas

branch : enh-1452-2

created branch time in 2 months

issue commentgeopandas/geopandas

ENH: add covers() method to GeoSeries/GeoDataFrame

@jorisvandenbossche :wave:

I looked into adding a covered_by method to Shapely similar to the covers functionality that exists. I am running into some issues and I'm not sure whether this is a libgeos issue or something I'm doing incorrectly.

Please look at the PR here - https://github.com/Toblerity/Shapely/pull/927

I'm seeing two problems:

  1. Libgeos does not seem to expose GEOSCoveredBy at all, in any of the proxies from GEOS 3.0.0 to 3.6.0. I'm referring to this file in Shapely.

  2. A test with the covered_by method results in a segmentation fault.

Here's the trace from my test (in shapely > tests/test_predicates.py).

Python version: 3.7.4 (default, Aug 13 2019, 20:35:49)  [GCC 7.3.0]
GEOS version: 3.7.0-CAPI-1.11.0 673b9939
Numpy version: 1.18.5
Cython speedups: False
======================================================================================== test session starts =========================================================================================
platform linux -- Python 3.7.4, pytest-5.4.3, py-1.8.1, pluggy-0.13.1
numpy: 1.18.5
rootdir: /home/bhavika/Desktop/mapboxcode/Shapely, inifile: setup.cfg
plugins: cov-2.9.0
collected 5 items                                                                                                                                                                                    

tests/test_predicates.py .Fatal Python error: Segmentation fault

Current thread 0x00007fb5c4561740 (most recent call first):
  File "/home/bhavika/Desktop/mapboxcode/Shapely/shapely/predicates.py", line 15 in __call__
  File "/home/bhavika/Desktop/mapboxcode/Shapely/shapely/geometry/base.py", line 736 in covered_by
  File "/home/bhavika/Desktop/mapboxcode/Shapely/tests/test_predicates.py", line 23 in test_binary_predicates
  File "/home/bhavika/anaconda3/lib/python3.7/unittest/case.py", line 628 in run
  File "/home/bhavika/anaconda3/lib/python3.7/unittest/case.py", line 676 in __call__
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/_pytest/unittest.py", line 231 in runtest
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/_pytest/runner.py", line 135 in pytest_runtest_call
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/pluggy/manager.py", line 87 in <lambda>
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/_pytest/runner.py", line 217 in <lambda>
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/_pytest/runner.py", line 244 in from_call
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/_pytest/runner.py", line 217 in call_runtest_hook
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/_pytest/runner.py", line 186 in call_and_report
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/_pytest/runner.py", line 100 in runtestprotocol
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/_pytest/runner.py", line 85 in pytest_runtest_protocol
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/pluggy/manager.py", line 87 in <lambda>
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/_pytest/main.py", line 272 in pytest_runtestloop
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/pluggy/manager.py", line 87 in <lambda>
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/_pytest/main.py", line 247 in _main
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/_pytest/main.py", line 191 in wrap_session
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/_pytest/main.py", line 240 in pytest_cmdline_main
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/pluggy/manager.py", line 87 in <lambda>
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/_pytest/config/__init__.py", line 125 in main
  File "/home/bhavika/Desktop/mapboxcode/Shapely/venv/lib/python3.7/site-packages/pytest/__main__.py", line 7 in <module>
  File "/home/bhavika/anaconda3/lib/python3.7/runpy.py", line 85 in _run_code
  File "/home/bhavika/anaconda3/lib/python3.7/runpy.py", line 193 in _run_module_as_main
[1]    10710 segmentation fault (core dumped)  python3 -m pytest tests/test_predicates.py -s

I suspect the seg fault is just due to GEOSCoveredBy being missing. Do you have any tips for how I can debug this? Also happy to take this conversation to https://github.com/Toblerity/Shapely/pull/927.

jorisvandenbossche

comment created time in 2 months

push eventbhavika/Shapely

bhavika

commit sha 9a9b204c8758309d49cb763743945f5db88ce979

Move BinaryPredict for covered_by to IMPL330

view details

push time in 2 months

PR opened Toblerity/Shapely

Add support for GEOSCoveredBy
+13 -1

0 comment

4 changed files

pr created time in 2 months

push eventbhavika/Shapely

bhavika

commit sha 16990189d11850b9bb6bd0d056d16bcab1d26bce

Example of adding CoveredBy in LGEOS330

view details

push time in 2 months

push eventbhavika/geopandas

abonte

commit sha 8f4889affd4de5dc60bb3ad2104c1f9b577c031b

DOC: Add example in GeoDataFrame docstring (#1456) * add example in GeoDataFrame docstring * Update GeoDataFrame docstring Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net> Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>

view details

Joris Van den Bossche

commit sha 07a8f4cc7ef3eac0a2f2d272feb95a0887077072

BUG: override the .equals() method from pandas to correct isinstance (#1451)

view details

Bhavika Tekwani

commit sha e9cc2588fca25169670f9984231de22028d2d270

ENH: Add covers() method to GeoSeries (#1460)

view details

push time in 2 months

create barnchbhavika/Shapely

branch : covered-by

created branch time in 2 months

fork bhavika/Shapely

Manipulation and analysis of geometric objects

https://shapely.readthedocs.io/en/latest/

fork in 2 months

startedsickcodes/Docker-OSX

started time in 2 months

issue commentgeopandas/geopandas

ENH: add covers() method to GeoSeries/GeoDataFrame

  1. Contributing to Shapely to add a covered_by method there. You could do it similarly as eg the existing covers method: https://github.com/Toblerity/Shapely/blob/d3d1e3a2bf50bb6a06f766d9bd840348fbafb070/shapely/geometry/base.py#L731-L733 (and a few other places)

Thank you for explaining what needs to be done here. It seems like adding covered_by to Shapely is the preferred option? I can take a stab at this over the weekend and see if I run into any issues. @jorisvandenbossche

jorisvandenbossche

comment created time in 2 months

issue commentfrombeirutwithlove/ProtestTips

White armbands

NYPD and some other police departments operate on Color of the day https://en.wikipedia.org/wiki/Color_of_the_day_(police) so yeah, it's not just white bands.

michaelconnor

comment created time in 2 months

delete branch bhavika/geopandas

delete branch : enh-1452

delete time in 2 months

push eventbhavika/geopandas

bhavika

commit sha 56f6f3000938847eba9a33ce8e53b44da5b4271a

Fix url formatting

view details

bhavika

commit sha 564094c5aaaf4da0e26453a616a5e16d6ca2469b

Move covers tests to geom_methods

view details

push time in 2 months

Pull request review commentgeopandas/geopandas

ENH: Add covers() method to GeoSeries

 def within(self, other):         """         return _binary_op("within", self, other) +    def covers(self, other):+        """+        Returns a ``Series`` of ``dtype('bool')`` with value ``True`` for+        each geometry that is entirely covering `other`.++        An object A is said to cover another object B if no points of B lie+        in the exterior of A.++        See https://lin-ear-th-inking.blogspot.com/2007/06/\+        subtleties-of-ogc-covers-spatial.html for reference.

Ah! Sorry about that, I didn't realize the continued line after \ was indented. I'm not able to build the docs for some reason else it'd be easier to check. Trying the first option.

bhavika

comment created time in 2 months

push eventbhavika/geopandas

bhavika

commit sha 379ce7101e11974b4a7ecdff352d8219d1a914f3

Address PR feedback

view details

push time in 2 months

startedfrombeirutwithlove/ProtestTips

started time in 2 months

push eventbhavika/geopandas

bhavika

commit sha c282fdbcbfa20c339f9fff9f108fba0f70a579a4

Improve docstring using language from https://lin-ear-th-inking.blogspot.com/2007/06/subtleties-of-ogc-covers-spatial.html

view details

push time in 2 months

issue commentgeopandas/geopandas

ENH: add covers() method to GeoSeries/GeoDataFrame

Of all the spatial predicate methods (intersects, contains, within, crosses, etc), we are missing covers.

This can be added to GeoSeries/GeoDataFrame in geopandas/base.py (it's already added to the GeometryArray).

:wave: I have opened a PR for this part in #1460.

In principle, we could also add a "covered_by" method. But this is a bit more tricky since it is missing in shapely (but it is already available in pygeos).

I can take a look at this separately if it's of interest. I'm not familiar with the pygeos codebase.

jorisvandenbossche

comment created time in 2 months

push eventbhavika/geopandas

bhavika

commit sha 000ab6a6361b71749a245e588d520d704972f026

Improve comment in test_covers_itself

view details

push time in 2 months

PR opened geopandas/geopandas

ENH: Add covers() method to GeoSeries
+36 -0

0 comment

3 changed files

pr created time in 2 months

create barnchbhavika/geopandas

branch : enh-1452

created branch time in 2 months

fork bhavika/geopandas

Python tools for geographic data

http://geopandas.readthedocs.io/

fork in 2 months

startedryansmcgee/seirsplus

started time in 2 months

startedwillmcgugan/rich

started time in 2 months

startedmapbox/parse-mapbox-token

started time in 2 months

startederezrokah/aws-testing-library

started time in 3 months

startedJWSoh/MZSR

started time in 3 months

startedGoogleCloudPlatform/terraformer

started time in 3 months

startedgoogle/guice

started time in 3 months

startedchubin/wttr.in

started time in 3 months

startedencode/httpx

started time in 3 months

startedaws-samples/eks-spark-benchmark

started time in 3 months

startedinancgumus/learngo

started time in 3 months

startedkentcdodds/testing-workshop

started time in 3 months

startedgoldbergyoni/javascript-testing-best-practices

started time in 3 months

startedbradtraversy/jest_testing_basics

started time in 3 months

startedlensapp/lens

started time in 3 months

startedcdr/code-server

started time in 3 months

startedjimrollenhagen/pywhatauto

started time in 3 months

more