Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
mrvisscher committed Sep 23, 2024
2 parents b715f61 + 73b3908 commit a75c401
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
4 changes: 2 additions & 2 deletions bw_scenarios/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ def __init__(self):

@classmethod
def from_excel(cls, path) -> "SDFImporter":
"""Read scenarios from a SDF in excel format"""
"""Read scenarios from an SDF in excel format"""
pass

@classmethod
def from_csv(cls, path) -> "SDFImporter":
"""Read scenarios from a SDF in csv format"""
"""Read scenarios from an SDF in csv format"""
pass

@property
Expand Down
23 changes: 11 additions & 12 deletions notebooks/test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 2,
"metadata": {},
"outputs": [
{
Expand All @@ -11,27 +11,26 @@
"text": [
"<>:4: SyntaxWarning: invalid escape sequence '\\s'\n",
"<>:4: SyntaxWarning: invalid escape sequence '\\s'\n",
"C:\\Users\\nrengberg\\AppData\\Local\\Temp\\ipykernel_23300\\2399333353.py:4: SyntaxWarning: invalid escape sequence '\\s'\n",
"C:\\Users\\nrengberg\\AppData\\Local\\Temp\\ipykernel_27788\\137448011.py:4: SyntaxWarning: invalid escape sequence '\\s'\n",
" file = 'bw_scenarios\\sdf\\sdf.xlsx'\n"
]
},
{
"ename": "SyntaxError",
"evalue": "invalid syntax (2399333353.py, line 6)",
"output_type": "error",
"traceback": [
"\u001b[1;36m Cell \u001b[1;32mIn[5], line 6\u001b[1;36m\u001b[0m\n\u001b[1;33m data = bws.import(file)\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
]
}
],
"source": [
"import bw_scenarios as bws\n",
"from bw_scenarios.importer import SDFImporter\n",
"\n",
"#sdf-file directory\n",
"file = 'bw_scenarios\\sdf\\sdf.xlsx'\n",
"\n",
"data = bws.import(file)"
"scenarios = SDFImporter.from_csv(file)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit a75c401

Please sign in to comment.