mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 10:17:23 -05:00
* 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>
45 lines
994 B
HTML
45 lines
994 B
HTML
<html>
|
|
<head>
|
|
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
|
|
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
|
|
<style>
|
|
.pulse {
|
|
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0%, 100% {
|
|
opacity: 1;
|
|
}
|
|
50% {
|
|
opacity: .2;
|
|
}
|
|
}
|
|
</style>
|
|
<py-env>
|
|
- numpy
|
|
- matplotlib
|
|
</py-env>
|
|
</head>
|
|
|
|
<body>
|
|
<h1>Let's plot random numbers</h1>
|
|
<div id="plot">
|
|
<div class="pulse" >
|
|
<p style='font-family: monospace sans-serif;'><big><big><big><big>❰py❱</big></big></big></big></p>
|
|
</div>
|
|
</div>
|
|
<py-script>
|
|
import matplotlib.pyplot as plt
|
|
import numpy as np
|
|
|
|
x = np.random.randn(1000)
|
|
y = np.random.randn(1000)
|
|
|
|
fig, ax = plt.subplots()
|
|
ax.scatter(x, y)
|
|
pyscript.write('plot', fig)
|
|
</py-script>
|
|
</body>
|
|
</html>
|