Commit Graph

806 Commits

Author SHA1 Message Date
Hood Chatham
08f34f748b Apply prettier to css, html, js, md, ts, and yml (#1249)
* Apply prettier to css, js, html, md, ts, and yml

As a followup I will add prettier to the .pre-commit config.
This patch is 100% generated by prettier.
I used a forked version of prettier that understands the
py-script tag.
See https://github.com/hoodmane/pyscript-prettier-precommit
for more info.

* Apply old pre-commit

* Revert some problems

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

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

* Revert some changes

* More changes

* Fix pre-commit

* [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-03-06 14:20:21 +00:00
Christian Clauss
7ffe6a598e pre-commit: Add ruff to replace bandit, flake8, isort, and pyupgrade (#1210)
* pre-commit: Add ruff to replace bandit, flake8, isort, and pyupgrade

* Upgrade ruff

* Update .pre-commit-config.yaml

* Update .pre-commit-config.yaml

* Update .pre-commit-config.yaml
2023-03-06 14:20:08 +00:00
Kd-Here
71d24a445e Add description of src attribute to py-script (#1136)
* Added description of src attribute to py-script

* Description for py-script src attribute

* resolved mistake of raised by pre-commit

* Update docs/reference/elements/py-script.md

---------

Co-authored-by: Fábio Rosado <hello@fabiorosado.dev>
2023-03-06 12:39:55 +00:00
Fábio Rosado
6bcbbfb085 Add tutorial for using requests (#1164) 2023-03-06 12:36:52 +00:00
Hood Chatham
04fe1348d8 Fix test reporter again (#1247)
* Fix test reporter again

* Escape brackets
2023-03-06 17:15:01 +05:30
Madhur Tandon
3033c779b0 use mkdirTree in emscripten FS (#1245)
* try mkdirTree

* suggested changes

* fix pre-commit
2023-03-04 18:48:01 +05:30
Hood Chatham
4483f0db0f Move prism.js and prism.css to prism.min.* (#1248) 2023-03-03 17:32:06 +00:00
Madhur Tandon
727267ae22 split interpreter class (#1218)
* split interpreter class

* add new files

* add newlines

* disable eslint for run

* remove usage of interpreter from unit test

* delete fakeinterpreter class

* fix unit tests

* add comments

* remove interpreter.ts and pyodide.ts files

* suggested changes
2023-03-03 22:23:52 +05:30
Hood Chatham
b5d15c2f7e Actually generate test reports (#1246) 2023-03-03 14:10:48 +01:00
Hood Chatham
589c614e57 Fix syntax errors in html files, apply dos2unix, prettier everything (#1244)
* Fix syntax errors in html 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-03-03 12:59:49 +01:00
Hood Chatham
4588e90226 Add test reporter (#1242)
* Add test reporter

* Fix indendation

* [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-03-02 12:38:51 +00:00
Hood Chatham
8665a14dec Begin making pyscript.py into a Python package (#1232)
* Begin making pyscript.py into a Python package

* Fix path
2023-03-02 12:30:43 +00:00
Jeff Glass
43d598d951 Fix Failing test_multiple_async (#1237) 2023-02-28 07:21:10 -06:00
Fábio Rosado
68018cf078 Add intersphinx and some docs (#1217)
* Add intersphinx and some docs

* Remove spaces

* Address Jeff comments
2023-02-28 11:37:21 +00:00
Jeff Glass
ef4ab0d7a8 Add typing for tagExecutionLock (#1235) 2023-02-28 12:27:49 +05:30
Hood Chatham
e66a2702df Fix error message (#1225) 2023-02-28 12:22:40 +05:30
Hood Chatham
c57d4a7054 Remove @staticmethod decorator from top level definitions (#1224) 2023-02-28 12:22:13 +05:30
Hood Chatham
a36f08f0f1 Try new import path and fall back to old one (#1223) 2023-02-28 12:21:55 +05:30
pre-commit-ci[bot]
760a8c75a5 [pre-commit.ci] pre-commit autoupdate (#1234)
updates:
- [github.com/pre-commit/mirrors-eslint: v8.34.0 → v8.35.0](https://github.com/pre-commit/mirrors-eslint/compare/v8.34.0...v8.35.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-28 12:12:28 +05:30
Jeff Glass
740fd921e1 Make plugin methods optional (#1134)
* Make plugin methods optional using optional chaining on all methods.
2023-02-27 20:14:07 -06:00
Jeff Glass
065c697070 Fix by comparing to str(results)) (#1233) 2023-02-27 19:45:24 -06:00
Madhur Tandon
e2c2459290 wrap runPython in async (#1212) 2023-02-21 20:35:19 +00:00
pre-commit-ci[bot]
11c79a5344 [pre-commit.ci] pre-commit autoupdate (#1211)
updates:
- [github.com/macisamuele/language-formatters-pre-commit-hooks: v2.6.0 → v2.7.0](https://github.com/macisamuele/language-formatters-pre-commit-hooks/compare/v2.6.0...v2.7.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-21 09:16:17 +00:00
pre-commit-ci[bot]
429fe4c356 [pre-commit.ci] pre-commit autoupdate (#1202)
updates:
- [github.com/pre-commit/mirrors-eslint: v8.33.0 → v8.34.0](https://github.com/pre-commit/mirrors-eslint/compare/v8.33.0...v8.34.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-14 11:14:02 +00:00
Russell Keith-Magee
a18b4edfc0 Updated freedom demo to make use of Toga 0.3.0 and briefcase web backend. (#1203) 2023-02-14 11:13:39 +00:00
Mariana Meireles
b14a2bba5f Marimeireles fix/#1081 (#1155)
* Improves repl id output

* Fix tests for new REPL output ids

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

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

* Add new REPL tests

* Pre commit linting

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

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

* Remove mistake

* Fixing tests that i didn't notice were broken?

* [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-02-14 07:51:43 +01:00
Ted Patrick
1f825edc28 Issues Configuration (#1157)
* Issues Configuration

* format

* Remove issue staler
2023-02-09 17:05:54 -06:00
Mariana Meireles
6ed834807a Adding info on how to set up test env + rewording a few things (#1156)
* Adding info on how to set up test env + rewording a few things

* changelog entry

* lint
2023-02-08 11:25:12 -08:00
Madhur Tandon
9a908e5fd0 Upgrade Pyodide to v0.22.1 (#1144)
* upgrade to pyodide 0.22.1

* pin bokeh in panel examples

* fix typo

* fix tests by using custom bokeh wheel

* fix bokeh interactive test

* adhere to new loadPackage API
2023-02-08 22:01:51 +05:30
Mariana Meireles
4c30359b71 Missing one line to make test (#1154)
`make test` command was incomplete.
2023-02-07 11:18:45 +05:30
pre-commit-ci[bot]
34dfe2d80b [pre-commit.ci] pre-commit autoupdate (#1153)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 22.12.0 → 23.1.0](https://github.com/psf/black/compare/22.12.0...23.1.0)

* [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-02-07 11:17:57 +05:30
Fábio Rosado
25bcff10b7 Fix import warning for js.document (#1151) 2023-02-06 16:11:47 +00:00
Fábio Rosado
81268d0545 Add config option to splashscreen so users can disable it plus docs (#1138)
* Allow disabling splashscreen

* Move disabled to if statement

* Add docs for py-splashscreen and test for logging

* Add entry to changelog

* Address Jeff's comments

* Rename disabled option to enabled and set to true by default

* Fix logic and tests

* Uncomment test

* Fix test
2023-02-04 15:56:48 +00:00
Madhur Tandon
8f0a7706d7 fix py-markdown plugin test (#1145) 2023-02-04 20:57:17 +05:30
Mariana Meireles
46150f9b80 complete install guide (#1140) 2023-01-31 08:18:58 -08:00
INC
247745b7e7 Fixing docs Issue #1033 (#1037)
* Move the info in /pyscriptjs/README.md to /docs/development/developing.md

* developing.md: Markdown linting

* Fixing docs issue #1033

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

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

* setting-up-environment.md: Markdown Linting

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-01-31 12:28:25 +00:00
pre-commit-ci[bot]
94cc09b610 [pre-commit.ci] pre-commit autoupdate (#1139)
updates:
- [github.com/pycqa/isort: 5.11.4 → 5.12.0](https://github.com/pycqa/isort/compare/5.11.4...5.12.0)
- [github.com/pre-commit/mirrors-eslint: v8.32.0 → v8.33.0](https://github.com/pre-commit/mirrors-eslint/compare/v8.32.0...v8.33.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-01-31 10:49:14 +05:30
Jeff Glass
a210b2d5f5 Improve typing on PyScriptTag (#1135) 2023-01-26 09:38:07 -06:00
Jeff Glass
12bf6db331 Change Plugin Hooks to Use options object/kwargs (#1132) 2023-01-26 07:20:04 -06:00
Madhur Tandon
697ac9de9a fix exception thrown but not shown in DOM in event handler (#1131)
* fix exception not thrown in event handler

* fix implicit display 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>
2023-01-25 20:08:05 +05:30
Fábio Rosado
4124bb5edc Restructure the tutorials index page (#1090) 2023-01-25 12:28:23 +00:00
Fabio Pliger
d55340a817 Better test support for Python Plugins (#1108)
* add plugins testing utils module

* add plugins manager fixture and init plugins tests helper in conftest

* add _custom_elements attribute to pyscript.Plugin to allow plugins to track the CE they register

* add test for py_tutor

* remove unrelated code from prims js script

* ensure a Plugin always has the app attribute and improve tests

* add tests for py_tutor create_code_section

* implement PluginsManager reset and add teardown on plugins_manager fixture to clean it up after a test

* add test to check if plugin has been registered

* add docstrings to new tests

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

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

* add docstrings to plugins tester

* add changes from main

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

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

* lint

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

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

* add todo to add remaining PluginsManager lifecycle events

Co-authored-by: Fabio Pliger <fpliger@anaconda.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-01-24 13:32:16 -08:00
Mohammad Anash
0de8cd9ab7 Update README to point to development docs (#1129) 2023-01-24 19:57:00 +00:00
Madhur Tandon
4e8281c749 fix display multiple append with target (#1126)
* fix display multiple append with target

* flake8 ignore long lines

* fix img render test
2023-01-24 22:01:19 +05:30
pre-commit-ci[bot]
357fbc644d [pre-commit.ci] pre-commit autoupdate (#1127)
updates:
- [github.com/macisamuele/language-formatters-pre-commit-hooks: v2.5.0 → v2.6.0](https://github.com/macisamuele/language-formatters-pre-commit-hooks/compare/v2.5.0...v2.6.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-01-24 11:20:07 +05:30
Fábio Rosado
7947a8a2dc Add an id if the user forgot when using py-attribute (#1122) 2023-01-21 20:48:27 +00:00
Fábio Rosado
35de3aa154 Add f string formatting ignore (#1121) 2023-01-20 21:14:43 +05:30
pre-commit-ci[bot]
1ea687beb8 [pre-commit.ci] pre-commit autoupdate (#1111)
updates:
- [github.com/pre-commit/mirrors-eslint: v8.31.0 → v8.32.0](https://github.com/pre-commit/mirrors-eslint/compare/v8.31.0...v8.32.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-01-20 21:14:32 +05:30
Fábio Rosado
bb5c59307a Rename runtimes with interpreter (#1082) 2023-01-16 18:52:31 +00:00
Mariana Meireles
5a3c414c8f we don't really use numpy here (#1101) 2023-01-11 19:43:26 -08:00