Commit Graph

60 Commits

Author SHA1 Message Date
Gyeongjae Choi 2046310460
ENH Support SDL-based packages and add pyxel (#3508)
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2023-03-30 08:18:31 +00:00
Christian Clauss 57f36ac6f8
Ruff is now compatible with Python pattern matching (#3650) 2023-03-13 22:45:06 +01:00
Hood Chatham ad483dc14d
NFC Rearrange api.ts (#3547) 2023-03-06 13:11:33 +09:00
Roman Yurchak 48258ff146
Replace isort, flake8, pycln and pyupgrade by ruff (#3522)
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
2023-02-07 08:35:20 +09:00
Hood Chatham 861a758c3b
Add new `pyodide.ffi` JavaScript submodule with PyProxy subtypes (#3523)
This creates a new `pyodide.ffi` submodule and adds a bunch of new subclasses of
`PyProxy` to it.

There are three stages in which we are concerned with the behavior of the
objects we define:
1. at time of static typechecks
2. at execution time
3. when generating docs

Prior to this PR, the subtypes of PyProxy only work well for static type checks,
they work acceptably at runtime (just don't let the user access them), and the
docs don't look that great. This PR is primarily intended to improve the docs
for PyProxy, but they also make execution time checks work better: you can now
say `obj instanceof pyodide.ffi.PyCallable` instead of `obj.isCallable()` which
I is easier to understand and to cross reference against the documentation. I am
marking `isCallable` as deprecated.

I also made a bunch of edits and improvements to the docs.

I have deprecated `PyProxyCallable` in favor of `pyodide.ffi.PyCallable` and
`PyProxy.isCallable` in favor of `obj instanceof pyodide.ffi.PyCallable`.
`PyBuffer` has been renamed to `pyodide.ffi.PyBufferView` and a new `PyBuffer`
has been created which is a subtype of `PyProxy`.
2023-02-05 19:35:08 -08:00
Hood Chatham 20e92c37ca
DOCS, MAINT: Replace :any: xrefs with more specific types (#3531)
This leads to more consistent rendering (functions and methods get parens after
them) and reduces chances of warnings about getting the wrong link. It is also
possible to use `~fully.quallified.name` to just show `name` if we use a specific
reference type, but it doesn't work with `any` for some reason.
2023-02-01 11:00:58 -08:00
Gyeongjae Choi 328a9ffc34
Add tag key in meta.yaml spec (#3444)
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2023-01-27 13:31:26 +09:00
Hood Chatham 8c5ae6ff9e
Update description of github releases in docs (#3498) 2023-01-24 13:11:31 -08:00
Hood Chatham 3b2952fc92
Python3.11 (#3252) 2023-01-23 19:45:59 -08:00
Hood Chatham 8a26af4f76
DOCS Improve JavaScript type rendering (#3481) 2023-01-22 09:26:42 +01:00
Hood Chatham 69d7b4e099
Remove napoleon_fixes (#3479)
I upstreamed all of this into sphinx-autodoc-typehints.
2023-01-21 17:44:20 -08:00
Hood Chatham 6972ff101d
DOCS Add sphinx cross referencing to MDN docs using intersphinx (#3477) 2023-01-20 11:21:44 +09:00
Hood Chatham 9b58bf4294
DOCS Remove ensure_argument_types and use autodoc-typehints feature for this (#3475)
Turns out there was a setting for this. Should have read the docs!
2023-01-18 14:13:17 -08:00
Hood Chatham 920f2e1679
DOCS: Help Spinx find ffi types (#3465)
The `pyodide.ffi` stuff is defined in `_pyodide._core_docs`. We don't want `_pyodide._core_docs` to appear in the documentation because this isn't where you should import things from so we override the `__name__` of `_pyodide._core_docs` to be `pyodide.ffi`. But then Sphinx fails to locate the source for the stuff defined in `_pyodide._core_docs`. This patches `ModuleAnalyzer` to tell it to look for the source of things from `pyodide.ffi` in `_pyodide._core_docs`.
2023-01-17 22:34:15 -08:00
Hood Chatham 3cc6ac7873
Minor docs fixes (#3467)
Remove the property prefix from properties, add a link for ast.Module.

Previously this included more significant changes but they have been upstreamed into sphinx-autodoc-typehints.
2023-01-18 14:00:39 +09:00
Hood Chatham 4ff8687965
DOCS Fixes for shortcomings of napoleon (#3451)
I opened a PR for one of the Napoleon changes:
https://github.com/sphinx-doc/sphinx/pull/11131
But we use Sphinx v5.3 so even if we upstream Napoleon fixes into Sphinx v6.x, 
we won't get to use them for a while.
2023-01-16 19:59:07 -08:00
Hood Chatham f55bb2e423
Cleanup of documentation configuration (#3448) 2023-01-14 15:01:20 +01:00
Hood Chatham b0b07efe94
Update to sphinx-js 3.2.1 (#3429) 2023-01-07 13:23:56 +02:00
Hood Chatham aeb066bbce
DOCS Improve rendering of JavaScript property types (#3426) 2023-01-06 00:06:04 -05:00
Hood Chatham e90154f3e2
DOCS Use autodoc typehints and make various improvements to autodoc rendering (#3405)
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2023-01-04 11:51:09 +02:00
Hood Chatham 1169cf59a3
Hide deprecated arguments from docs (#3396)
This adds a mechanism to hide deprecated or private arguments from the documentation and
applies it to errorCallbackDeprecated.
2023-01-03 13:26:37 +09:00
Hood Chatham bddcc22dda
DOCS Fix the async prefix, improvement to summary table format (#3399) 2023-01-02 10:33:55 +09:00
Gyeongjae Choi 8c6b0a365a
Remove interface.ts and fix doc build error (#3377) 2022-12-21 16:28:05 +09:00
Hood Chatham 560364b98a
Add type field to PythonError (#3289) 2022-11-25 17:01:03 +09:00
Hood Chatham ffd2d4a79b
DOCS Fix rendering of function types and null (#3271) 2022-11-21 09:39:51 +09:00
Gyeongjae Choi 3ad41f13c7
Merge library and sharedlibrary key to build/type (#3238) 2022-11-13 12:31:14 +09:00
Roman Yurchak 4dd8a3e0cb
Switch to meta.yaml parsing with pydantic (#3079) 2022-09-11 09:20:56 +02:00
Ryan Russell 42d33407ca
DOCS Fix Typos (#2656)
Fixed 2 typos.
2022-05-31 16:06:06 -07:00
Henry Schreiner 5523d539bf
chore(types): fill out remaining partial types (#2612) 2022-05-25 20:31:04 -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 6e3de5734f
Fix test_pyodide_analyzer (#2501)
This fixes a mistake I committed in #2496.
2022-05-05 08:13:02 -06:00
Hood Chatham 3334580867
Remove private names from js api docs (#2496)
Some private names ended up in the docs for some reason. This removes them.
2022-05-04 21:52:17 -06:00
Gyeongjae Choi 6d34ef0b6f
DOC Fix renderer for Interface type (#2417) 2022-04-21 15:55:50 +09:00
Gyeongjae Choi a95a27e754
DOC Remove dummy packages from docs (#2358) 2022-04-14 06:22:07 -07:00
Hood Chatham 0e1e2ac01c
Python 3.10 (#2225) 2022-03-17 15:48:56 -07:00
Henry Schreiner 4f8b0a0344
chore: more pre-commit checking (#2257) 2022-03-07 21:51:20 -08:00
Hood Chatham fff0f0e9b0
Add `default_converter` argument to `to_js` and `toJs` (#2208) 2022-03-05 12:32:04 -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
Henry Schreiner 41b6db1bab
style: improve pre-commit (#2177) 2022-02-19 09:06:25 +01:00
Hood Chatham ad114b72a2
Fix typescript documentation (#2130) 2022-01-27 00:03:50 -08:00
Roman Yurchak ba1179ee78
MAINT Remove deprecated functions for 0.18.0 (#1838)
Co-authored-by: Hood <hood@mit.edu>
2021-10-15 07:37:30 -07:00
Gyeongjae Choi e37997aca8
DOC Fix Sphinx latex build error (#1877) 2021-10-07 16:11:56 +02:00
Gyeongjae Choi d7fc853091
DOC Add documentation for packages in pyodide [skip ci] (#1874) 2021-10-06 09:23:00 +02:00
Hood Chatham ef88ceeb5d
Run prettier to format documentation source files [skip ci] (#1752) 2021-07-27 01:00:27 +02:00
Hood Chatham b401350a2a
ENH More complete typescript types (#1601) 2021-05-31 19:06:56 -07:00
Hood Chatham 97d7dfcdf9
Some basic types (#1592) 2021-05-20 09:05:05 -07:00
Hood Chatham ab1b6c8d24
MAINT Use prettier to format javascript (#1554)
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2021-05-01 10:17:32 -07:00