Commit Graph

25 Commits

Author SHA1 Message Date
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
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 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 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 b0b07efe94
Update to sphinx-js 3.2.1 (#3429) 2023-01-07 13:23:56 +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
Hood Chatham ffd2d4a79b
DOCS Fix rendering of function types and null (#3271) 2022-11-21 09:39:51 +09: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 0e1e2ac01c
Python 3.10 (#2225) 2022-03-17 15:48:56 -07:00
Henry Schreiner 66856a7427
MAINT isort (#2200) 2022-02-21 23:27:03 +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
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
Roman Yurchak 2a906bd489
MAINT hide jsdoc_dump.json from grep results [skip ci] (#1531) 2021-04-22 21:58:20 +02:00
Hood Chatham 1781b8760f
DOCS Edits to Javascript API docs (#1427) 2021-04-09 20:30:40 +02:00
Hood Chatham 150c1f6b45
API Add "loadPyodide" function (#1363)
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2021-04-01 00:43:46 +02:00
Hood Chatham 0b5c80862d
DOCS API docs for pyproxy (#1371) 2021-03-25 09:26:07 -07:00
Hood Chatham 85dd7485de
Fix broken link to languagePluginLoader in js API summary (#1362) 2021-03-22 09:42:07 -07:00
Hood Chatham ccd0f1335b
DOC Implement autosummary for js autodoc, use autodocsumm for py autodoc (#1354) 2021-03-22 09:39:09 +01:00