ninejs 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. ninejs-0.0.1/.gitattributes +1 -0
  2. ninejs-0.0.1/.github/workflows/docs.yml +32 -0
  3. ninejs-0.0.1/.github/workflows/lint.yaml +26 -0
  4. ninejs-0.0.1/.github/workflows/pypi.yaml +98 -0
  5. ninejs-0.0.1/.github/workflows/tests.yaml +30 -0
  6. ninejs-0.0.1/.github/workflows/type.yaml +26 -0
  7. ninejs-0.0.1/.gitignore +33 -0
  8. ninejs-0.0.1/.pre-commit-config.yaml +21 -0
  9. ninejs-0.0.1/LICENSE +21 -0
  10. ninejs-0.0.1/PKG-INFO +23 -0
  11. ninejs-0.0.1/README.md +1 -0
  12. ninejs-0.0.1/docs/iframes/bar.html +856 -0
  13. ninejs-0.0.1/docs/iframes/line.html +872 -0
  14. ninejs-0.0.1/docs/iframes/point.html +1362 -0
  15. ninejs-0.0.1/docs/iframes/quickstart2.html +2217 -0
  16. ninejs-0.0.1/docs/index.md +106 -0
  17. ninejs-0.0.1/docs/reference/css.md +1 -0
  18. ninejs-0.0.1/docs/reference/interactive.md +1 -0
  19. ninejs-0.0.1/docs/reference/save.md +1 -0
  20. ninejs-0.0.1/docs/stylesheets/style.css +23 -0
  21. ninejs-0.0.1/justfile +24 -0
  22. ninejs-0.0.1/ninejs/__init__.py +4 -0
  23. ninejs-0.0.1/ninejs/main.py +329 -0
  24. ninejs-0.0.1/ninejs/static/PlotParser.js +76 -0
  25. ninejs-0.0.1/ninejs/static/default.css +40 -0
  26. ninejs-0.0.1/ninejs/static/template.html +96 -0
  27. ninejs-0.0.1/ninejs/style.py +100 -0
  28. ninejs-0.0.1/ninejs/utils.py +43 -0
  29. ninejs-0.0.1/ninejs.egg-info/PKG-INFO +23 -0
  30. ninejs-0.0.1/ninejs.egg-info/SOURCES.txt +38 -0
  31. ninejs-0.0.1/ninejs.egg-info/dependency_links.txt +1 -0
  32. ninejs-0.0.1/ninejs.egg-info/requires.txt +3 -0
  33. ninejs-0.0.1/ninejs.egg-info/top_level.txt +1 -0
  34. ninejs-0.0.1/package-lock.json +2456 -0
  35. ninejs-0.0.1/package.json +12 -0
  36. ninejs-0.0.1/pyproject.toml +54 -0
  37. ninejs-0.0.1/setup.cfg +4 -0
  38. ninejs-0.0.1/tests/test_main.py +47 -0
  39. ninejs-0.0.1/tests/test_style.py +35 -0
  40. ninejs-0.0.1/zensical.toml +62 -0
