1311 Commits

Author SHA1 Message Date
Andrea Giammarchi
d080246a0f Update MicroPython to its latest (#2003) 2024-03-21 11:47:47 +01:00
Andrea Giammarchi
98c0f5e50d Fix #2000 - Allow advanced users to deal themselves with responses (#2001)
* Fix #2000 - Allow advanced users to deal themselves with responses

* rolled back the direct utility idea

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Updated to latest MicroPython and latest way to have direct access with fetch

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-20 16:40:24 +01:00
Andrea Giammarchi
a1268f1aa2 Fix #1993 - Expose a handy fetch API (#1994) 2024.3.1 2024-03-14 19:36:23 +01:00
Christian Clauss
69b8884045 Keep GitHub Actions up to date with GitHub's Dependabot (#1992)
* Keep GitHub Actions up to date with GitHub's Dependabot

Fix the warning like at the bottom right of
https://github.com/pyscript/pyscript/actions/runs/8263920642

# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-14 15:36:18 +01:00
Andrea Giammarchi
df1d699fe6 [feature] py-editor setup (#1989) 2024-03-13 12:25:30 +01:00
Andrea Giammarchi
84f197b657 Updated polyscript to its latest (#1982) 2024.2.1 2024-02-15 17:49:09 +01:00
Andrea Giammarchi
5bed5ede52 Fix #1974 - Use utf-8 encoding to bootstrap stdlib (#1981) 2024-02-14 09:59:18 +01:00
Fabio Pliger
f6d5cf06c8 Add text to pydom.Element (#1911)
* add missing test for html attribute

* add test for text attribute

* fix text attribute test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Andrea Giammarchi <andrea.giammarchi@gmail.com>
2024-02-12 11:50:36 -08:00
Andrea Giammarchi
30c6c830ae Fix #1972 - Evaluate users' code a part (#1975) 2024-02-09 15:52:29 +01:00
Shubhal Gupta
d7084f7f55 Fix: Restored the development docs #1783 (#1803)
* Fix: Restored the development docs #1783

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Andrea Giammarchi <andrea.giammarchi@gmail.com>
2024-02-07 11:17:50 +01:00
pre-commit-ci[bot]
a87d2b3fea [pre-commit.ci] pre-commit autoupdate (#1917)
updates:
- [github.com/psf/black: 23.11.0 → 24.1.1](https://github.com/psf/black/compare/23.11.0...24.1.1)
- [github.com/pycqa/isort: 5.12.0 → 5.13.2](https://github.com/pycqa/isort/compare/5.12.0...5.13.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Andrea Giammarchi <andrea.giammarchi@gmail.com>
2024-02-07 11:13:05 +01:00
Fábio Rosado
81a26363a3 Update bug template to point users to pyscript.com issue tracker (#1971)
* Update bug template to point users to pyscript.com issue tracker

* add bold to make it more visible
2024-02-06 14:23:12 +00:00
Andrea Giammarchi
53e945201d Update polyscript to fix a try/catch issue (#1968) 2024-02-02 15:33:26 +01:00
Andrea Giammarchi
181d276c8b Allow Workers w/out SharedArrayBuffer (#1967)
Allow Workers w/out SharedArrayBuffer
2024-02-02 15:03:30 +01:00
Fabio Pliger
bcaab0eb93 PyDom compatibility with MicroPython (#1954)
* fix pydom example

* fix the pydom test example to use a python syntax that works with MicroPython by replacing datetime

* add note about capturing errors importing when

* patch event_handler to handle compat with micropython

* turn pyweb into a package and remove hack to make pydom a sort of module with an ugly hack

* add pydom example using micropython

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix select element test

* change pydom test page to let pytest tests load it properly

* add missing folders to test dev server so it can run examples in the manual tests folder

* add pydom tests to the test suite as integration tests

* lint

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* improve fixes in event_handling

* change when decorator to actually dynamically fail in micropython and support handlers with or without arguments

* simplify when decorator code

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add type declaration back for the MP use case

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* removed code to access pydom get index as I can't think of any proper use case

* remove old commented hack to replace pydom module with class

* fix examples title

* precommit checks

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024.1.3
2024-01-30 11:30:16 -08:00
Andrea Giammarchi
3ff0f84391 Update polyscript + coincident to their latest (#1958) 2024-01-30 12:31:44 +01:00
Andrea Giammarchi
2b411fc635 Update Polyscript to its latest w/ experimental (#1955) 2024.1.2 2024-01-29 12:00:37 +01:00
Fabio Pliger
2128572ce5 pyweb camera support (#1901)
* add media module

* add Device class to media

* add camera test example

* add snap, download and other convenience methods

* load devices automagically

* add draw method to canvas

* add docstring for download

* add docstrings to draw method

* add docstrings to snap

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* load devices as soon as the page loads

* solve conflict

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove display calls listing devices in camera example

* fix typos and other small errors

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix typo in docstring

* fix error message typo

* replace setAttribute on JS properties with accessors

* remove debug statement

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add docstrings

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add docstrings to camera example

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-26 14:33:02 -08:00
Andrea Giammarchi
63f2453091 Fix #1946 - Do not hold while bootstrapping (#1953) 2024-01-26 15:04:02 +01:00
Andrea Giammarchi
f6470dcad5 Multiple Worker based Terminals (#1948)
Multiple Worker based Terminals
2024-01-24 17:33:55 +01:00
Andrea Giammarchi
a9717afeb7 updated Pyodide to 0.25.0 (#1949) 2024-01-24 13:19:33 +01:00
Andrea Giammarchi
cea52b4334 Adding __terminal__ reference on terminal scripts (#1947) 2024-01-22 15:34:36 +01:00
Andrea Giammarchi
7ad7f0abfb Fix #1943 - Updated Polyscript with configURL (#1944) 2024-01-17 16:15:51 +01:00
Andrea Giammarchi
1efd73af8f Instrumented the io.stderr too when terminal exists (#1942) 2024-01-16 19:05:15 +01:00
Andrea Giammarchi
1e7fb9af44 Fix #1940 - Handle Main Xterm as tty too (#1941) 2024-01-15 17:29:28 +01:00
Fabio Pliger
154e00d320 Add correct copyright and attribution to main license file (#1937)
* add correct copyright and attribution to main license file

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-13 22:32:21 +01:00
Andrea Giammarchi
0f788fa284 Fix #1899 - Expose pyscript.js_modules as module (#1902)
* Fix #1899 - Expose pyscript.js_modules as module

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix #1899 - Make import as smooth as in polyscript

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024.1.1
2024-01-03 17:16:51 +01:00
Andrea Giammarchi
355866a1f1 PyTerminal - expose the reference through the element (#1921)
* PyTerminal - expose the reference through the element

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-03 16:24:38 +01:00
pre-commit-ci[bot]
6eca06ac0b [pre-commit.ci] pre-commit autoupdate (#1844)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v4.5.0)
- [github.com/psf/black: 23.1.0 → 23.11.0](https://github.com/psf/black/compare/23.1.0...23.11.0)
- [github.com/codespell-project/codespell: v2.2.4 → v2.2.6](https://github.com/codespell-project/codespell/compare/v2.2.4...v2.2.6)

* fixed typo in comment

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Andrea Giammarchi <andrea.giammarchi@gmail.com>
2023-12-19 14:18:27 +01:00
Andrea Giammarchi
a4aef0b530 Fix CI VS local env inconsistencies (#1892)
* Fix make fmt changing Python files

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-12-19 13:52:45 +01:00
Andrea Giammarchi
136e95498f Reduce conflicts on multiple custom scripts (#1897) 2023-12-14 18:32:46 +01:00
Andrea Giammarchi
6a3e2834b6 Fix #1890 - Apply latest patch that was lost (#1891) 2023.12.1 2023-12-07 10:29:45 +01:00
Fabio Pliger
c0d45d368b Pydom add better support for select element (#1887)
* add tests for select options

* add classes to support select and options management

* fix add methond and implement clear on options

* fix optionsproxy.add

* fix select.add method

* add test adding a second option to select

* add tests around adding options in multiple flavors

* add test to add an option by passing the option it wants to be added before

* complete test around adding options

* add select to add test on remove

* add tests and support for selected item

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Andrea Giammarchi <andrea.giammarchi@gmail.com>
2023-12-06 15:56:14 -08:00
Nicholas Tollervey
f18ec3d20a Fix broken links, and put community information at the top of our READE (#1889)
* Fix broken links, and put community information at the top of our README.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-12-06 14:46:39 +00:00
Andrea Giammarchi
b0377cc7ab Fix #1745 - Throw on multiple configs (#1885)
This MR shows errors and exit in these conditions:

  * multiple `<py-config>` or `<mpy-config>` found on the page
  * both `<py-config>` and `<script type="py" config="file.toml">` found on main
  * different `<script type="py" config="a.toml">`  and `<script type="py" config="b.toml">` configs found on main
2023-12-06 14:12:22 +01:00
Andrea Giammarchi
96e671b55f Amend #1880 - Bootstrap pyscript module ASAP (#1888)
* bootstrap *pyscript* module ASAP as stdlib
  * improve the test to be sure `js.document` exists **before** our module is imported
2023-12-06 11:16:05 +01:00
Andrea Giammarchi
40e99abbdf Py editor (#1860)
* added a *py-editor* plugin based on *codemirror*
  * use a `<script type="py-editor">` wrapper to bootstrap code
  * tested that all is good via smoke-test in test/py-editor.html
2023-12-06 09:53:10 +01:00
Fabio Pliger
8b6b055681 remove examples folder (#1884)
* remove examples folder

* remove examples tests
2023-12-05 13:19:11 -08:00
Andrea Giammarchi
8e5605fa42 Patch js.document out of the box (#1880)
* Patch js.document out of the box

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-12-04 17:53:13 +01:00
Peter W
06e1fdecc2 fix more docs urls (#1882) 2023-12-01 14:15:31 -06:00
Peter W
a82e8334d6 Fix README.md broken link and update for GH pages docs (#1881) 2023-12-01 13:17:00 -06:00
Andrea Giammarchi
539bc2ae0e Expose js_modules via pyscript module (#1877)
* Expose js_modules via pyscript module

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-11-30 16:13:47 +01:00
Andrea Giammarchi
0711acd30e Updated Polyscript to its latest (#1876) 2023-11-30 13:49:08 +01:00
Madhur Tandon
1476131ab4 update references (#1874) 2023-11-29 21:03:34 +05:30
Madhur Tandon
89902a440c remove examples from core repository (#1868)
* remove examples from core repository

* remove icosahedron example
2023-11-29 20:01:46 +05:30
Madhur Tandon
156c23d550 Update README.md (#1872) 2023.11.2 2023-11-28 15:53:23 +05:30
Andrea Giammarchi
30396ba79a Fix #1861 - Use addon to fit lines instead of truncating (#1867) 2023-11-27 15:05:23 +01:00
Andrea Giammarchi
a4343c62ca Updated dev/dependencies w/ polyscript & coincident (#1864) 2023-11-22 15:21:57 +01:00
Antonio Cuni
4b89c84692 use UTC time (#1859) 2023-11-15 16:00:09 +01:00
Antonio Cuni
df68449b82 Improve README and and mention the community calls (#1858)
Improve the readme in two ways:

- remove the mention to <py-repl>, and shows a quick summary of the various ways of running Python code

- add a link to the google calendar which contains the community calls
2023-11-15 12:10:52 +01:00