Skip to content

Commit

Permalink
Replace rstrip() with removesuffix() in triggers text (#411)
Browse files Browse the repository at this point in the history
* replace rstrip() with removesuffix()

* restrict scipy and gwpy versions due to deprecated trapz function. Should be changed once gwpy new release remove the deprecation.

---------

Co-authored-by: Iara Ota <[email protected]>
  • Loading branch information
iaraota and Iara Ota authored Jul 22, 2024
1 parent 4ecb502 commit e354f4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gwsumm/plot/triggers/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def add_loudest_event(self, ax, table, rank, *columns, **kwargs):
colstr = get_column_string(col)
# format row value
try:
valstr = f"{row[col]:.2f}".rstrip('.0')
valstr = f"{row[col]:.2f}".removesuffix('.00')
except ValueError: # not float()able
valstr = str(row[col])
txt.append(f'{colstr} = {valstr}')
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dependencies = [
"astropy >=3.0.0",
"gwdatafind >=1.1.1",
"gwdetchar >=2.2.6",
"gwpy >=2.0.0",
"gwpy >=2.0.0, <=3.0.8",
"gwtrigfind",
"lalsuite",
"ligo-segments",
Expand All @@ -53,7 +53,7 @@ dependencies = [
"pygments >=2.7.0",
"python-dateutil",
"python-ligo-lw",
"scipy >=1.2.0",
"scipy >=1.2.0, <1.14",
]

dynamic = ["version"]
Expand Down

0 comments on commit e354f4c

Please sign in to comment.