Commit Graph

430 Commits

Author SHA1 Message Date
Jannis Leidel
6898daf0ce Documentation infrastructure. (#262)
* Initial setup.

This does a few things:

- Adds some placeholders following the Diátaxis framework (https://diataxis.fr)
- Sets up Sphinx with MyST parser for Markdown in addition to rST.
- Uses the well-known PyData Sphinx theme.
- Moves some already existing Markdown files into the docs directory.
- Sets up the initial doc review GitHub action to auto-deploy to GitHub pages.

* Activate conda env.

* Remove custom action.

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

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

* Make the dir.

* Push directly

* Add readthedocs config.

* Disable GitHub pages deployment for now.

* Add release and latest workflows as well.

* Make clear that this is work in progress.

* Made docs merge ready, added What is PyScript section with example.

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

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

* Replace `on:tags:` with `on:create:`

The existing trigger is apparently not in the GHA spec

* Pretty format YAML

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

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

* add s3 sync and permissions

* Leave status message in PR.

* Redirect from docs.pyscript.net/ to docs.pyscript.net/latest/

* Delete latest directory before deployment.

* Update review and release workflows, too.

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

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

* Allow access to S3 for review and release doc workflow.

* Fix name of workflow.

* Bump up Python version.

* Because YAML.

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

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

* Revert move to 3.10.

* Fix sitemap.

* Remove status settgin from release and latest build.

* Comment out cleanup.

* Add write permissions for statuses.

* More permissions?

* Fix artifact name.

* Use appropriate concurrency.

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

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

* .zip not needed

* Align name of workflows with CI workflows.

* Add checks permission.

* Set a notice instead.

* Move to sphinx-design.

* Add sphinx-autobuild.

* Use frontmatter more.

* Add section for mdformat but disable it for now.

See https://github.com/executablebooks/mdformat-myst/pull/9 for more details.

* Fix fencing.

* Actually using html renderer.

* Revert moving governance files.

* Use full URLs for governance docs.

* Added warning.

* Fix copyright and author.

* Another minor fix.

* Use GitHub Action summary instead of notice.

* Fix variable name.

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Matt Kramer <mkramer@anaconda.com>
Co-authored-by: ximena9201 <ximenandrea.ro@gmail.com>
2022-05-17 12:08:06 -05:00
hoge1e3
eb3a31a698 fixed the bug std-err attribute cannot set stderr properly (#371) 2022-05-16 21:30:57 -05:00
Fabio Pliger
0476627f34 fix autogenerated element (#397)
* use static string in checkId to simplify behaviour and ensure ids always start with alpha char

* re-enable terser on minify

* fix example local path
2022-05-16 16:08:28 -05:00
Yannick Funk
eba42ad9b4 Add checkId() for PyButton and PyInputBox, add id check for tags with pys- Event handlers (#400)
* Add id generation to PyButton and PyInputBox components

* Refactor init handlers and add check for id
2022-05-16 16:05:11 -05:00
Javadz
ca909b4f6b Create readme.md (#374) 2022-05-16 11:13:39 -05:00
Peter W
5d49c20ade Build on main branch tags only (#394)
* Build on main branch tags only

* [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>
2022.05.1
2022-05-16 10:58:21 -05:00
Fabio Pliger
8670f96d21 remove terser since it's breaking specific examples (#395) 2022-05-16 10:58:02 -05:00
Philipp Rudiger
1e8aa87b0a Ensure minified pyscript is captured by query selector (#393) 2022-05-16 09:40:23 -05:00
Fabio Pliger
8c65cad209 remove prod flag from build cmd and add alternative build-min cmd (#368) 2022-05-13 19:08:02 -05:00
Fabio Pliger
74d29bca8c fix paths to pyscript.net (#366) 2022-05-13 18:40:11 -05:00
Peter W
1fdec1ca21 redirect examples (#365) 2022-05-13 18:24:29 -05:00
Peter W
4fff4c808f change bucket name for workflows (#353) 2022-05-12 16:43:07 -05:00
woxtu
86eb771cdc Use substring() instead of substr() (#341) 2022-05-12 14:54:35 -05:00
NiJia Lin
a3e86f32b7 Update say_hello.html (#327)
- remove un-usage `setTimeout` package
2022-05-11 20:39:22 -05:00
woxtu
53a21b74eb Enable to generate the source map (#325) 2022-05-11 19:18:28 -05:00
Fabio Pliger
363f3751f9 support different pyodide versions (#328)
* add PyLoader class

* create global loader during app creation time and remove it when pyscript loading operations are done

* make the loader global and open/close when apps is starting. Also add concept of app config so users can set if they want to autoclose the loader of handle it themselves

* add pyconfig file

* auto add global config if there's no config set in the page

* export initializer type

* define type for config

* move initialization out of svelte file, into app config

* change runtimes from strings to objects

* fix typo
2022-05-11 16:59:13 -05:00
Julian
73a0d9b02e Fix <py-repl theme="dark"> (#320)
* fix: theme for <py-repl>

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

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

* remove comment

* fix: populate initial theme on auto generated repls.

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-05-11 14:57:01 -05:00
ic-768
2526d242bc Change let to const; Minor code improvement (#300)
* Change let to const; Minor code improvement

* Indentation fix
2022-05-10 16:15:32 -05:00
Fabio Pliger
71319d0969 add app loading splash screen and AppConfig (#279)
* add PyLoader class

* create global loader during app creation time and remove it when pyscript loading operations are done

* make the loader global and open/close when apps is starting. Also add concept of app config so users can set if they want to autoclose the loader of handle it themselves

* add pyconfig file

* auto add global config if there's no config set in the page

* remove changes to simple_clock example
2022-05-10 16:00:25 -05:00
Peter W
5f19756ff3 fix ci issues (#312)
* test ci

* sync fixes, ignore symlink

* remove symlink

* undo trigger tests

* only deploy latest on merge, not PR

* quotes to single
2022-05-10 12:27:06 -05:00
Peter W
bc4581d9e5 Split build jobs, add S3 push (#307)
* split files, add s3 push

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

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

* dedent

* indent

* alpha directory

* remove on: PR from alpha

* workflow names

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

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

* remove js-lint.yml (replaced by pre-commit); add sync-examples.yml

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

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

* Update sync-examples.yml

* change unstable to latest, master -> main

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-05-09 17:28:51 -05:00
pre-commit-ci[bot]
3dc90c4efe [pre-commit.ci] pre-commit autoupdate (#310)
updates:
- https://gitlab.com/pycqa/flake8https://github.com/PyCQA/flake8
- [github.com/PyCQA/flake8: 3.9.2 → 4.0.1](https://github.com/PyCQA/flake8/compare/3.9.2...4.0.1)
- [github.com/pre-commit/mirrors-eslint: v8.4.0 → v8.15.0](https://github.com/pre-commit/mirrors-eslint/compare/v8.4.0...v8.15.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-05-09 16:54:42 -05:00
woxtu
6f18a66d53 Fix ESLint warnings (#294)
* Use builtin methods

* Fix formatting
2022-05-09 15:16:25 -05:00
Matt Kramer
5332aad8d6 Add pre-commit config for eslint (#259)
* Add eslint config

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-05-09 14:55:33 -05:00
Sugato Ray
ff3b994107 Adding textwrap.dedent for allowing indented html blocks (#275)
* Adding textwrap.dedent for indented html blocks
- write indented html string
- but dedent it while generating html
- textwrap.dedent is meant for this purpose

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

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

* fixed indentation

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

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

* fixed indentation

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-05-09 14:48:11 -05:00
Christian Clauss
92fce06b57 GitHub Actions: Test on current Node.js (#282)
* GitHub Actions: Test on current Node.js

Node.js 12 is end-of-life.  https://nodejs.org/en/about/releases

* GitHub Actions: Test on current Node.js

* Removed outdated comment

Co-authored-by: Peter W <34256109+pww217@users.noreply.github.com>
2022-05-09 13:21:42 -05:00
Kevin Goldsmith
825c63c184 update contributing
point to the contributing doc
2022-05-09 10:34:36 -07:00
woxtu
a993d61885 Use async/await instead of promise chaining (#266)
* Use async/await instead of promise chaining

* Await asynchronous operations
2022-05-09 12:32:01 -05:00
Kevin Goldsmith
d645722421 168 add contributing assets (#268)
* checkpoint: added some text

* checkpoint: added setting up the environment, tips for writing good issues

* continuing to fill it out

* added more detailed description of the process of creating a change and some other cleanup.

* added a getting started section and cleaned up the grammar. This ready for the PR now

* forgot to add the new section to the TOC

Co-authored-by: Kevin Goldsmith <kgoldsmith@anaconda.com>
Co-authored-by: Matt Kramer <mkramer@anaconda.com>
2022-05-09 10:26:20 -07:00
Peyton Bechard
d16cf8c42e Update GETTING-STARTED.md (#283)
Fixes typo in line 47.
2022-05-09 10:07:44 -05:00
ic-768
eb711ec0ee README wording improvements (#301) 2022-05-09 10:05:53 -05:00
Ukeje Chukwuemeriwo Goodness
843b9d09bd Changed wallis to computepi for better description (#219)
import this?
2022-05-08 13:26:19 -05:00
woxtu
a0c7b7653a Improve type annotations (#271)
* Add js-yaml type definition

* Improve type annotations

* Store values to properties
2022-05-07 11:25:05 -05:00
Christian Clauss
4ec24a919a Remove execute bit from .css and .html files (#274)
* Remove execute bit from .css and .html files

* pyscriptjs/examples/toga/static/pyscript: Broken symlink
2022-05-07 09:27:31 -05:00
Christian Clauss
22ffbcb21d pre-commit: Try to autofix yaml BEFORE checking it (#269)
* pre-commit: Remove duplicate hook and reorder
2022-05-07 00:05:32 -05:00
Christian Clauss
fadb4a67e7 pre-commit: Add codespell and other checks (#263) 2022-05-06 16:23:14 -05:00
Jannis Leidel
990b0b2797 Make all targets phony. (#249) 2022-05-06 14:40:27 -05:00
Bruno Odinukweze
20a70ed3a7 made py-button styling dynamic (#227)
* made py-button styling dynamic

* added comments

* removed debugging logs

* fixed linting issue with variables
2022-05-06 14:40:03 -05:00
Matt Kramer
cc6d6247a8 Add additional pre-commit hooks (#245)
* Add and run end-of-file-fixer
* Add and run trailing-whitespace
* Add and run check-yaml
* Add and run check-json
* Add and run pretty-format-yaml
* Fix comment indentation
2022-05-06 14:27:11 -05:00
woxtu
3347532f5e Add missing type annotations (#242)
* Remove redundant subscribing

* Add type annotations

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

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

* [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: Matt Kramer <mkramer@anaconda.com>
2022-05-06 13:29:35 -05:00
Antonio Cuni
ca37efb91d Add issue templates (#252)
* add issue templates

* incorporate @fpliger suggestions
2022-05-06 12:51:25 -05:00
Jason Barnwell
707474e835 Changed variable names to snake_case for PEP8 formatting (#211)
* Changed variable names to snakecase for PEP8 formatting.

* Changed variable names to snakecase for PEP8 formatting.

* fix indentation

Co-authored-by: Fabio Pliger <fabio.pliger@gmail.com>
2022-05-06 12:18:08 -05:00
Allan Lago
facdfdb525 Add keypress event to todo example (#241)
* add enter keypress event in todo example

* fix linting

* [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>
2022-05-06 12:08:58 -05:00
Peter W
b84017d191 CI Improvements; more focused runs and best practices (#236)
* add path filtering

* small improvements for clarity, more focused run triggers, best practices

* formatting

* add js linting to pre-commit

* Update .pre-commit-config.yaml

* Update .pre-commit-config.yaml
2022-05-06 09:46:59 -05:00
Fabio Pliger
b7d748c96a Moves Python code out of interpreter file (#207)
* make copy of .py files part of build process

* move code out ofinterpreter file and make it download and load code during initialization

* fix double ; in interpreter

* remove debugging print

* update dependencies

* fix project name and version

* [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

* change fmt-py

* lint

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

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

* remove extra content

* define missing strict type

* create build folder if doesn't exist

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-05-05 23:12:54 -05:00
Matt Kramer
88a0dd38de Use black profile in isort to prevent conflicts (#244)
* Use black profile in isort to prevent conflicts
2022-05-05 22:15:43 -05:00
Maxime Liquet
b5b150a918 add links to the libraries used in the examples (#224) 2022-05-05 20:28:57 -05:00
Roman Yurchak
8490b88386 Don't load distutils in the Python standard library (#234) 2022-05-05 19:19:10 -05:00
Furkan M. Torun
204c099a84 ADD: Simple Bioinformatics Tool (#131)
* ADD: Simple Bioinformatics Tool as an example

* ADD: Favicon to Bioinformatics Example
2022-05-05 16:47:30 -05:00
matdmiller
f4ed3591ca Micrograd example (#116)
* added micrograd_ai.html and micrograd_ai.py to examples

* added micrograd_ai.html and micrograd_ai.py to examples fix typo
2022-05-05 16:44:14 -05:00