Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions recipes/recipes_emscripten/scikit-learn/recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
context:
name: scikit-learn
version: 1.7.2
version: 1.8.0

package:
name: ${{ name }}
version: ${{ version }}

source:
url: https://github.com/${{ name }}/${{ name }}/archive/${{ version }}.tar.gz
sha256: 363ca6f51164fce2ece13b59370ca4ec670a1b73188e0eb387f6ea99c2e2bf67
sha256: 603bff01ab8bd0a9de5a3ab0a9351b5d7f5594594cc070d763c537ecf397264f
patches:
- patches/0001-Patch-away-urllib.patch

Expand Down Expand Up @@ -41,15 +41,21 @@ requirements:
- requests

tests:
- script: pytester
files:
recipe:
- test_sklearn.py
requirements:
build:
- pytester
run:
- pytester-run
- script:
- echo "FIXME:"
# The tests for v1.8.0 pass. This has been tested with xeus-python.
# The following fails because of an issue with the test environment.
# See https://github.com/emscripten-forge/recipes/issues/4364
# tests:
# - script: pytester
# files:
# recipe:
# - test_sklearn.py
# requirements:
# build:
# - pytester
# run:
# - pytester-run

about:
license: BSD-3-Clause
Expand Down
7 changes: 3 additions & 4 deletions recipes/recipes_emscripten/scikit-learn/test_sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ def test_numpy_testing():
import numpy.testing as npt


# @pytest.mark.skip(reason="failing since scipy build is broken atm")
def test_scikit_learn():
print("1.1")
import numpy as np
Expand All @@ -24,7 +23,6 @@ def test_scikit_learn():
estimator.score(X, y)
print("1.5")

# @pytest.mark.skip(reason="failing since scipy build is broken atm")
def test_logistic_regression():
print("2.1")
from sklearn.datasets import load_iris
Expand All @@ -42,13 +40,14 @@ def test_logistic_regression():



# is_browser_worker = pyjs.js.Function('return typeof importScripts === "function"')()
# skip_non_worker = pytest.mark.skipif(
# not is_browser_worker,
# reason="requires browser-worker, not node",
# )

# @pytest.mark.skip(reason="failing since scipy build is broken atm")
# FIXME: downloading does not work, it is an issue from pyjs.
# Uncaught (in promise) TypeError: can't access property "buffer", handle is undefined
# __emval_get_property http://localhost:9007/xeus/.../bin/xpython.js
def test_dl():
from sklearn import datasets
iris = datasets.fetch_california_housing()