diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index ae9c0c2..891a47d 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -17,5 +17,6 @@ runs: - name: Run pytest run: | - conda run -n test pytest + source ~/miniconda/bin/activate test + pytest shell: bash -el {0} diff --git a/docs/source/userGuides/graphing.rst b/docs/source/userGuides/graphing.rst index 2436566..024f407 100644 --- a/docs/source/userGuides/graphing.rst +++ b/docs/source/userGuides/graphing.rst @@ -125,13 +125,25 @@ For this example, we construct a very simple hyperameter space to example the br Step 2: Preprocessing ^^^^^^^^^^^^^^^^^^^^^ +Handle filepaths -- not necessary when running locally! + +.. ipython:: python + + import sys, os + sys.path.insert(0, os.path.abspath('.')) + yaml = os.path.join(os.path.abspath('.'),'source', 'userGuides', 'demoFiles', 'params.yaml') + + if not os.path.isfile(yaml): + # Print the current working directory + cwd = os.getcwd() + raise FileNotFoundError(f"YAML parameter file could not be found: {yaml}\nCurrent working directory: {cwd}") + See the :ref:`preprocessing` for a detailed look at the steps involved in data preprocessing. In this specific example, the breast cancer dataset being used has no missing values and most pre-processing steps required for more `organic`, real world datasets have already been taken by scikit-learn. .. ipython:: python from thema.multiverse import Planet - yaml = "/Users/gathrid/Repos/thema_light/Thema/docs/source/userGuides/demoFiles/params.yaml" planet = Planet(YAML_PATH=yaml) planet.fit() diff --git a/thema/multiverse/universe/galaxy.py b/thema/multiverse/universe/galaxy.py index f59eeed..03d8ab0 100644 --- a/thema/multiverse/universe/galaxy.py +++ b/thema/multiverse/universe/galaxy.py @@ -437,7 +437,7 @@ def show_mds(self, randomState: int = None): ) # Update fig axis template - fig.update_layout(template="none", width=1100, height=700, margin={"r": 100}) + fig.update_layout(template="none", margin={"r": 100}) fig.add_annotation( x=1.1, y=0.5, @@ -449,7 +449,10 @@ def show_mds(self, randomState: int = None): textangle=90, ) # Show figure - fig.show() + import plotly.io as pio + + pio.show(fig) + # fig.show() def save(self, file_path): """