@@ -0,0 +1 @@
1
+ *.html linguist-detectable=false
@@ -0,0 +1,32 @@
1
+ name: Documentation
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ permissions:
7
+ contents: write
8
+ jobs:
9
+ deploy:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v6
13
+ - uses: actions/setup-python@v6
14
+ with:
15
+ python-version: 3.x
16
+
17
+ - name: Install uv
18
+ uses: astral-sh/setup-uv@v5
19
+ with:
20
+ enable-cache: true
21
+
22
+ - name: Install the project
23
+ run: uv sync --all-groups
24
+
25
+ - run: uv run zensical build --clean
26
+
27
+ - name: Deploy to GitHub Pages
28
+ uses: peaceiris/actions-gh-pages@v4
29
+ with:
30
+ github_token: ${{ secrets.GITHUB_TOKEN }}
31
+ publish_branch: gh-pages
32
+ publish_dir: ./site
@@ -0,0 +1,26 @@
1
+ name: Check Code Formatting
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ check-formatting:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - name: Checkout repository
15
+ uses: actions/checkout@v3
16
+
17
+ - name: Install uv
18
+ uses: astral-sh/setup-uv@v5
19
+ with:
20
+ enable-cache: true
21
+
22
+ - name: Install the project
23
+ run: uv sync --all-groups
24
+
25
+ - name: Run Ruff format check
26
+ run: uv run ruff format --check .
@@ -0,0 +1,98 @@
1
+ # This is taken from
2
+ # https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#the-whole-ci-cd-workflow
3
+ # but with the following differences
4
+ # - removed the TestPyPI part
5
+ # - instead of `on: push`, we have `tags` in there too
6
+
7
+ name: Publish Python 🐍 distribution 📦 to PyPI
8
+
9
+ on:
10
+ push:
11
+ tags:
12
+ - "v[0-9]+.[0-9]+.[0-9]+*"
13
+
14
+ jobs:
15
+ build:
16
+ name: Build distribution 📦
17
+ runs-on: ubuntu-latest
18
+
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ with:
22
+ persist-credentials: false
23
+ - name: Set up Python
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: "3.x"
27
+ - name: Install pypa/build
28
+ run: python3 -m pip install build --user
29
+ - name: Build a binary wheel and a source tarball
30
+ run: python3 -m build
31
+ - name: Store the distribution packages
32
+ uses: actions/upload-artifact@v4
33
+ with:
34
+ name: python-package-distributions
35
+ path: dist/
36
+
37
+ publish-to-pypi:
38
+ name: >-
39
+ Publish Python 🐍 distribution 📦 to PyPI
40
+ if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
41
+ needs:
42
+ - build
43
+ runs-on: ubuntu-latest
44
+ environment:
45
+ name: pypi
46
+ url: https://pypi.org/p/pytest-cov
47
+ permissions:
48
+ id-token: write # IMPORTANT: mandatory for trusted publishing
49
+
50
+ steps:
51
+ - name: Download all the dists
52
+ uses: actions/download-artifact@v4
53
+ with:
54
+ name: python-package-distributions
55
+ path: dist/
56
+ - name: Publish distribution 📦 to PyPI
57
+ uses: pypa/gh-action-pypi-publish@release/v1
58
+
59
+ github-release:
60
+ name: >-
61
+ Sign the Python 🐍 distribution 📦 with Sigstore
62
+ and upload them to GitHub Release
63
+ needs:
64
+ - publish-to-pypi
65
+ runs-on: ubuntu-latest
66
+ permissions:
67
+ contents: write # IMPORTANT: mandatory for making GitHub Releases
68
+ id-token: write # IMPORTANT: mandatory for sigstore
69
+ steps:
70
+ - name: Download all the dists
71
+ uses: actions/download-artifact@v4
72
+ with:
73
+ name: python-package-distributions
74
+ path: dist/
75
+ - name: Sign the dists with Sigstore
76
+ uses: sigstore/gh-action-sigstore-python@v3.0.0
77
+ with:
78
+ inputs: >-
79
+ ./dist/*.tar.gz
80
+ ./dist/*.whl
81
+ - name: Create GitHub Release
82
+ env:
83
+ GITHUB_TOKEN: ${{ github.token }}
84
+ run: >-
85
+ gh release create
86
+ "$GITHUB_REF_NAME"
87
+ --repo "$GITHUB_REPOSITORY"
88
+ --notes ""
89
+ - name: Upload artifact signatures to GitHub Release
90
+ env:
91
+ GITHUB_TOKEN: ${{ github.token }}
92
+ # Upload to GitHub Release using the `gh` CLI.
93
+ # `dist/` contains the built packages, and the
94
+ # sigstore-produced signatures and certificates.
95
+ run: >-
96
+ gh release upload
97
+ "$GITHUB_REF_NAME" dist/**
98
+ --repo "$GITHUB_REPOSITORY"
@@ -0,0 +1,30 @@
1
+ name: Unit tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ${{ matrix.os }}
12
+ strategy:
13
+ matrix:
14
+ os: [ubuntu-latest, macos-latest, windows-latest]
15
+ python-version: ["3.10", "3.14"]
16
+ env:
17
+ UV_PYTHON: ${{ matrix.python-version }}
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+
21
+ - name: Install uv
22
+ uses: astral-sh/setup-uv@v5
23
+ with:
24
+ enable-cache: true
25
+
26
+ - name: Install the project
27
+ run: uv sync --all-groups
28
+
29
+ - name: Run tests
30
+ run: uv run pytest
@@ -0,0 +1,26 @@
1
+ name: Check Static Typing
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ check-formatting:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - name: Checkout repository
15
+ uses: actions/checkout@v3
16
+
17
+ - name: Install uv
18
+ uses: astral-sh/setup-uv@v5
19
+ with:
20
+ enable-cache: true
21
+
22
+ - name: Install the project
23
+ run: uv sync --all-groups
24
+
25
+ - name: Run tests
26
+ run: uv run ty check
@@ -0,0 +1,33 @@
1
+ __pycache__/
2
+ *.py[oc]
3
+ build/
4
+ dist/
5
+ wheels/
6
+ *.egg-info
7
+ .env
8
+ uv.lock
9
+
10
+ .venv/
11
+ venv/
12
+ .env/
13
+ env/
14
+
15
+ .vscode/
16
+
17
+ .DS_Store
18
+
19
+ *cache*
20
+
21
+ *.zip
22
+ sandbox/
23
+ node_modules
24
+
25
+ scripts/release.sh
26
+
27
+ *.html
28
+ !docs/*.html
29
+ !overrides/*.html
30
+
31
+ site/
32
+ *.svg
33
+ release.sh
@@ -0,0 +1,21 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.11.7
4
+ hooks:
5
+ - id: ruff
6
+ types_or: [python, pyi]
7
+ args: [--fix]
8
+ - id: ruff-format
9
+ types_or: [python, pyi]
10
+ - repo: https://github.com/pre-commit/pre-commit-hooks
11
+ rev: v5.0.0
12
+ hooks:
13
+ - id: check-yaml
14
+ - id: trailing-whitespace
15
+ - id: end-of-file-fixer
16
+ - id: check-added-large-files
17
+ - repo: https://github.com/python-jsonschema/check-jsonschema
18
+ rev: 0.28.2
19
+ hooks:
20
+ - id: check-github-workflows
21
+ args: ["--verbose"]
ninejs-0.0.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Joseph Barbier
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
ninejs-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,23 @@
1
+ Metadata-Version: 2.4
2
+ Name: ninejs
3
+ Version: 0.0.1
4
+ Summary: Bringing interactivity to plotnine
5
+ Author-email: Joseph Barbier <joseph@ysunflower.com>
6
+ License-Expression: MIT
7
+ Project-URL: Documentation, https://y-sunflower.github.io/ninejs/
8
+ Project-URL: Homepage, https://y-sunflower.github.io/ninejs/
9
+ Project-URL: Issues, https://github.com/y-sunflower/ninejs/issues
10
+ Project-URL: Repository, https://github.com/y-sunflower/ninejs
11
+ Keywords: a,keywords,list,of
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Requires-Python: >=3.10
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: jinja2>=3.0.0
19
+ Requires-Dist: narwhals>=2.0.0
20
+ Requires-Dist: plotnine>=0.13.0
21
+ Dynamic: license-file
22
+
23
+ # `ninejs`: Adding interactivity to plotnine
ninejs-0.0.1/README.md ADDED
@@ -0,0 +1 @@
1
+ # `ninejs`: Adding interactivity to plotnine