Skip to content

Commit

Permalink
Merge branch 'rich_dev_24'
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardFreedman committed Mar 31, 2024
2 parents f335650 + e5ffb9b commit ddb2b48
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crim_intervals/main_objs.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,14 @@ def linkExamples(self, df, piece_url='', mode=''):

def _constructColumnwiseUrl(cell, piece_url):
ema_expression = ''.join(("/", cell, "/highlight"))
mr = cell.split("/")[0]
if "-" not in cell:
ema_measures = re.findall(r'\d+', cell.split("/", 1)[0])
ema_measure_integers = [int(x) for x in ema_measures]
min_meas = min(ema_measure_integers)
max_meas = max(ema_measure_integers)
mr = f"{min_meas}-{max_meas}"
else:
mr = cell.split("/")[0]
measure_range = {"measureRange": mr}
json_string = json.dumps(measure_range)
encoded_mr = urllib.parse.quote(json_string)
Expand Down

0 comments on commit ddb2b48

Please sign in to comment.