Skip to content

Commit

Permalink
Merge pull request #3491 from ProjectSidewalk/develop
Browse files Browse the repository at this point in the history
v7.18.3
  • Loading branch information
misaugstad authored Feb 16, 2024
2 parents a58192a + 1096b62 commit 828f693
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 9,199 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
package-lock.json
.DS_Store
tmp/**/*
.idea
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/helper/AttributeControllerHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ object AttributeControllerHelper {
Logger.info(s"Finished ${f"${100.0 * i / nUsers}%1.2f"}% of users, next: $userId.")
val clusteringOutput =
Seq("python3", "label_clustering.py", "--key", key, "--user_id", userId).!!
// Logger.info(clusteringOutput)
Logger.info(clusteringOutput)
}
Logger.info("Finshed 100% of users!!\n")
}
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import play.PlayScala

name := """sidewalk-webpage"""

version := "7.18.2"
version := "7.18.3"

scalaVersion := "2.10.7"

Expand Down
5 changes: 5 additions & 0 deletions conf/evolutions/default/216.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# --- !Ups
INSERT INTO version VALUES ('7.18.3', now(), 'Follow-up fix for API data not updating.');

# --- !Downs
DELETE FROM version WHERE version_id = '7.18.3';
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ services:
- GOOGLE_MAPS_SECRET=DUMMY_GOOGLE_SECRET
- SCISTARTER_API_KEY=DUMMY_SCISTARTER_API_KEY
- INTERNAL_API_KEY=DUMMY_INTERNAL_API_KEY
- SIDEWALK_HTTP_PORT=9000
- ENV_TYPE=test

db:
Expand Down
10 changes: 6 additions & 4 deletions label_clustering.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import numpy as np
import pandas as pd
from haversine import haversine
Expand Down Expand Up @@ -66,6 +67,7 @@ def cluster(labels, curr_type, thresholds, single_user):
DEBUG = args.debug
USER_ID = args.user_id.strip('\'\"') if args.user_id else None
REGION_ID = args.region_id
PORT = os.environ.get('SIDEWALK_HTTP_PORT', '9000')

N_PROCESSORS = 8

Expand All @@ -76,12 +78,12 @@ def cluster(labels, curr_type, thresholds, single_user):

if USER_ID:
SINGLE_USER = True
getURL = 'http://localhost:9000/userLabelsToCluster?key=' + KEY + '&userId=' + str(USER_ID)
postURL = 'http://localhost:9000/singleUserClusteringResults?key=' + KEY + '&userId=' + str(USER_ID)
getURL = 'http://localhost:' + PORT +'/userLabelsToCluster?key=' + KEY + '&userId=' + str(USER_ID)
postURL = 'http://localhost:' + PORT +'/singleUserClusteringResults?key=' + KEY + '&userId=' + str(USER_ID)
elif REGION_ID:
SINGLE_USER = False
getURL = 'http://localhost:9000/clusteredLabelsInRegion?key=' + KEY + '&regionId=' + str(REGION_ID)
postURL = 'http://localhost:9000/multiUserClusteringResults?key=' + KEY + '&regionId=' + str(REGION_ID)
getURL = 'http://localhost:' + PORT +'/clusteredLabelsInRegion?key=' + KEY + '&regionId=' + str(REGION_ID)
postURL = 'http://localhost:' + PORT +'/multiUserClusteringResults?key=' + KEY + '&regionId=' + str(REGION_ID)

# Send GET request to get the labels to be clustered.
try:
Expand Down
Loading

0 comments on commit 828f693

Please sign in to comment.