Skip to content

Commit

Permalink
Merge pull request #454 from cevi/dev
Browse files Browse the repository at this point in the history
Fix bug #453
  • Loading branch information
wp99cp authored Aug 3, 2024
2 parents 08da580 + f3d9b14 commit 6b98879
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dev_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: 🏗️ Build the stack
run: docker-compose -f docker-compose.yml -f docker-compose.prod-dev.yml build
run: docker compose -f docker-compose.yml -f docker-compose.prod-dev.yml build

- name: 🚀 Push containers to registry
run: docker-compose -f docker-compose.yml -f docker-compose.prod-dev.yml push
run: docker compose -f docker-compose.yml -f docker-compose.prod-dev.yml push
4 changes: 2 additions & 2 deletions .github/workflows/prod_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: 🏗️ Build the stack
run: docker-compose -f docker-compose.yml -f docker-compose.prod-latest.yml build
run: docker compose -f docker-compose.yml -f docker-compose.prod-latest.yml build

- name: 🚀 Push containers to registry
run: docker-compose -f docker-compose.yml -f docker-compose.prod-latest.yml push
run: docker compose -f docker-compose.yml -f docker-compose.prod-latest.yml push
5 changes: 3 additions & 2 deletions backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def create_walk_time_table():
mimetype="application/json",
)

# Decode options['route'] form polyline
# Decode options['route'] for polyline
if "encoding" in options and options["encoding"] == "polyline":
start = time.time()

Expand Down Expand Up @@ -295,7 +295,8 @@ def create_export(options, uuid):
options["output_directory"] = output_directory

options["settings"]["create_elevation_profile"] = True
options["settings"]["name_points_in_export"] = True
if "name_points_in_export" not in options["settings"]:
options["settings"]["name_points_in_export"] = True

logger.info("OPTIONS:" + str(options))

Expand Down
3 changes: 3 additions & 0 deletions backend/automatic_walk_time_tables/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ def __init__(
if manual_mode:
return

# TODO: drop the next few lines, as we are only supporting calling this Generator from within the backend app.
# and there, we hardcoded manual_mode = True

if "file_type" not in options or options["file_type"] is None:
raise Exception("No file ending provided.")

Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "automatic-walk-time-tables",
"version": "5.0.3",
"version": "5.0.4",
"scripts": {
"ng": "ng",
"start": "tsc set-env.ts && BACKEND_DOMAIN=http://localhost:5000 node set-env.js && angular-build-info && ng serve",
Expand Down
10 changes: 8 additions & 2 deletions swiss_TLM_api/swiss_TML_api/map_numbers/map_numbers_fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,15 @@ def __init__(self, force_rebuild=False):
return

# try to load the index
if not os.path.isfile(self.index_file_path + ".dat"):
try:
if not os.path.isfile(self.index_file_path + ".dat"):
self.__download_map_numbers()
self.index = RTreeIndex(self.index_file_path)
except:
# if anything crashes somehow, redownload and recreate the index
logger.info("Map numbers index was corrupt - rebuilding.")
self.__download_map_numbers()
self.index = RTreeIndex(self.index_file_path)
self.index = RTreeIndex(self.index_file_path)

end = time.time()
logger.info("Map numbers index loaded (after {}s)".format(str(end - start)))
Expand Down

0 comments on commit 6b98879

Please sign in to comment.