Skip to content

Commit

Permalink
update react measure range. update remote path for linkExs
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardFreedman committed Apr 2, 2024
1 parent b6aafac commit d4f23e8
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions crim_intervals/main_objs.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,10 +729,10 @@ def linkExamples(self, df, piece_url='', mode=''):
they will be links to highlighted examples of each result.
'''
if piece_url == '':
if self.path.startswith('https://crimproject.org/mei/CRIM'):
if self.path.startswith('https://'):
piece_url = self.path
else:
print('No piece URL was passed and the piece was not downloaded from a crimproject.org. Please provide a piece_url.')
print('No piece URL was passed and the piece was not downloaded from a public respository. Please provide a piece_url.')
return

if mode != '':
Expand Down Expand Up @@ -788,13 +788,14 @@ def _constructColumnwiseUrl(cell, piece_url):
min_meas = min(ema_measure_integers)
max_meas = max(ema_measure_integers)
mr = f"{min_meas}-{max_meas}"
measure_range = {"measureRange": mr}
json_string = json.dumps(measure_range)
encoded_mr = urllib.parse.quote(json_string)
# not needed as of 4/24
# measure_range = {"measureRange": mr}
# json_string = json.dumps(measure_range)
# encoded_mr = urllib.parse.quote(json_string)
params = {
"pieceURL": piece_url,
"ema_expression": ema_expression,
"measure_range": encoded_mr
"measure_range": mr
}
query_string = urllib.parse.urlencode(params)
react_app_url = "https://eleon024.github.io/ema_react_app/"
Expand Down

0 comments on commit d4f23e8

Please sign in to comment.