Skip to content

Commit

Permalink
cut the version
Browse files Browse the repository at this point in the history
  • Loading branch information
gegen07 committed Jun 26, 2023
1 parent 1482495 commit f376123
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 14 deletions.
16 changes: 15 additions & 1 deletion moredata/enricher/osm/osm_places_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,19 @@ def enrich_geopandas_data(self, data, **kwargs):

self._df = self._df.set_crs("EPSG:4326")

sj = geopandas.sjoin(data, self._df, how="left", predicate="intersects")
sj = geopandas.sjoin(
data, self._df, how=kwargs.get("join_how", "left"), predicate="intersects"
)

sj["geometry"] = sj["geometry_not_buffered"]
sj.drop(columns=["geometry_not_buffered"], inplace=True)

for column in ["index_left", "index_right"]:
try:
sj.drop(column, axis=1, inplace=True)
except KeyError:
pass

return GeopandasData.from_geodataframe(sj)

def enrich_dask_geopandas_data(self, data, **kwargs):
Expand All @@ -194,6 +202,12 @@ def enrich_dask_geopandas_data(self, data, **kwargs):
sj["geometry"] = sj["geometry_not_buffered"]
sj = sj.drop(columns=["geometry_not_buffered"])

for column in ["index_left", "index_right"]:
try:
sj = sj.drop(column, axis=1)
except Exception:
pass

return DaskGeopandasData.from_dask_geodataframe(sj)

def enrich(self, data, **kwargs):
Expand Down
26 changes: 13 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
]

elasticsearch = [
"elasticsearch>=7.17.0",
"elasticsearch==7.17.0",
]

sql = [
Expand All @@ -56,18 +56,18 @@
setup(
name="moredata",
url="https://https://github.com/NESPEDUFV/more-data",
download_url="https://github.com/NESPEDUFV/more-data/archive/v0.2.0.tar.gz",
version="0.2.0",
download_url="https://github.com/NESPEDUFV/more-data/archive/v0.2.6.tar.gz",
version="0.2.6",
packages=find_packages(where="."),
python_requires=">=3.8",
install_requires=dependencies,
extras_require={
"complete": dependencies + elasticsearch + sql + json + osm,
"osm": dependencies + osm,
"elasticsearch": dependencies + elasticsearch,
"sql": dependencies + sql,
"json": dependencies + json,
"develop": dependencies + DOCS_REQUIRES + elasticsearch + sql + json + osm,
"docs": DOCS_REQUIRES,
},
install_requires=dependencies + elasticsearch + sql + json + osm,
# extras_require={
# "complete": dependencies + elasticsearch + sql + json + osm,
# "osm": dependencies + osm,
# "elasticsearch": dependencies + elasticsearch,
# "sql": dependencies + sql,
# "json": dependencies + json,
# "develop": dependencies + DOCS_REQUIRES + elasticsearch + sql + json + osm,
# "docs": DOCS_REQUIRES,
# },
)

0 comments on commit f376123

Please sign in to comment.