Commit Graph

90 Commits

Author SHA1 Message Date
Gyeongjae Choi dddfa820f9
Remove deprecated methods (#3677)
Remove deprecated methods before releasing 0.23 following the [deprecation timeline](https://github.com/pyodide/pyodide/blob/main/docs/project/deprecation-timeline.md)
2023-03-27 10:48:33 +09:00
Christian Clauss 57f36ac6f8
Ruff is now compatible with Python pattern matching (#3650) 2023-03-13 22:45:06 +01:00
Gyeongjae Choi edf175f013
TST Run package tests in Safari (#3095) 2022-09-14 09:13:53 +09:00
Gyeongjae Choi 0333d1fa36
CI Fix pytest runtime option syntax (#3084) 2022-09-08 22:39:42 +09:00
Gyeongjae Choi 6964672556
Fix incorrect package name of ruamel.yaml (#3036) 2022-08-30 16:25:13 +09:00
Gyeongjae Choi fcfbdccd24
Fix package import test (#2942) 2022-08-08 11:24:34 +09:00
Gyeongjae Choi 512d2bd950
MAINT Rename pytest_pyodide wrappers 2022-08-03 13:34:25 +09:00
Roman Yurchak c85e00806b
MAINT Switch to pytest-pyodide (#2893)
Co-authored-by: ryanking13 <def6488@gmail.com>
2022-07-31 19:00:45 +09:00
Gyeongjae Choi 21b592a6d2
TST Fix test skip check (#2915) 2022-07-29 08:54:36 +09:00
Gyeongjae Choi dc31bc8f3e
Set initialization script for pyodide-test-runner (#2889) 2022-07-22 11:59:51 +09:00
Gyeongjae Choi 1fc2fc4256
CI Split up package test jobs (#2852)
This PR splits package test in CI so that no-numpy-dependents packages can be tested earlier. In detail, pytest will now save test results into its cache directory, and if --skip-passed option is given, it will skip previously successful tests.
2022-07-11 09:52:38 +09:00
Gyeongjae Choi 7d7b7e899d
TST Make `pyodide-test-runner` installable (#2742) 2022-07-04 09:07:01 +02:00
Gyeongjae Choi 74a89826ce
TST Add Playwright for an auxiliary testing framework (#2091) 2022-05-31 08:17:47 +09:00
Hood Chatham 1eab80ea40
MAINT Add pytest.mark.xfail_browsers and use it to reduce boilerplate (#2616)
Use a decorator to indicate which browsers we want to xfail test. 
This works for `run_in_pyodide` as well as normal tests.
2022-05-25 13:34:40 -07:00
Hood Chatham 60b9344b56
MAINT Improvements to micropip test mocks (#2589)
Various improvements to `test_micropip`. The main feature is a new fixture
`mock_fetch` with an `add_pkg` method that takes a package name, a map
from version to requirements, and a choice of platform. This should
hopefully make writing more tests a lot easier (which is good because
we could use more micropip test coverage but we are limited by the
difficulty of writing good tests).

This also adds a fixture to create distinct dummy package names and
enables `@pytest.mark.asyncio` to handle the async calls rather than
using `asyncio.get_event_loop.run_until_complete`.
2022-05-21 21:11:30 -07:00
Henry Schreiner e31bb554e4
chore: complete more incomplete types (#2590)
* chore: add some incomplete types
* chore: modernize pyproject.toml

Adding more incomplete types. About 2/3 of the way through being
able to turn on the strictness flag for it.
2022-05-21 13:35:02 -07:00
Hood Chatham ecaab15c12
Pytest rewrites for run_in_pyodide (#2510) 2022-05-08 18:43:26 -07:00
Hood Chatham 919bd556d3 Revert "Try to fix contest"
This reverts commit a4fe91df04.
2022-05-08 08:51:35 -07:00
Hood Chatham a4fe91df04 Try to fix contest 2022-05-08 08:48:09 -07:00
Gyeongjae Choi b20b43bd66
MAINT Split conftest.py into modules (#2418) 2022-05-08 16:52:08 +09:00
Gyeongjae Choi 6900afdc5b
PKG Add opencv-python, ffmpeg and libwebp (#2305)
* Add opencv-python

* Update comment

* Add JPEG, PNG, WEBP, ZLIB support

* Add tests for image processing

* Add more core modules

* Disable opencl

* Replace lena with baboon and add more tests

* Add file system support

* Add ffmpeg

* Add more tests

* Disable pthread in ffmpeg

* Disable canonical input processing mode in node test

* Update changelog

* Remove import test

* Allow more time in the first test

* Split out libwebp

* Fix node test

* Use a seperate CI job for opencv-python

* Fix generator

* Update changelog

* Remove protobuf package

* Try to fix CI workspace conflict

* Fix CI

* Use another CI job for generating unified packages.json

* Try to fix CI

* Fix CI again

* Disable verbose build

* Prevent from building opencv-python twice

* Persist only build artifacts

* Sepearate Cmake args into a script

* Try to reuse build packages job

* Fix CI

* Fix typo

* Fix merge conflict

* Use large resource class for package build

* Do not upload unwanted artifacts

* Do not upload unwanted artifacts
2022-04-19 09:24:47 +09:00
Hood Chatham e5a46e520a
Fix npm package (#2394)
Various fixes to improve the npm package.

Switch to publishing the dist folder, fix indexURL for node, 
fix node commonJS import and ES6 import only publish core 
Pyodide interpreter to npm, download and cache other wheels 
on first use.
2022-04-17 21:10:03 -07:00
Hood Chatham 50af355e8c
Rename 'build' directory to 'dist' (#2387)
dist is both more accurate (the 'build' directory is normally where you do the build,
and normally consists of intermediate build artifacts no one cares about). dist also
occurs less frequently in the code base: after this change \bbuild\b has 466 matches,
whereas \bdist\b has 101 matches. build has 1072 matches whereas dist has 362.
2022-04-11 16:01:40 -07:00
Gyeongjae Choi bd8f8c094d
TST Enable some skipped or xfailed tests (#2368) 2022-04-08 15:54:29 +02:00
Hood Chatham eb8afb00c2
Update libffi commit (#2350)
All libffi tests pass now. The only failing ctypes test is test_callback_too_many_args which doesn't segfault anymore, it only soft fails. Planning to submit a PR to cpython that fixes test_callback_too_many_args.
See also:
bugs.python.org/issue47208
https://github.com/emscripten-core/emscripten/pull/16658
2022-04-04 21:18:20 -07:00
Hood Chatham 844cc24fe0
Merge together unpack_buffer and unpack_buffer_archive (#2307)
When I added unpack_buffer_archive, in code review people said
it was redundant with unpack_buffer and they should be merged.
I said merging was too annoying. They were right. This merges
the functions together into a function with a 38 line docstring
and a 18 line implementation.
2022-03-24 18:31:18 -07:00
Hood Chatham 7f908beb4c
ENH Calculate indexURL from error stack trace (#2292)
If no indexURL is provided, we throw and catch an error and
then use ErrorStackParser to calculate where pyodide.js has
been loaded from. Resolves #2290.

Question: But getting the URL from error stack trace is well... really
hacky. Can't we use
[`document.currentScript`](https://developer.mozilla.org/en-US/docs/Web/API/Document/currentScript)
or
[`import.meta.url`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import.meta)
instead?
Answer: `document.currentScript` works for the browser main thread.
`import.meta` works for es6 modules. In a classic webworker, I think there
is no approach that works. Also we would need some third approach for node
when loading a commonjs module using `require`. On the other hand, this
stack trace approach works for every case without any feature detection
code.
2022-03-20 22:44:54 -07:00
Henry Schreiner 4f8b0a0344
chore: more pre-commit checking (#2257) 2022-03-07 21:51:20 -08:00
LeoPsidom 8798e1f2fd
Use ESM import in module type webworker (#2220)
Co-authored-by: root <root@ip-172-31-32-133.us-east-2.compute.internal>
2022-03-02 00:31:41 -08:00
Henry Schreiner 8d00451142
chore: enable the rest of flake8 & bugbear (#2216) 2022-02-27 12:39:53 -05:00
Henry Schreiner 8385df36a4
tests: enabling mypy on untyped defs (#2204) 2022-02-23 17:10:53 -05:00
Henry Schreiner 66856a7427
MAINT isort (#2200) 2022-02-21 23:27:03 +01:00
Henry Schreiner ed22c06e07
chore: pyupgrade 3.9+ (#2195) 2022-02-20 17:13:37 -05:00
Hood Chatham 391c43e662
MAINT Separate some things out of Module (#2144) 2022-01-30 11:08:44 -08:00
Hood Chatham 8323987b39
Use wheels instead of file_packager (#2027) 2022-01-23 17:47:04 -08:00
Hood Chatham a053ed74f9
ENH Add install archive api (#2018) 2021-12-12 17:29:06 -08:00
Hood Chatham f22f679328
ENH Add pyimport api that imports a Python package and returns it as a pyproxy (#1944) 2021-12-05 09:56:05 -08:00
Roman Yurchak 7f307afe29
Better test discovery (#1981)
* Better test discovery

* Remove make test and update docs

* More fixes

* Address review comment

* Documentation fixes
2021-11-21 18:26:33 +01:00
Roman Yurchak 74c1d4aa9a
CI with Github Actions and conda (#1690) 2021-10-27 09:35:59 +02:00
Hood Chatham 49b33b5442
Add package config for pyodide package (#1848) 2021-09-21 08:46:44 +02:00
Hood Chatham 687aa095f3
Fix bug when function returns destroyed proxy (#1847) 2021-09-20 23:51:31 +02:00
Hood Chatham 4cf245aa55
Add cffi package (#1761) 2021-08-01 16:12:14 +02:00
Hood Chatham 3eb82fd834
Improved micropip dependency resolution (#1756) 2021-07-29 18:25:18 +02:00
stefnotch 5c324c4bed
Allow overriding input (#1728) 2021-07-26 13:02:33 +02:00
Hood Chatham db1945b5e9
MAINT Improve selenium fatal error message (#1736) 2021-07-22 18:22:43 -07:00
Hood Chatham f0bd568a31
Set up pytest node tests (#1717) 2021-07-20 10:48:27 +02:00
arfy slowy 196bf5eba9
MAINT remove unnecessary 'else' after return (#1716) 2021-07-16 11:37:48 +02:00
Hood Chatham 7e1c7ea180
Improve lifetime management for PyProxy attributes (#1636) 2021-07-10 15:05:29 -07:00
Hood Chatham c05c1cac78
Eliminate pyproxy leaks (#1616) 2021-06-07 09:23:47 +02:00
Hood Chatham 69d77194d8
ENH Use leading $ to distinguish shadowed PyProxy methods (#1604) 2021-06-05 19:13:40 +02:00