Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Marimo UIs #159

Closed
wants to merge 138 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
ef1a327
Create version 4.3.3
Sep 22, 2023
76b9da4
Fix product name (#7)
Sep 22, 2023
985a6f3
Fix ISONE help data (#12)
Sep 23, 2023
ab6571b
Update install tool (#14)
Sep 24, 2023
f2f9fcd
Fix make install (#15)
Sep 24, 2023
3f5756b
Fix install tool (#16)
Sep 25, 2023
fe950f8
Update IEEE-13-cyme-network.glm (#13)
Sep 25, 2023
8e2662c
Refactor pole (#8)
Sep 26, 2023
80f2fa5
Fix superlu compile warnings (#17)
Sep 27, 2023
1e52304
Update documentation (#18)
Sep 27, 2023
1b0c2ea
Update ubuntu_22.sh (#90)
Sep 28, 2023
47d4267
Update load.cpp to fix mdb converter (#91)
Sep 28, 2023
f891b95
Add pole failure warning (#93)
Sep 28, 2023
dc0815e
Fix global substitution (#94)
Sep 28, 2023
5a6c5a9
Develop fix macro python (#95)
Sep 28, 2023
0f81892
Fix forloop comments (#96)
Sep 28, 2023
360695a
Update repo docs (#97)
Sep 29, 2023
d4aa53e
Fix recorder output (#99)
Sep 29, 2023
e44180f
Fix geodata tutorial (#101)
Sep 30, 2023
a2dbc97
Update gridlabd.in
Oct 1, 2023
d070d05
Fix include subcommand (#104)
Oct 1, 2023
95c0f8e
Fix fast accessor autotest (#98)
Oct 1, 2023
4c53d03
Fix server autotest intermittent failure (#106)
Oct 1, 2023
309c96e
Fix geodata subcommand address autotest (#114)
Oct 5, 2023
2e6c433
Fix write macro (#113)
Oct 6, 2023
64fe128
Fix NOW pseudo-global to support date/time format (#122)
Oct 9, 2023
009c5d9
Add support for TMPFILE pseudo-global (#121)
Oct 10, 2023
f167389
Update build system to allow separate workdir (#108)
Oct 10, 2023
3c25fa0
Update setup.sh (#124)
Oct 11, 2023
afd664f
Fix xy coordinate data extract from cyme converter (#111)
MitchellAV Oct 12, 2023
b1aeb6c
Fix inconsistent validation for mdb2glm xy coordinate extract (#125)
MitchellAV Oct 12, 2023
67b716f
Add spida xlsx converter (#126)
Oct 12, 2023
8de139e
Emergency fix to xlsx-spida2csv-geodata.py (#128)
Oct 12, 2023
c256129
Fix mysql build warnings (#136)
Oct 16, 2023
443a8af
Develop add xlsx converter (#130) (#131)
Oct 12, 2023
0a40444
Mysql bugfix (#137)
Thistleman Oct 16, 2023
6b3e3fe
Patch mysql and distutils (#123)
Thistleman Oct 13, 2023
0c5d8cc
Update gridlabd-contributors (#141)
Oct 17, 2023
28fe7a5
Fix mdb2glm converter autotest intermittent failures (#132)
MitchellAV Oct 13, 2023
03b88e6
Fix inconsistency with cyme xy coordinate autotest (#139)
MitchellAV Oct 17, 2023
50aa71f
Fix install m1 (#134)
Thistleman Oct 14, 2023
d0ed26c
Update convert.cpp (#144)
Oct 31, 2023
dd3165b
Update convert.cpp (#147)
Nov 13, 2023
558fc82
Update cmdarg.cpp (#148)
Nov 14, 2023
0a3e73f
Develop add flush global (#149)
Nov 14, 2023
7881152
Develop fix gettext (#150)
Thistleman Dec 21, 2023
74e7a78
Merge branch 'develop' of https://github.com/arras-energy/gridlabd in…
Jan 11, 2024
75839d8
Fix mysql build warnings (#136)
Oct 16, 2023
e9eacc3
Mysql bugfix (#137)
Thistleman Oct 16, 2023
a7ce5c7
Update gridlabd-contributors (#141)
Oct 17, 2023
037d15b
Fix inconsistency with cyme xy coordinate autotest (#139)
MitchellAV Oct 17, 2023
fbe9539
Update convert.cpp (#144)
Oct 31, 2023
4ac4677
Update convert.cpp (#147)
Nov 13, 2023
83cae36
Update cmdarg.cpp (#148)
Nov 14, 2023
80da4bb
Develop add flush global (#149)
Nov 14, 2023
ed56542
Develop fix gettext (#150)
Thistleman Dec 21, 2023
f21297c
Merge branch 'develop' of https://github.com/arras-energy/gridlabd in…
Jan 11, 2024
bdbc47a
Create version 4.3.3
Sep 22, 2023
7d19590
Fix product name (#7)
Sep 22, 2023
6616b23
Fix ISONE help data (#12)
Sep 23, 2023
ece0e0a
Update install tool (#14)
Sep 24, 2023
6f37c8a
Fix make install (#15)
Sep 24, 2023
9400709
Fix install tool (#16)
Sep 25, 2023
76839e6
Update IEEE-13-cyme-network.glm (#13)
Sep 25, 2023
be1fac1
Refactor pole (#8)
Sep 26, 2023
4cd33ea
Fix superlu compile warnings (#17)
Sep 27, 2023
8533c7f
Update documentation (#18)
Sep 27, 2023
567b402
Update ubuntu_22.sh (#90)
Sep 28, 2023
7539d74
Update load.cpp to fix mdb converter (#91)
Sep 28, 2023
67c92c3
Add pole failure warning (#93)
Sep 28, 2023
22ecc77
Fix global substitution (#94)
Sep 28, 2023
3b3a992
Develop fix macro python (#95)
Sep 28, 2023
ec019d1
Fix forloop comments (#96)
Sep 28, 2023
84be3bd
Update repo docs (#97)
Sep 29, 2023
da89b3b
Fix recorder output (#99)
Sep 29, 2023
5b6a020
Fix geodata tutorial (#101)
Sep 30, 2023
f4e5c3e
Update gridlabd.in
Oct 1, 2023
6a4f76e
Fix include subcommand (#104)
Oct 1, 2023
aa61bcf
Fix fast accessor autotest (#98)
Oct 1, 2023
80ea007
Fix server autotest intermittent failure (#106)
Oct 1, 2023
d84b701
Fix geodata subcommand address autotest (#114)
Oct 5, 2023
a25ff96
Fix write macro (#113)
Oct 6, 2023
9f5402b
Fix NOW pseudo-global to support date/time format (#122)
Oct 9, 2023
a37cdb7
Add support for TMPFILE pseudo-global (#121)
Oct 10, 2023
17def70
Update build system to allow separate workdir (#108)
Oct 10, 2023
3e11484
Update setup.sh (#124)
Oct 11, 2023
d9105f1
Fix xy coordinate data extract from cyme converter (#111)
MitchellAV Oct 12, 2023
a202c5b
Fix inconsistent validation for mdb2glm xy coordinate extract (#125)
MitchellAV Oct 12, 2023
0bdfdb8
Add spida xlsx converter (#126)
Oct 12, 2023
f89377d
Emergency fix to xlsx-spida2csv-geodata.py (#128)
Oct 12, 2023
6d1d3cd
Develop add xlsx converter (#130) (#131)
Oct 12, 2023
ed843f4
Patch mysql and distutils (#123)
Thistleman Oct 13, 2023
b6a916c
Fix mdb2glm converter autotest intermittent failures (#132)
MitchellAV Oct 13, 2023
8a465c0
Fix install m1 (#134)
Thistleman Oct 14, 2023
0637b05
Fix mysql build warnings (#136)
Oct 16, 2023
48d36b2
Mysql bugfix (#137)
Thistleman Oct 16, 2023
3b3c059
Update gridlabd-contributors (#141)
Oct 17, 2023
fff85d5
Fix inconsistency with cyme xy coordinate autotest (#139)
MitchellAV Oct 17, 2023
51653b4
Update convert.cpp (#144)
Oct 31, 2023
66ad72a
Update convert.cpp (#147)
Nov 13, 2023
804ed6b
Update cmdarg.cpp (#148)
Nov 14, 2023
ec6dce5
Develop add flush global (#149)
Nov 14, 2023
3c16005
Add weather UI
dchassin Nov 20, 2023
40d6b3a
Update nsrdb_weather.py
dchassin Nov 20, 2023
ebe24e7
Update weather ui
dchassin Nov 20, 2023
4e971a8
Update Makefile.mk
Nov 20, 2023
0bf8466
Update Makefile.mk
Nov 20, 2023
fd32064
Update sp_colorder.c
Nov 20, 2023
b49e80e
Work update
Nov 20, 2023
bc79ef1
Add viewer
Nov 20, 2023
e5966c7
Update weather app
Nov 20, 2023
50edc84
Update gridlabd-marimo
Nov 21, 2023
12b7ead
Update gridlabd-marimo
dchassin Nov 21, 2023
29bf447
Add support for editing
Nov 21, 2023
2132114
Update gridlabd-marimo
Nov 22, 2023
49fdb19
Add admin app
dchassin Nov 23, 2023
8a97127
Update marimo_admin.py
dchassin Nov 24, 2023
22985c3
Add support for loading from stdin
dchassin Nov 25, 2023
b18c626
Add support for saving to stdout using .ext
dchassin Nov 25, 2023
8efcb2c
Create gridlabd_model.py
dchassin Nov 25, 2023
4a9bcb6
Update Makefile.mk
dchassin Nov 25, 2023
1d8d762
Create marimo_loads.py
dchassin Nov 25, 2023
9b038b1
Update load.cpp
dchassin Nov 25, 2023
ab62ed3
Update save.cpp
dchassin Nov 25, 2023
4413c53
Working update
dchassin Nov 27, 2023
3a07334
Fixed mysql declaration error
Nov 29, 2023
9cd34ed
Update marimo_nsrdb_weather.py
dchassin Dec 19, 2023
87715ab
Fix mysql compile error
Dec 20, 2023
7ee06cb
Create marimo_convert.py
dchassin Dec 22, 2023
151ad1b
added libraries to library path for gha, symlinked glibtool to libtoo…
Thistleman Jan 23, 2024
f96e3b7
removed macos11 runner support
Thistleman Jan 24, 2024
a1027ba
removed macos11 dependency
Thistleman Jan 24, 2024
f5b6e43
Merge branch 'develop' into develop-add-weather-ui
Jan 25, 2024
693980b
Add JSON to CSV converter (#158)
Jan 27, 2024
f97687d
Merge branch 'develop' into develop-add-weather-ui
Jan 27, 2024
5ed1d9d
Fix XLSX converter (#157)
Jan 27, 2024
f504e10
Merge branch 'develop' into develop-add-weather-ui
Jan 27, 2024
53dc2b8
Merge branch 'develop' into develop-add-weather-ui
Jan 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix ISONE help data (#12)
Signed-off-by: David P. Chassin <dchassin@slac.stanford.edu>
Signed-off-by: David P. Chassin <david.chassin@me.com>
David P. Chassin authored and dchassin committed Oct 18, 2023

Verified

This commit was signed with the committer’s verified signature.
dchassin David P. Chassin
commit 985a6f36429a03bc52e90ff3c0cf9697aa83a5bc
2 changes: 1 addition & 1 deletion tools/autotest/test_isone.glm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#python -m isone -d=smd/ME -s=2020-03-01 -e=2020-03-01 -c=test_isone.csv -g=test_isone_opt.glm
#python -m isone -D=smd/ME -s=2020-03-01 -e=2020-03-01 -c=test_isone.csv -g=test_isone_opt.glm
module tape
{
csv_header_type NAME;
70 changes: 55 additions & 15 deletions tools/isone.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
# Syntax: isone [OPTIONS ...]
"""ISO New England data access module

Syntax: gridlabd isone OPTIONS ...
Syntax
------

Options:
-d|--dataset=DATASET/SUBSET Download data from the specified dataset
Shell:

~~~
gridlabd isone [OPTIONS ...]
~~~

GLM:

~~~
#python -m isone [OPTIONS ...]
~~~

Options
-------
-d|-debug Enable traceback output on exceptions
-D|--dataset=DATASET/SUBSET Download data from the specified dataset
(and subset, default is `smd/ISO NE CA`)
-c|--csv=FILENAME Save CSV data to the specified file
(default is /dev/stdout)
@@ -14,17 +30,37 @@
-f|--freshen Freshen the data cache
-g|--glm=FILENAME Save GLM data to the specified file
(default is /dev/null)
-h|--help|help Output the help documentation
-l|--list Output a list of available sheets in dataset
-N|--NAME=OBJECTNAME Specify the GLM object name (default is
`isone`)
-q|--quiet Suppress error output messages
-s|--start=YEAR|STARTDATE Download data starting on the specified
year or date (last month by default)
-v|--verbose Enable verbose output
-y|--year[=YEAR] Download data for the specified year
(current year by default)

Currently the only supported dataset is `smd`. The valid subsets depend on the
dataset and year. See https://www.iso-ne.com/isoexpress/web/reports/load-and-demand/-/tree/zone-info
for more information.

Example
-------

The following generates the wholesale market data New Hampshire for May 2023:

~~~
sh$ gridlabd isone -D=smd/NH -f -s=2023-05-01 -e=2023-06-01
timestamp,DA_Demand,RT_Demand,DA_LMP,DA_EC,DA_CC,DA_MLC,RT_LMP,RT_EC,RT_CC,RT_MLC,Dry_Bulb,Dew_Point
2023-05-01 00:00:00,801.30,924.94,24.63,24.64,-0.05,0.04,18.96,18.75,0.18,0.03,53,51
2023-05-01 01:00:00,807.90,899.31,20.61,20.59,-0.03,0.05,18.88,18.70,0.18,0.00,54,53
2023-05-01 02:00:00,765.20,885.84,20.56,20.57,-0.03,0.02,18.12,17.73,0.41,-0.02,54,53
...
2023-06-01 21:00:00,1753.00,1594.43,58.33,57.55,0.00,0.78,41.90,41.65,0.00,0.25,75,61
2023-06-01 22:00:00,1495.20,1425.32,50.57,50.31,0.00,0.26,35.95,35.82,0.00,0.13,77,59
2023-06-01 23:00:00,1269.60,1283.86,53.36,52.86,0.00,0.50,36.52,36.40,0.00,0.12,77,59
~~~
"""

import sys, os
@@ -34,7 +70,7 @@
import traceback

EXECNAME = os.path.splitext(os.path.basename(sys.argv[0]))[0]
DATASET = "smd"
DATASET = "smd/ISO NE CA"
CSVFILE = "/dev/stdout"
GLMFILE = None
CLASSNAME = "isone"
@@ -55,7 +91,12 @@
E_INVALID = 2
E_FAILED = 3

class IsoneException(Exception):
pass

def error(msg,code=None):
if DEBUG:
raise IsoneException(msg)
if not QUIET:
print(f"ERROR [{EXECNAME}]: {msg}",flush=True,file=sys.stderr)
if not code is None:
@@ -79,6 +120,9 @@ def get_year(year=None,dataset=None):
dataset = DATASET
verbose(f"setting to default dataset '{dataset}'")
specs = dataset.split("/")
if len(specs) != 2:
error(f"dataset {dataset} is not valid",E_INVALID)

cachefile = os.path.join(CACHEDIR,f"{specs[0]}_{year}.xlsx")
if FRESHEN or not os.path.exists(cachefile):
verbose(f"creating cache directory '{CACHEDIR}'")
@@ -95,12 +139,8 @@ def get_year(year=None,dataset=None):
error(f"unable to download data from '{url}' (HTTP code {req.status_code})",E_FAILED)
except Exception as err:
error(f"unable to get data from '{url}' ({err})",E_FAILED)
if len(specs) > 1:
verbose(f"loading '{specs[1]}' from '{cachefile}'")
return pandas.read_excel(cachefile,sheet_name=specs[1],index_col=[0,1],parse_dates=[0])
else:
verbose(f"loading data from '{cachefile}'")
return pandas.read_excel(cachefile,sheet_name=None)
verbose(f"loading '{specs[1]}' from '{cachefile}'")
return pandas.read_excel(cachefile,sheet_name=specs[1],index_col=[0,1],parse_dates=[0])

def get_data(startdate=None,stopdate=None,dataset=None):
"""Get data from a date range
@@ -110,10 +150,10 @@ def get_data(startdate=None,stopdate=None,dataset=None):
:return: pandas.DataFrame - the requested data
"""
if startdate == None:
startdate = datetime.datetime(year=datetime.datetime.now().year)
startdate = datetime.datetime(year=datetime.datetime.now().year,month=1,day=1)
else:
startdate = datetime.datetime.strptime(startdate,DATEFORMAT)
if startdate == None:
if stopdate == None:
stopdate = datetime.datetime.now()
else:
stopdate = datetime.datetime.strptime(stopdate,DATEFORMAT)
@@ -159,12 +199,12 @@ def fix_timestamps(df):
VERBOSE = True
elif token in ["-q","--quiet"]:
QUIET = True
elif token in ["--debug"]:
elif token in ["-d","--debug"]:
DEBUG = True

# -d|--dataset=DATASET/SUBSET Download data from the specified dataset
# -D|--dataset=DATASET/SUBSET Download data from the specified dataset
# (and subset, default is `smd/ISO NE CA`)
elif token in ["-d","--dataset"]:
elif token in ["-D","--dataset"]:
if value:
DATASET = value
else: