Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gp201 committed Aug 24, 2022
1 parent 8c945cb commit aaa0857
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions freyja/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import plotly.express as px
import yaml


class UtilsTests(unittest.TestCase):
def setUp(self):
self.df_ab_lin = pd.DataFrame.from_dict({
Expand Down Expand Up @@ -111,17 +112,17 @@ def setUp(self):
}
})
self.dates_to_keep = ['2021-03-01 00:00:00',
'2021-03-03 00:00:00',
'2021-03-08 00:00:00',
'2021-03-10 00:00:00',
'2021-03-12 00:00:00',
'2021-03-14 00:00:00',
'2021-03-17 00:00:00',
'2021-03-20 00:00:00',
'2021-03-25 00:00:00',
'2021-03-30 00:00:00',
'2021-03-31 00:00:00',
'2021-04-04 00:00:00']
'2021-03-03 00:00:00',
'2021-03-08 00:00:00',
'2021-03-10 00:00:00',
'2021-03-12 00:00:00',
'2021-03-14 00:00:00',
'2021-03-17 00:00:00',
'2021-03-20 00:00:00',
'2021-03-25 00:00:00',
'2021-03-30 00:00:00',
'2021-03-31 00:00:00',
'2021-04-04 00:00:00']
agg_results = 'freyja/data/test_sweep.tsv'
metadata = 'freyja/data/sweep_metadata.csv'
config_file = 'freyja/data/plot_config.yml'
Expand Down Expand Up @@ -358,7 +359,7 @@ def test_get_color_scheme(self):
), color_scheme_without_config)

self.df_ab_lin.rename(columns={'Q.3': 'grp_1', 'AY.48': 'grp_2'},
inplace=True)
inplace=True)
self.df_ab_lin.drop(columns=['B.1.617.2'], inplace=True)
color_scheme_with_config = {
'grp_1': 'orange',
Expand All @@ -373,7 +374,8 @@ def test_get_color_scheme(self):
), color_scheme_with_config)

def test_calc_rel_growth_rates(self):
df_rel_growth_rates_expected = pd.read_csv('freyja/data/rel_growth_rates.csv')
df_rel_growth_rates_expected = pd.read_csv(
'freyja/data/rel_growth_rates.csv')
self.df_ab_lin.index = pd.to_datetime(self.df_ab_lin.index)
nboots = 1000
serial_interval = 5.5
Expand All @@ -396,5 +398,6 @@ def test_calc_rel_growth_rates(self):
# Clean up
os.remove('rel_growth_rates.csv')


if __name__ == '__main__':
unittest.main()

0 comments on commit aaa0857

Please sign in to comment.