Skip to content

Commit

Permalink
Add excel optional dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
dhadka committed Sep 5, 2024
1 parent 24132d6 commit 3d14156
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
run: |
sudo apt update
sudo apt install -y graphviz r-base
pip install .[test]
pip install .[test,excel]
- name: Run example
run: |
Expand Down
1 change: 0 additions & 1 deletion examples/Eijgenraam/eijgenraam_mordm.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import functools
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import LogNorm
from rhodium import *

##==============================================================================
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dependencies = [
"mplcursors<=0.5.3",
"pydot<=2.0.0",
"SALib<=1.4.6.1",
"pandas",
"platypus-opt",
"prim"
]
Expand All @@ -30,6 +31,7 @@ dynamic = ["version"] # Version is read from rhodium/__init__.py
[project.optional-dependencies]
test = ["pytest", "mock", "pyper<=1.1.2"]
openmdao = ["openmdao"]
excel = ["pandas[excel]"]

[tool.setuptools.dynamic]
version = {attr = "rhodium.__version__"}
Expand Down
5 changes: 0 additions & 5 deletions rhodium/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,6 @@ def __str__(self):
return self._to_string()

def print_tree(self, coi=None, all=True, **kwargs):
# Being unfamiliar with version control, I just added "#", or comments, in places where I made changes to the original Rhodium code.
# Below is the unaltered (although commented out):
# print(self._to_string(coi, all, **kwargs))

# But it does not return a list of the scenario nodes, which we would like. So I made alterations to the _to_string() function to achieve this:
results, node_list = self._to_string(coi, all, **kwargs)
print(results)
return node_list
Expand Down
2 changes: 0 additions & 2 deletions rhodium/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,6 @@ def __getitem__(self, key):
return self._data[key]

def __setitem__(self, key, value):
print(key)
print(value)
if not isinstance(value, self.type):
raise TypeError("can only add " + self.type.__name__ + " objects")

Expand Down

0 comments on commit 3d14156

Please sign in to comment.