Commit 27f67130 authored by matt24smith's avatar matt24smith
Browse files

bump dependency version requirement

parent c7f9b538
Pipeline #4970 failed with stages
in 2 minutes and 21 seconds
# query position reports using rtree indexes
dynamic = lambda month, callback, kwargs: (f'''
SELECT d.mmsi, d.time, d.longitude, d.latitude
--, d.cog, d.sog
FROM ais_{month}_dynamic AS d
WHERE {callback(month=month, alias='d', **kwargs)}''')
# query static vessel data from monthly aggregate tables
static = lambda month, **_: (f'''
SELECT mmsi, vessel_name, ship_type, dim_bow,
dim_stern, dim_port, dim_star, imo
SELECT mmsi, vessel_name, ship_type,
dim_bow, dim_stern, dim_port, dim_star, imo
FROM static_{month}_aggregate''')
# common table expression SELECT statements for concatenation with UNION
leftjoin = lambda month: (f'''
SELECT dynamic_{month}.mmsi, dynamic_{month}.time,
dynamic_{month}.longitude, dynamic_{month}.latitude,
--dynamic_{month}.cog, dynamic_{month}.sog,
static_{month}.imo, static_{month}.vessel_name,
static_{month}.dim_bow, static_{month}.dim_stern,
static_{month}.dim_port, static_{month}.dim_star,
......@@ -32,14 +30,7 @@ static_{month} AS ( {static(month)}
)
''')
# query position reports using rtree indexes
testfcn = lambda month, callback, kwargs: (f'''
SELECT d.mmsi, d.time, d.longitude, d.latitude
--, d.cog, d.sog
FROM ais_{month}_dynamic AS d
WHERE {callback(month=month, alias='d', **kwargs)}''')
# iterate over monthly tables to create an SQL query spanning desired time range
# iterate over month tables to create SQL query spanning desired time range
crawl = lambda months, callback, **kwargs: ('WITH' + ','.join([
aliases(month=month, callback=callback, kwargs=kwargs) for month in months
]) + '\nUNION'.join([leftjoin(month=month)
......
......@@ -75,7 +75,10 @@ def TrackGen(
rows must be sorted by first by mmsi, then time
args:
colnames: list of strings
rowgen (aisdb.database.dbqry.DBQuery.gen_qry())
DBQuery rows generator. Yields rows returned
by a database query
colnames (list of strings)
description of each column in rows.
first two columns must be ['mmsi', 'time']
deduplicate_timestamps: bool
......
__version__ = "1.0.16"
__version__ = "1.0.17"
......@@ -32,11 +32,11 @@ def init_configs():
print('downloading webdrivers...')
if os.name == 'posix':
url = 'https://github.com/mozilla/geckodriver/releases/download/v0.29.0/geckodriver-v0.29.0-linux64.tar.gz'
url = 'https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz'
elif os.name == 'darwin':
url = 'https://github.com/mozilla/geckodriver/releases/download/v0.29.0/geckodriver-v0.29.0-macos.tar.gz'
url = 'https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-macos.tar.gz'
elif os.name == 'nt':
url = 'https://github.com/mozilla/geckodriver/releases/download/v0.29.0/geckodriver-v0.29.0-win64.zip'
url = 'https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-win64.zip'
else:
print('unsupported platform!')
exit()
......
......@@ -2,6 +2,12 @@
Changelog
=========
v1.0.17
-------
bump dependency version requirement
v1.0.16
-------
......
......@@ -8,19 +8,17 @@ from aisdb.webdata.merge_data import (
merge_tracks_hullgeom,
merge_tracks_shoredist,
)
from aisdb.database.sqlfcn_callbacks import in_bbox_time
from aisdb.gis import ZoneGeom, Domain
from aisdb.database.sqlfcn_callbacks import in_bbox_time_validmmsi
from aisdb.gis import Domain
from tests.create_testing_data import sample_gulfstlawrence_zonegeometry
import numpy as np
def prepare_qry():
z1 = sample_gulfstlawrence_zonegeometry
z1 = sample_gulfstlawrence_zonegeometry()
domain = Domain('gulf domain', geoms={'z1': z1}, cache=False)
start = datetime(2021, 11, 1)
end = datetime(2021, 11, 7)
end = datetime(2021, 11, 2)
rowgen = DBQuery(
start=start,
......@@ -29,7 +27,7 @@ def prepare_qry():
xmax=domain.maxX,
ymin=domain.minY,
ymax=domain.maxY,
callback=in_bbox_time,
callback=in_bbox_time_validmmsi,
).gen_qry()
return rowgen
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment