Skip to content

Commit

Permalink
v3.2.1 docker-testing
Browse files Browse the repository at this point in the history
  • Loading branch information
answerquest committed Nov 9, 2018
1 parent f3ff414 commit b0eb86f
Show file tree
Hide file tree
Showing 49 changed files with 57,802 additions and 97,738 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.git/*
export/**/*.txt
logs/*
30 changes: 30 additions & 0 deletions GTFSManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1318,6 +1318,35 @@ def post(self):
end = time.time()
logmessage("tableReadSave POST call for table={} took {} seconds.".format(table,round(end-start,2)))

class tableColumn(tornado.web.RequestHandler):
def get(self):
# API/tableColumn?table=table&column=column&key=key&value=value
start = time.time()
logmessage('\nrouteIdList GET call')

table=self.get_argument('table',default='')
column=self.get_argument('column',default='')
logmessage('\ntableColumn GET call for table={}, column={}'.format(table,column))

if (not table) or (not column) :
self.set_status(400)
self.write("Error: invalid table or column given.")
return

key=self.get_argument('key',default=None)
value=self.get_argument('value',default=None)

if key and value:
returnList = readColumnDB(table, column, key=key, value=value)
else:
returnList = readColumnDB(table, column)

returnList.sort()
self.write(json.dumps(returnList))
end = time.time()
logmessage("tableColumn GET call took {} seconds.".format(round(end-start,2)))


def make_app():
return tornado.web.Application([
#(r"/API/data", APIHandler),
Expand Down Expand Up @@ -1357,6 +1386,7 @@ def make_app():
(r"/API/hydGTFS", hydGTFS),
(r"/API/frequencies", frequencies),
(r"/API/tableReadSave", tableReadSave),
(r"/API/tableColumn", tableColumn),
#(r"/API/idList", idList),
(r"/(.*)", tornado.web.StaticFileHandler, {"path": root, "default_filename": "index.html"})
])
Expand Down
17 changes: 12 additions & 5 deletions GTFSserverfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import numpy as np
import io # used in hyd csv import
# to do: how to get these variables declared in the other file to be recognized here?
global uploadFolder
global xmlFolder
global logFolder
Expand Down Expand Up @@ -980,11 +982,16 @@ def allShapesListFunc():

def serviceIdsFunc():
calendarDF = readTableDB('calendar')
if not len(calendarDF):
service_id_list = []
else:
service_id_list = calendarDF['service_id'].tolist()
return service_id_list
collectorSet = set()
if len(calendarDF):
collectorSet.update( calendarDF['service_id'].tolist() )
# service_id_list = calendarDF['service_id'].tolist()

calendarDatesDF = readTableDB('calendar_dates')
if len(calendarDatesDF):
collectorSet.update( calendarDatesDF['service_id'].tolist() )

return list(collectorSet)


#################################################3
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

A browser-based user interface for creating, editing, exporting of static GTFS (General Transit Feed Specification Reference) feeds for a public transit authority.

**Development Status** : V 3.2.0
**Development Status** : V 3.2.1
Windows binary is available too now. Download from [Releases page](https://github.com/WRI-Cities/static-GTFS-manager/releases/).

## Intro
Expand Down Expand Up @@ -51,9 +51,7 @@ See on the project wiki: [Running on Ubuntu OS](https://github.com/WRI-Cities/st
See on the project wiki: [Running on Windows OS with Python 3](https://github.com/WRI-Cities/static-GTFS-manager/wiki/Running-on-Windows-OS-with-Python-3)

### Running in Docker with Compose
Check out the repo and run

docker-compose up
Work in progress! See [this](https://github.com/WRI-Cities/static-GTFS-manager/issues/69)

----

Expand Down
2 changes: 1 addition & 1 deletion config/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const menu = {
"Stops": "stops.html",
"Routes": "routes.html",
"Calendar": "calendar.html",
"Trips and Stop_times": "tripstimings.html",
"Trips, Stop_times": "tripstimings.html",
"Frequencies": "frequencies.html",
"Fares": "fares.html",
"Translations": "translations.html"
Expand Down
Binary file modified db/agency.h5
Binary file not shown.
Binary file modified db/calendar.h5
Binary file not shown.
Binary file added db/calendar_dates.h5
Binary file not shown.
Binary file modified db/feed_info.h5
Binary file not shown.
Binary file modified db/routes.h5
Binary file not shown.
Binary file modified db/stop_times_1.h5
Binary file not shown.
Binary file added db/stop_times_2.h5
Binary file not shown.
Binary file added db/stop_times_3.h5
Binary file not shown.
Binary file added db/stop_times_4.h5
Binary file not shown.
Binary file added db/stop_times_5.h5
Binary file not shown.
Binary file added db/stop_times_6.h5
Binary file not shown.
Loading

0 comments on commit b0eb86f

Please sign in to comment.