Skip to content

Commit

Permalink
Merge pull request #4 from pyiron/package_freedom
Browse files Browse the repository at this point in the history
Package freedom
  • Loading branch information
liamhuber authored Oct 12, 2022
2 parents 17da752 + 19a31c5 commit 385fa41
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
**/*.pyc
**/*checkpoint.py
info.log
pyiron.log
scratch.ipynb
pyiron.log
8 changes: 4 additions & 4 deletions ryven/ironflow/Gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from .CanvasObject import CanvasObject, gui_modes

import ryven.NENV as NENV
from pathlib import Path

__author__ = "Joerg Neugebauer"
__copyright__ = (
Expand All @@ -24,18 +25,17 @@
os.environ["RYVEN_MODE"] = "no-gui"
NENV.init_node_env()

PACKAGES = ["ryven/std", "ryven/nodes/built_in/"] # , 'ryven/mynodes']

ryven_location = Path(__file__).parents[1]
packages = [os.path.join(ryven_location, *subloc) for subloc in [("std",), ("nodes", "built_in")]] # , ("mynodes",)
alg_modes = ["data", "exec"]


debug_view = widgets.Output(layout={"border": "1px solid black"})


class GUI:
def __init__(self, packages=None): # , onto_dic=onto_dic):
def __init__(self): # , onto_dic=onto_dic):
session = rc.Session()
packages = packages if packages is not None else PACKAGES
for package in packages:
session.register_nodes(
import_nodes_package(NodesPackage(directory=package))
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_CanvasObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class TestCanvasObect(TestCase):

def setUp(self):
self.gui = GUI(packages=["../../ryven/std", "../../ryven/nodes/built_in/"])
self.gui = GUI()
self.canvas = self.gui.canvas_widget

@classmethod
Expand Down

0 comments on commit 385fa41

Please sign in to comment.