Skip to content

Commit

Permalink
Add extremely restrictive setup dependencies to get back to a working…
Browse files Browse the repository at this point in the history
… instance
  • Loading branch information
WarmCyan committed Jun 14, 2024
1 parent cba558b commit a8420e2
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 17 deletions.
8 changes: 8 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# https://madewithml.com/courses/mlops/makefile
SHELL = /bin/bash
VERSION := $(shell python -c "import icat; print(icat.__version__)")
MM_INIT = eval "$$(micromamba shell hook --shell bash)"

.PHONY: help
help: ## display all the make commands
Expand Down Expand Up @@ -46,3 +47,10 @@ test: ## run unit tests
.PHONY: test_debug
test_debug: ## run unit tests with playwright debugging enabled
PWDEBUG=1 pytest -s


.PHONY: scratch
scratch: ## build an environment completely from scratch and run tests
-micromamba env remove -n icat-scratch -y
micromamba create -n icat-scratch python -y
$(MM_INIT) && micromamba activate icat-scratch && pip install -e . && pip install -r requirements.txt && playwright install && pytest -s
14 changes: 2 additions & 12 deletions notebooks/simple_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"id": "66b5d51f-ad83-496e-9eeb-9edbcec98ca2",
"metadata": {},
"source": [
"Now we create a model to explore with. ICAT's \"anchor types\" tab will automatically detect any `Anchor` class definitions, allowing you to dynamically add that anchor type to work with directly within the interface. Alternatively, you can pass the types you want to use to the constructor, or subsequently call `model.anchor_list.add_anchor_type(LMSimAnchor)`"
"We create a model instance with the dataset, pointing it at the column containing the text to apply any created features to."
]
},
{
Expand All @@ -101,16 +101,6 @@
"model.view"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "dcafa0a9-59d9-4db0-a5d8-769e2034fe77",
"metadata": {},
"outputs": [],
"source": [
"model.data.active_data"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -136,7 +126,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.14"
"version": "3.12.3"
}
},
"nbformat": 4,
Expand Down
29 changes: 24 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,36 @@ def get_property(prop):
],
python_requires=">=3.10",
packages=["icat"],
# install_requires=[
# "panel",
# "pyviz_comms",
# "numpy",
# "pandas",
# "scikit-learn",
# "ipyanchorviz",
# "altair",
# #"jupyter_bokeh",
# #"ipywidgets-bokeh",
# "ipyvuetify",
# "ipywidgets==8.1.2",
# "jupyterlab-widgets==3.0.10",
# ],
install_requires=[
"panel",
"panel<1.2",
"pyviz_comms<3",
"numpy",
"pandas",
"scikit-learn",
"ipyvuetify",
"ipywidgets",
"ipyanchorviz",
"altair",
"jupyter_bokeh",
"ipywidgets-bokeh",
"ipyvue==1.9.1",
"ipyvuetify==1.8.10",
"ipywidgets==8.0.6",
"param<2",
"traitlets==5.9.0",
"bokeh==3.1.1",
"jupyterlab==4.1.2",
"jupyterlab_server==2.23.0",
"jupyterlab-widgets==3.0.7",
],
)
8 changes: 8 additions & 0 deletions tests/test_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,11 @@ def test_jupyter(jupyter_server, page):
page.keyboard.press("Shift+Enter")

expect(page.locator(".anchorviz")).to_be_visible(timeout=15000)

page.get_by_role("button", name="Dictionary").click()

expect(page.locator("div.v-data-table.softhover-table").all()[1]).to_be_visible()
# inner_tables = page.locator(".softhover-table").all()
# assert len(inner_tables) > 0
# for table in inner_tables:
# expect(table).to_be_visible()

0 comments on commit a8420e2

Please sign in to comment.