Skip to content

Commit

Permalink
Improve cli help text and lint jupyter example notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Bachibouzouk committed Dec 1, 2023
1 parent 694daf4 commit b413b77
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/notebooks/fixed_flat_app.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
" func_time=210,\n",
" time_fraction_random_variability=0.2,\n",
" func_cycle=60,\n",
" fixed=\"yes\", # This means all the 'n' appliances of this kind are always switched-on together\n",
" flat=\"yes\", # This means the appliance is not subject to random variability in terms of total usage time\n",
" fixed=\"yes\", # This means all the 'n' appliances of this kind are always switched-on together\n",
" flat=\"yes\", # This means the appliance is not subject to random variability in terms of total usage time\n",
")\n",
"indoor_bulb.windows(\n",
" window_1=[1200, 1440], # from 20:00 to 24:00\n",
Expand Down
4 changes: 1 addition & 3 deletions docs/notebooks/plot_class.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -194545,9 +194545,7 @@
],
"source": [
"# plotting all columns using plotly engine, you can\n",
"hourly_data.line(\n",
" engine=\"plotly\", plot_bgcolor=\"gray\", title=\"My Beautiful Plot\"\n",
")"
"hourly_data.line(engine=\"plotly\", plot_bgcolor=\"gray\", title=\"My Beautiful Plot\")"
]
},
{
Expand Down
13 changes: 8 additions & 5 deletions ramp/cli.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import argparse
import datetime
import os.path
import time

import pandas as pd
import numpy as np
Expand All @@ -17,21 +16,21 @@
dest="fname_path",
nargs="+",
type=str,
help="path to the (xlsx) input files (including filename). Must be provided",
help="Path to the (.xlsx/.py) input files (including filename). Must be provided",
)
parser.add_argument(
"-o",
dest="ofname_path",
nargs="+",
type=str,
help=f"path to the csv output files (including filename). If not provided, default output will be provided in {os.path.join(BASE_PATH, 'results')}",
help=f"Path to the csv output files (including filename). If not provided, default output will be provided in {os.path.join(BASE_PATH, 'results')}",
)
parser.add_argument(
"-n",
dest="num_days",
nargs="+",
type=int,
help="number of daily profiles to be generated",
help="Number of daily profiles to be generated",
)

parser.add_argument(
Expand All @@ -57,7 +56,11 @@
)

parser.add_argument(
"--ext", dest="extension", type=str, help="Format of input files", default="xlsx"
"--ext",
dest="extension",
type=str,
help="Format of input files for monthly variability (only used in combination with -y option and when -i path is a directory)",
default="xlsx",
)

parser.add_argument(
Expand Down

0 comments on commit b413b77

Please sign in to comment.