This PR is the first step to improve and rationalize the life-cycle of a pyscript app along the lines of what I described in #763 .
It is not a complete solution, more PRs will follow.
Highlights:
- py-config is no longer a web component: the old code relied on PyConfig.connectedCallback to do some logic, but then if no <py-config> tag was present, we had to introduce a dummy one with the sole goal of activating the callback. Now the logic is much more linear.
- the new pyconfig.ts only contains the code which is needed to parse the config; I also moved some relevant code from utils.ts because it didn't really belong to it
- the old PyConfig class did much more than dealing with the config: in particular, it contained the code to initialize the env and the runtime. Now this logic has been moved directly into main.ts, inside the new PyScriptApp class. I plan to refactor the initialization code in further PRs
- the current code relies too much on global state and global variables, they are everywhere. This PR is a first step to solve the problem by introducing a PyScriptApp class, which will hold all the mutable state of the page. Currently only config is stored there, but eventually I will migrate more state to it, until we will have only one global singleton, globalApp
- thanks to what I described above, I could kill the appConfig svelte store: one less store to kill :).
* Added bug report and feature request issue forms
* Update bug-report.yml
Added browsers dropdown to bugs
* Added misc issue type
* 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>
* 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>
* Add issue templates (#252)
* add issue templates
* incorporate @fpliger suggestions
* Removed mardown files. Added link for questions
* Updated browser dev console info
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Minor typo
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix issue with labels that should be strings, ignore pretty-format of ISSUE_TEMPLATE yaml files
* Removed old md. Updated label
* add the needs-triage label to all new issues
Co-authored-by: Allan Lago <35788148+alago1@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jason Barnwell <master.j1994@gmail.com>
Co-authored-by: Fabio Pliger <fabio.pliger@gmail.com>
Co-authored-by: Antonio Cuni <anto.cuni@gmail.com>
Co-authored-by: Matt Kramer <mkramer@anaconda.com>
* 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>
* 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
* add config file
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add isort
* [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>