spectriclabs / elastic_datashader

:earth_americas: Datashader enabled TMS server with ElasticSearch backend
Apache License 2.0
4 stars 1 forks source link

Flask app refactor #3

Closed mrecachinas closed 4 years ago

mrecachinas commented 4 years ago

Since this is a refactor, I want to make sure it works beyond a few initial tests. Given that I did this in PyCharm (using their "smart" move/refactor feature) and didn't really change any functionality, just pulled functions to different files, the likelihood of regression is fairly low.

I will test it this weekend and ensure functionality is intact.

mrecachinas commented 4 years ago

@mattastley Just tested error cases (using geo_shape instead of geo_point), the cache, and standard cases (plotting points, filters, etc.).

The only thing I haven't yet tested is plotting ellipses; however, that code didn't change, and I included unit tests for it.

Regarding the failing unit test. What should the default behavior be for split_fieldname_to_list (now in tms_pixellock_api/helpers/elastic.py)? I assumed you were trying to do

foo.keyword -> ["foo"]

but it looks like it's implemented to do

foo..keyword -> ["foo"]

Anyway, this is ready to merge as far as I can tell.

mrecachinas commented 4 years ago

BTW, I'd recommend squashing and merging so you don't have all 37 commits in master.

maihde commented 4 years ago

split_fieldname_to_list

You are correct, it should be:

if field[-1] in ('raw', 'keyword'):