Skip to content

Commit

Permalink
fix github testing workflow: pytest now run without conda
Browse files Browse the repository at this point in the history
  • Loading branch information
sgathrid committed Aug 17, 2024
1 parent b826aa9 commit e43dbb6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/actions/run-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ runs:

- name: Run pytest
run: |
conda run -n test pytest
source ~/miniconda/bin/activate test
pytest
shell: bash -el {0}
14 changes: 13 additions & 1 deletion docs/source/userGuides/graphing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
7 changes: 5 additions & 2 deletions thema/multiverse/universe/galaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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):
"""
Expand Down

0 comments on commit e43dbb6

Please sign in to comment.