Skip to content

Commit

Permalink
Merge pull request #139 from sami2py/jklenzing-patch-1
Browse files Browse the repository at this point in the history
BUG: repr with a float longitude
  • Loading branch information
jklenzing committed May 17, 2021
2 parents 594b80a + cd729e0 commit 8399421
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions sami2py/_core_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, tag, lon, year, day, outn=False, test=False):
----------
tag : (string)
name of run (top-level directory)
lon : (int)
lon : (float)
longitude reference
year : (int)
year
Expand Down Expand Up @@ -106,7 +106,7 @@ def __repr__(self):
out.append('Model Run Name = ' + self.tag)
out.append(('Day {day:03d}, {year:4d}').format(day=self.day,
year=self.year))
out.append(('Longitude = {lon:d} deg').format(lon=self.lon0))
out.append(('Longitude = {lon:5.1f} deg').format(lon=self.lon0))
temp_str = '{N:d} time steps from {t0:4.1f} to {tf:4.1f} UT'
out.append(temp_str.format(N=len(self.ut),
t0=min(self.ut),
Expand Down
6 changes: 3 additions & 3 deletions sami2py/tests/test_core_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def setup(self):
"""
self.tmp_archive_dir = sami2py.archive_dir
sami2py.utils.set_archive_dir(path=sami2py.test_data_dir)
self.lon = 256
self.lon = 256.1
self.year = 1999
self.day = 256

Expand Down Expand Up @@ -98,7 +98,7 @@ def setup(self):
"""
self.tmp_archive_dir = sami2py.archive_dir
sami2py.utils.set_archive_dir(path=sami2py.test_data_dir)
self.lon = 256
self.lon = 256.1
self.year = 1999
self.day = 257

Expand All @@ -123,7 +123,7 @@ def setup(self):
"""
self.tmp_archive_dir = sami2py.archive_dir
sami2py.utils.set_archive_dir(path=sami2py.test_data_dir)
self.lon = 256
self.lon = 256.1
self.year = 1999
self.day = 257
self.model = sami2py.Model(tag='test', lon=self.lon, year=self.year,
Expand Down

0 comments on commit 8399421

Please sign in to comment.