Skip to content

Commit

Permalink
Lint with black
Browse files Browse the repository at this point in the history
  • Loading branch information
Bachibouzouk committed May 15, 2024
1 parent a31d250 commit 2e868f9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
22 changes: 11 additions & 11 deletions docs/notebooks/example_figure_joss.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@
"uc = UseCase(\"JOSS-paper-figure\", users=[LMI, LI], random_seed=20240110)\n",
"uc.initialize(num_days=1)\n",
"\n",
"profiles = uc.generate_daily_load_profiles(\n",
" cases=[1,2,3,4,5]\n",
")"
"profiles = uc.generate_daily_load_profiles(cases=[1, 2, 3, 4, 5])"
]
},
{
Expand Down Expand Up @@ -109,21 +107,23 @@
"import matplotlib.pyplot as plt\n",
"import matplotlib.dates as mdates\n",
"\n",
"plt.rcParams.update({'font.size': 22})\n",
"plt.rcParams.update({\"font.size\": 22})\n",
"\n",
"fig, ax1 = profiles.shadow( figsize=(16, 8))\n",
"for ln in range(0,len(profiles.columns)+1):\n",
" ax1.get_lines()[ln].set_color('royalblue') # edits the defualt colour of the shadow-plot lines\n",
"ax1.legend(['5-day average', 'Single days(s)'])\n",
"fig, ax1 = profiles.shadow(figsize=(16, 8))\n",
"for ln in range(0, len(profiles.columns) + 1):\n",
" ax1.get_lines()[ln].set_color(\n",
" \"royalblue\"\n",
" ) # edits the defualt colour of the shadow-plot lines\n",
"ax1.legend([\"5-day average\", \"Single days(s)\"])\n",
"ax1.margins(0)\n",
"\n",
"ax1.set_xticks(ax1.get_xticks()[1:])\n",
"\n",
"myFmt = mdates.DateFormatter('%H:%M')\n",
"myFmt = mdates.DateFormatter(\"%H:%M\")\n",
"ax1.xaxis.set_major_formatter(myFmt)\n",
"\n",
"ax1.set_ylabel('Normalised power (kW/kW-Peak)', fontsize='large', labelpad=20)\n",
"ax1.set_xlabel('Time (hours:minutes)', fontsize='large', labelpad=20)"
"ax1.set_ylabel(\"Normalised power (kW/kW-Peak)\", fontsize=\"large\", labelpad=20)\n",
"ax1.set_xlabel(\"Time (hours:minutes)\", fontsize=\"large\", labelpad=20)"
]
}
],
Expand Down
8 changes: 6 additions & 2 deletions ramp/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1401,8 +1401,12 @@ def windows(
self.random_var_1 = int(
random_var_w * np.diff(self.window_1)[0]
) # calculate the random variability of window1, i.e. the maximum range of time they can be enlarged or shortened
self.random_var_2 = int(random_var_w * np.diff(self.window_2)[0]) # same as above
self.random_var_3 = int(random_var_w * np.diff(self.window_3)[0]) # same as above
self.random_var_2 = int(
random_var_w * np.diff(self.window_2)[0]
) # same as above
self.random_var_3 = int(
random_var_w * np.diff(self.window_3)[0]
) # same as above

# automatically appends the appliance to the user's appliance list
self.user._add_appliance_instance(self)
Expand Down

0 comments on commit 2e868f9

Please sign in to comment.