plothero 0.3.0b1__tar.gz → 0.3.0rc2__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 (82) hide show
  1. plothero-0.3.0rc2/.claude/agents/developer.md +15 -0
  2. plothero-0.3.0rc2/.claude/agents/engineer.md +14 -0
  3. plothero-0.3.0rc2/.claude/agents/lead.md +23 -0
  4. plothero-0.3.0rc2/.claude/agents/pm.md +12 -0
  5. plothero-0.3.0rc2/.claude/agents/qa.md +14 -0
  6. plothero-0.3.0rc2/.claude/settings.json +11 -0
  7. plothero-0.3.0rc2/.claude/skills/git-protocol/SKILL.md +56 -0
  8. plothero-0.3.0rc2/.claude/skills/jira-protocol/SKILL.md +23 -0
  9. plothero-0.3.0rc2/.claude/skills/linear-protocol/SKILL.md +26 -0
  10. plothero-0.3.0rc2/.claude/skills/team-cycle/SKILL.md +20 -0
  11. plothero-0.3.0rc2/.claude/skills/team-inbox/SKILL.md +17 -0
  12. plothero-0.3.0rc2/.claude/skills/team-plan/SKILL.md +19 -0
  13. plothero-0.3.0rc2/.claude/skills/tracker-protocol/SKILL.md +30 -0
  14. plothero-0.3.0rc2/.github/dependabot.yml +13 -0
  15. {plothero-0.3.0b1 → plothero-0.3.0rc2}/.github/workflows/docs.yml +2 -2
  16. {plothero-0.3.0b1 → plothero-0.3.0rc2}/.github/workflows/release.yml +38 -20
  17. {plothero-0.3.0b1 → plothero-0.3.0rc2}/.gitignore +5 -0
  18. plothero-0.3.0rc2/.mcp.json +8 -0
  19. {plothero-0.3.0b1 → plothero-0.3.0rc2}/AGENTS.md +6 -2
  20. {plothero-0.3.0b1 → plothero-0.3.0rc2}/CHANGELOG.md +71 -0
  21. plothero-0.3.0rc2/CLAUDE.md +12 -0
  22. {plothero-0.3.0b1 → plothero-0.3.0rc2}/Cargo.lock +1 -1
  23. {plothero-0.3.0b1 → plothero-0.3.0rc2}/Cargo.toml +1 -1
  24. {plothero-0.3.0b1 → plothero-0.3.0rc2}/PKG-INFO +21 -6
  25. {plothero-0.3.0b1 → plothero-0.3.0rc2}/README.md +16 -4
  26. plothero-0.3.0rc2/SECURITY.md +46 -0
  27. plothero-0.3.0rc2/docs/development.md +223 -0
  28. {plothero-0.3.0b1 → plothero-0.3.0rc2}/docs/guide/downsampling.md +20 -0
  29. {plothero-0.3.0b1 → plothero-0.3.0rc2}/docs/installation.md +41 -0
  30. {plothero-0.3.0b1 → plothero-0.3.0rc2}/examples/example.py +2 -1
  31. {plothero-0.3.0b1 → plothero-0.3.0rc2}/examples/walkthrough/01_check_install.py +2 -1
  32. {plothero-0.3.0b1 → plothero-0.3.0rc2}/examples/walkthrough/02_overview.py +2 -1
  33. {plothero-0.3.0b1 → plothero-0.3.0rc2}/examples/walkthrough/03_downsampling_methods.py +2 -1
  34. {plothero-0.3.0b1 → plothero-0.3.0rc2}/examples/walkthrough/05_subplots.py +2 -1
  35. {plothero-0.3.0b1 → plothero-0.3.0rc2}/examples/walkthrough/06_bar_profiles.py +2 -1
  36. {plothero-0.3.0b1 → plothero-0.3.0rc2}/examples/walkthrough/08_plotly_style.py +2 -1
  37. {plothero-0.3.0b1 → plothero-0.3.0rc2}/examples/walkthrough/09_export.py +2 -1
  38. {plothero-0.3.0b1 → plothero-0.3.0rc2}/examples/walkthrough/10_detached_show.py +2 -1
  39. {plothero-0.3.0b1 → plothero-0.3.0rc2}/plothero/graph_objects.py +190 -59
  40. {plothero-0.3.0b1 → plothero-0.3.0rc2}/pyproject.toml +26 -1
  41. plothero-0.3.0rc2/tests/resample_harness.js +110 -0
  42. plothero-0.3.0rc2/tests/test_downsample.py +304 -0
  43. {plothero-0.3.0b1 → plothero-0.3.0rc2}/tests/test_graph_objects.py +275 -16
  44. plothero-0.3.0rc2/tests/test_resample_js.py +180 -0
  45. {plothero-0.3.0b1 → plothero-0.3.0rc2}/tests/test_subplots.py +43 -16
  46. {plothero-0.3.0b1 → plothero-0.3.0rc2}/tests/test_viewer.py +28 -2
  47. plothero-0.3.0b1/.flake8 +0 -3
  48. plothero-0.3.0b1/CLAUDE.md +0 -1
  49. plothero-0.3.0b1/docs/development.md +0 -144
  50. plothero-0.3.0b1/tests/test_downsample.py +0 -141
  51. {plothero-0.3.0b1 → plothero-0.3.0rc2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  52. {plothero-0.3.0b1 → plothero-0.3.0rc2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  53. {plothero-0.3.0b1 → plothero-0.3.0rc2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  54. {plothero-0.3.0b1 → plothero-0.3.0rc2}/LICENSE +0 -0
  55. {plothero-0.3.0b1 → plothero-0.3.0rc2}/docs/api/downsample.md +0 -0
  56. {plothero-0.3.0b1 → plothero-0.3.0rc2}/docs/api/graph-objects.md +0 -0
  57. {plothero-0.3.0b1 → plothero-0.3.0rc2}/docs/api/subplots.md +0 -0
  58. {plothero-0.3.0b1 → plothero-0.3.0rc2}/docs/assets/favicon-rounded.svg +0 -0
  59. {plothero-0.3.0b1 → plothero-0.3.0rc2}/docs/assets/favicon.svg +0 -0
  60. {plothero-0.3.0b1 → plothero-0.3.0rc2}/docs/assets/logo.png +0 -0
  61. {plothero-0.3.0b1 → plothero-0.3.0rc2}/docs/guide/figures-and-traces.md +0 -0
  62. {plothero-0.3.0b1 → plothero-0.3.0rc2}/docs/guide/migrating-from-plotly.md +0 -0
  63. {plothero-0.3.0b1 → plothero-0.3.0rc2}/docs/guide/subplots.md +0 -0
  64. {plothero-0.3.0b1 → plothero-0.3.0rc2}/docs/index.md +0 -0
  65. {plothero-0.3.0b1 → plothero-0.3.0rc2}/docs/quickstart.md +0 -0
  66. {plothero-0.3.0b1 → plothero-0.3.0rc2}/docs/roadmap.md +0 -0
  67. {plothero-0.3.0b1 → plothero-0.3.0rc2}/docs/stylesheets/extra.css +0 -0
  68. {plothero-0.3.0b1 → plothero-0.3.0rc2}/examples/lttb.py +0 -0
  69. {plothero-0.3.0b1 → plothero-0.3.0rc2}/examples/m4.py +0 -0
  70. {plothero-0.3.0b1 → plothero-0.3.0rc2}/examples/minmax.py +0 -0
  71. {plothero-0.3.0b1 → plothero-0.3.0rc2}/examples/ppg.py +0 -0
  72. {plothero-0.3.0b1 → plothero-0.3.0rc2}/examples/walkthrough/04_benchmark.py +1 -1
  73. {plothero-0.3.0b1 → plothero-0.3.0rc2}/examples/walkthrough/07_heatmap.py +1 -1
  74. {plothero-0.3.0b1 → plothero-0.3.0rc2}/examples/walkthrough/README.md +0 -0
  75. {plothero-0.3.0b1 → plothero-0.3.0rc2}/examples/walkthrough/common.py +0 -0
  76. {plothero-0.3.0b1 → plothero-0.3.0rc2}/mkdocs.yml +0 -0
  77. {plothero-0.3.0b1 → plothero-0.3.0rc2}/plothero/__init__.py +10 -10
  78. {plothero-0.3.0b1 → plothero-0.3.0rc2}/plothero/_viewer.py +0 -0
  79. {plothero-0.3.0b1 → plothero-0.3.0rc2}/plothero/downsample.py +0 -0
  80. {plothero-0.3.0b1 → plothero-0.3.0rc2}/plothero/subplots.py +0 -0
  81. {plothero-0.3.0b1 → plothero-0.3.0rc2}/src/lib.rs +0 -0
  82. {plothero-0.3.0b1 → plothero-0.3.0rc2}/wrangler.toml +0 -0
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: developer
3
+ description: Developer for implementation. Use to implement a tracker task in the project repository with tests.
4
+ model: sonnet
5
+ color: cyan
6
+ disallowedTools: Agent
7
+ isolation: worktree
8
+ skills: tracker-protocol, git-protocol
9
+ ---
10
+
11
+ You implement the assigned task in the project repository, following the
12
+ git-protocol skill: the task's branch and worktree, small logical commits
13
+ that mention the task key, tests for what you change, and a pull request.
14
+ Comment with what changed and how to verify it. Move the task to review and
15
+ hand it to QA.
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: engineer
3
+ description: Software engineer for technical design, architecture, code review and merging. Use before large changes and to review the developer's work.
4
+ model: sonnet
5
+ color: green
6
+ disallowedTools: Agent
7
+ skills: tracker-protocol, git-protocol
8
+ ---
9
+
10
+ You own technical design. Propose the approach in a tracker comment before
11
+ large changes, break work into tasks for the developer, and keep
12
+ architecture notes current. Review the developer's pull requests, decide
13
+ whether a change is critical, and merge or hand it to the board as the
14
+ git-protocol skill says.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: lead
3
+ description: Team lead and orchestrator. Runs as the main session to break the board's objectives and key results into tracker tasks, assign them to pm, engineer, developer and qa, and report to the board.
4
+ model: opus
5
+ color: purple
6
+ disallowedTools: Edit, Write, NotebookEdit
7
+ skills: tracker-protocol, team-plan, team-inbox, team-cycle
8
+ ---
9
+
10
+ You lead this project's team and report to the board, the human owner, who
11
+ sets objectives and key results in the project's tracker. Follow the
12
+ tracker-protocol skill.
13
+
14
+ - Break each objective into tasks that move its key results (team-plan).
15
+ Never change the objectives or key results themselves.
16
+ - Assign each task to one teammate through its `team-*` label, then delegate
17
+ with the task key, goal and acceptance criteria. Do not edit code yourself.
18
+ - Read new board comments and adjust the plan.
19
+ - Ask the board through a tracker comment and the `needs-board` label when a
20
+ decision, scope change or risk is the board's call.
21
+ - Move a non-critical code task to done once its pull request is merged,
22
+ and remove its worktree.
23
+ - End every run with a short summary comment on the tasks you touched.
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: pm
3
+ description: Product manager. Use to refine tasks the lead created (scope, acceptance criteria, splitting) and to keep the backlog ordered by key result.
4
+ model: sonnet
5
+ color: blue
6
+ disallowedTools: Agent, Edit, Write, NotebookEdit
7
+ skills: tracker-protocol
8
+ ---
9
+
10
+ You refine the tasks the Lead creates: clear goal, scope and acceptance
11
+ criteria, smaller tasks when one is too large, and an order that follows the
12
+ key results. Ask the Lead when scope or priority is unclear.
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: qa
3
+ description: QA engineer. Use to verify a task in review against its acceptance criteria and report pass or fail with evidence.
4
+ model: haiku
5
+ color: orange
6
+ disallowedTools: Agent, Edit, Write, NotebookEdit
7
+ isolation: worktree
8
+ skills: tracker-protocol, git-protocol
9
+ ---
10
+
11
+ You verify work against the task's acceptance criteria. Check out the pull
12
+ request's head detached in your own worktree, run the tests and checks,
13
+ reproduce defects, and post pass or fail with evidence in a tracker comment.
14
+ Do not change code.
@@ -0,0 +1,11 @@
1
+ {
2
+ "agent": "lead",
3
+ "permissions": {
4
+ "allow": [
5
+ "Bash(gh pr create *)"
6
+ ]
7
+ },
8
+ "enabledMcpjsonServers": [
9
+ "linear"
10
+ ]
11
+ }
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: git-protocol
3
+ description: Ground rules for code changes, branches, worktrees, commits and pull requests. Load before changing, reviewing or testing code in the project repository.
4
+ ---
5
+
6
+ # Git protocol
7
+
8
+ 1. Read the "Team git" section of the project's `CLAUDE.md`. If it is
9
+ missing, use the defaults below and say so in the task comment.
10
+ 2. Read the project's own `CLAUDE.md`, `AGENTS.md` and contributing docs.
11
+ Their conventions win over this skill.
12
+
13
+ ## Branches and worktrees
14
+
15
+ - One task, one branch, one worktree. Name the branch with Conventional
16
+ Branch: `<type>/<KEY>-<n>-<slug>`, lowercase, words joined by hyphens.
17
+ Types: `feat`, `fix`, `hotfix`, `chore`. Example: `feat/CB-12-login-form`.
18
+ - Branch from the base branch (default `main`). Never commit or push to the
19
+ base branch.
20
+ - Work only inside the task's worktree. When a task comes back from review,
21
+ reuse its branch.
22
+ - When `Pull requests: no`, skip branches and pull requests: commit on the
23
+ base branch, one task at a time.
24
+
25
+ ## Commits
26
+
27
+ - Conventional Commits with the task key, for example
28
+ `feat(auth): add login form (CB-12)`.
29
+ - Small logical commits. Never skip hooks with `--no-verify`.
30
+ - Never commit secrets, `.env` files or credentials.
31
+ - Before review, rebase on the base branch and run the test command. Never
32
+ force-push a branch another teammate is working on.
33
+
34
+ ## Critical changes
35
+
36
+ A change is critical when it:
37
+
38
+ - adds, removes or upgrades a dependency;
39
+ - touches CI, deploy, infrastructure, secrets or the `.claude/` team files;
40
+ - changes a database schema, migrates or deletes data;
41
+ - touches authentication, permissions, payments or a public API;
42
+ - or the engineer judges it risky.
43
+
44
+ Before starting a critical change, comment the approach. Add the `critical`
45
+ label to the task as soon as the change is known to be critical.
46
+
47
+ ## Pull requests
48
+
49
+ - The developer opens one pull request per task, titled like its main
50
+ commit, linking the task, with what changed and how to verify it.
51
+ - The engineer reviews the diff; QA tests the pull request's head.
52
+ - Not critical: after QA passes and the engineer approves, the engineer
53
+ merges with the configured method (default squash) and deletes the
54
+ branch. The Lead moves the task to done.
55
+ - Critical: after QA passes and the engineer approves, add `needs-board`.
56
+ Only the board merges it and moves the task to done.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: jira-protocol
3
+ description: How objectives, key results and tasks map to Jira. Load through tracker-protocol when the project's tracker is jira.
4
+ ---
5
+
6
+ # Jira mapping
7
+
8
+ - Objective: an epic in the project, objective in the description.
9
+ - Key result: a line in the epic description,
10
+ `KR1: <metric> from <baseline> to <target>`.
11
+ - Open and done: key results have no dates; the team works them as soon as
12
+ possible. A key result is open until the board appends `[done]` to its
13
+ line.
14
+ - Task: a Task or Story whose parent is the epic, with a `kr-<n>` label for
15
+ the key result it serves.
16
+ - Status: workflows differ between projects. Use the status categories and
17
+ the transitions the issue offers; when there is no review status, keep the
18
+ task in progress with a `[QA]` request.
19
+ - Useful JQL:
20
+ - open objectives: `project = <KEY> AND issuetype = Epic AND statusCategory != Done`
21
+ - open team tasks: `project = <KEY> AND labels in (team-lead, team-pm, team-engineer, team-developer, team-qa) AND statusCategory != Done ORDER BY priority DESC`
22
+ - recent changes: `project = <KEY> AND updated >= -4h`
23
+ - Never edit issues outside the project.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: linear-protocol
3
+ description: How objectives, key results and tasks map to Linear. Load through tracker-protocol when the project's tracker is linear.
4
+ ---
5
+
6
+ # Linear mapping
7
+
8
+ - Objective: a Linear project in the team, objective in the description.
9
+ - Key result: a line in a `Milestones` section of the project description,
10
+ `KR1: <metric> from <baseline> to <target>`. The board writes these lines
11
+ from any device; the Lead mirrors each one as a project milestone.
12
+ - Milestone sync, before planning:
13
+ - For each line without a milestone named `KR<n> ...`, create one: name
14
+ `KR<n> <short metric>`, the full line as description, no target date.
15
+ - If a line changed, update its milestone's description to match. The
16
+ description wins over the milestone.
17
+ - Never delete a milestone. If a line is removed, comment on the project
18
+ with `needs-board` and stop planning that key result.
19
+ - If milestones cannot be created, add a `kr-<n>` label to the tasks
20
+ instead and say so in the plan comment.
21
+ - Open and done: key results have no dates; the team works them as soon as
22
+ possible. A key result is open until the board appends `[done]` to its
23
+ line.
24
+ - Task: an issue in the project, linked to the key result's milestone.
25
+ - States: Backlog, Todo, In Progress, In Review, Done, Canceled.
26
+ - Changes since a time: issues, projects and comments updated after it.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: team-cycle
3
+ description: One autonomous team cycle for scheduled runs. Check the tracker, stop early when nothing changed, otherwise plan and work tasks. Use as the prompt of a scheduled task or /loop.
4
+ ---
5
+
6
+ # Team cycle
7
+
8
+ Act as the lead agent for this whole run.
9
+
10
+ 1. Load tracker-protocol to know the tracker and its mapping.
11
+ 2. Quick check, read-only: list objectives, tasks and comments changed in the
12
+ last 4 hours, ignoring comments that start with a role prefix. Also list
13
+ open key results with no open tasks. The tracker mapping says when a key
14
+ result is open.
15
+ 3. If nothing changed, no team task is open and every open key result has
16
+ open tasks, reply "No changes" and stop. Do not load other skills.
17
+ 4. If an objective or key result changed, or an open key result has no open
18
+ tasks, run team-plan.
19
+ 5. Run team-inbox.
20
+ 6. Reply with one line per task touched: key, owner, new status.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: team-inbox
3
+ description: Work the open tracker tasks of the project. Use when the user runs /team-inbox or from team-cycle.
4
+ ---
5
+
6
+ # Team inbox
7
+
8
+ 1. Load tracker-protocol to know the tracker and its mapping.
9
+ 2. List open tasks with an owner label or no label, plus tasks where the
10
+ board commented after the last team comment.
11
+ 3. Take at most 3 tasks per run, highest priority first. Work them in
12
+ parallel only when they change different files; otherwise one after
13
+ another.
14
+ 4. For each task, delegate to the teammate named by its label, with the task
15
+ key, goal and acceptance criteria.
16
+ 5. Make sure each touched task has a role-prefixed comment and the right
17
+ status.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: team-plan
3
+ description: Break the board's objectives and key results into tracker tasks and assign them. Use when the user runs /team-plan, from team-cycle, or when an objective is added or changed.
4
+ ---
5
+
6
+ # Team plan
7
+
8
+ 1. Load tracker-protocol to know the tracker and its mapping.
9
+ 2. List the open objectives and their key results, and run any sync the
10
+ tracker mapping asks for.
11
+ 3. Skip any key result that is unclear or not measurable: comment on the
12
+ objective with the question, add `needs-board`, and move on.
13
+ 4. For each key result without enough open tasks, create tasks under the
14
+ objective and key result: goal, scope, acceptance criteria, priority.
15
+ 5. Give each task one owner label and link blocking tasks where order
16
+ matters.
17
+ 6. Ask the pm to refine the new tasks when they need sharper criteria.
18
+ 7. Post a comment on the objective with the plan: tasks created, owners,
19
+ order.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: tracker-protocol
3
+ description: Common rules for how the team uses the project's issue tracker, and which tracker it is. Load before reading or writing the tracker.
4
+ ---
5
+
6
+ # Tracker protocol
7
+
8
+ 1. Read the "Team tracker" section of the project's `CLAUDE.md`.
9
+ 2. If `Tracker: linear`, load the linear-protocol skill. If `Tracker: jira`,
10
+ load the jira-protocol skill. If the section is missing or names another
11
+ tracker, stop and ask the board in chat.
12
+ 3. Work only in the team or project named there.
13
+
14
+ Rules for every tracker:
15
+
16
+ - Three levels: objective, key result, task. Only the board writes or
17
+ changes objectives and key results; the Lead writes tasks. Mirroring the
18
+ board's key results where the tracker mapping asks for it does not count
19
+ as a change.
20
+ - Owner labels: `team-lead`, `team-pm`, `team-engineer`, `team-developer`,
21
+ `team-qa`. A task without an owner label belongs to the lead.
22
+ - `needs-board` marks a question for the board; `blocked` marks work that
23
+ cannot continue.
24
+ - Status follows the categories to do, in progress, in review, done. Only
25
+ the board moves a task to done, except a non-critical code task whose
26
+ pull request the engineer merged (git-protocol): the Lead moves it.
27
+ - `critical` marks a code change the board reviews and merges.
28
+ - Start every comment with the role in brackets, for example `[QA]`.
29
+ - Keep comments short: what was done, evidence or link, next step.
30
+ - Never delete tasks or comments.
@@ -0,0 +1,13 @@
1
+ # Keeps the GitHub Actions used in .github/workflows/ up to date.
2
+ version: 2
3
+ updates:
4
+ - package-ecosystem: github-actions
5
+ directory: /
6
+ schedule:
7
+ interval: weekly
8
+ commit-message:
9
+ prefix: ci
10
+ groups:
11
+ github-actions:
12
+ patterns:
13
+ - "*"
@@ -25,9 +25,9 @@ jobs:
25
25
  deploy:
26
26
  runs-on: ubuntu-latest
27
27
  steps:
28
- - uses: actions/checkout@v4
28
+ - uses: actions/checkout@v7
29
29
 
30
- - uses: actions/setup-python@v5
30
+ - uses: actions/setup-python@v7
31
31
  with:
32
32
  python-version: "3.12"
33
33
  cache: pip
@@ -2,8 +2,10 @@ name: Release
2
2
 
3
3
  # Runs only when a GitHub release is published. Builds abi3 wheels (one per
4
4
  # platform, Python 3.9+) and the sdist, tests every wheel from a clean
5
- # environment, publishes to PyPI, then attaches the files to the release
6
- # and sets its notes from CHANGELOG.md.
5
+ # environment, signs every file with a GitHub build provenance attestation,
6
+ # publishes to PyPI with Trusted Publishing (which uploads PEP 740
7
+ # attestations), then attaches the files to the release and sets its notes
8
+ # from CHANGELOG.md.
7
9
  # Generated with `maturin generate-ci github`, then trimmed.
8
10
 
9
11
  on:
@@ -22,7 +24,7 @@ jobs:
22
24
  permissions:
23
25
  contents: read
24
26
  steps:
25
- - uses: actions/checkout@v6
27
+ - uses: actions/checkout@v7
26
28
 
27
29
  - name: Compare tag with Cargo.toml and extract release notes
28
30
  env:
@@ -46,7 +48,7 @@ jobs:
46
48
  cat release-notes.md
47
49
 
48
50
  - name: Upload release notes
49
- uses: actions/upload-artifact@v6
51
+ uses: actions/upload-artifact@v7
50
52
  with:
51
53
  name: release-notes
52
54
  path: release-notes.md
@@ -67,9 +69,9 @@ jobs:
67
69
  - { name: macos-arm64, runner: macos-latest, target: aarch64 }
68
70
  - { name: windows-x64, runner: windows-latest, target: x64 }
69
71
  steps:
70
- - uses: actions/checkout@v6
72
+ - uses: actions/checkout@v7
71
73
 
72
- - uses: actions/setup-python@v6
74
+ - uses: actions/setup-python@v7
73
75
  with:
74
76
  python-version: "3.12"
75
77
 
@@ -80,7 +82,7 @@ jobs:
80
82
  args: --release --out dist
81
83
  manylinux: auto
82
84
 
83
- - uses: actions/upload-artifact@v6
85
+ - uses: actions/upload-artifact@v7
84
86
  with:
85
87
  name: wheels-${{ matrix.platform.name }}
86
88
  path: dist/*.whl
@@ -93,7 +95,7 @@ jobs:
93
95
  permissions:
94
96
  contents: read
95
97
  steps:
96
- - uses: actions/checkout@v6
98
+ - uses: actions/checkout@v7
97
99
 
98
100
  - name: Build sdist
99
101
  uses: PyO3/maturin-action@v1
@@ -101,7 +103,7 @@ jobs:
101
103
  command: sdist
102
104
  args: --out dist
103
105
 
104
- - uses: actions/upload-artifact@v6
106
+ - uses: actions/upload-artifact@v7
105
107
  with:
106
108
  name: wheels-sdist
107
109
  path: dist/*.tar.gz
@@ -132,9 +134,9 @@ jobs:
132
134
  run:
133
135
  shell: bash
134
136
  steps:
135
- - uses: actions/checkout@v6
137
+ - uses: actions/checkout@v7
136
138
 
137
- - uses: actions/download-artifact@v7
139
+ - uses: actions/download-artifact@v8
138
140
  with:
139
141
  name: wheels-${{ matrix.platform.name }}
140
142
  path: dist
@@ -173,20 +175,36 @@ jobs:
173
175
  environment:
174
176
  name: pypi
175
177
  url: https://pypi.org/p/plothero
176
- permissions: {}
178
+ permissions:
179
+ # OIDC token for PyPI Trusted Publishing and for signing attestations.
180
+ id-token: write
181
+ # Store the build provenance attestations on GitHub.
182
+ attestations: write
177
183
  steps:
178
- - uses: actions/download-artifact@v7
184
+ - uses: actions/download-artifact@v8
179
185
  with:
180
186
  pattern: wheels-*
181
187
  path: dist
182
188
  merge-multiple: true
183
189
 
184
- # Uploads with an API token stored in the PYPI_API_TOKEN secret.
185
- # Attestations need trusted publishing, so they are turned off.
186
- - uses: pypa/gh-action-pypi-publish@release/v1
190
+ # Signs a SLSA build provenance attestation for every wheel and the
191
+ # sdist. Verify a file with:
192
+ # gh attestation verify <file> --repo matteo-serafino/plothero
193
+ #
194
+ # Runs only in a public repository: a private one cannot store GitHub
195
+ # attestations without Enterprise Cloud, and a failing step here would
196
+ # skip the PyPI upload below.
197
+ - name: Attest build provenance
198
+ if: github.event.repository.visibility == 'public'
199
+ uses: actions/attest-build-provenance@v4
187
200
  with:
188
- password: ${{ secrets.PYPI_API_TOKEN }}
189
- attestations: false
201
+ subject-path: dist/*
202
+
203
+ # Trusted Publishing: no API token. PyPI must list this repository,
204
+ # this workflow (release.yml), and the "pypi" environment as a
205
+ # trusted publisher. The action also signs and uploads a PEP 740
206
+ # attestation per file, shown as provenance on PyPI.
207
+ - uses: pypa/gh-action-pypi-publish@release/v1
190
208
 
191
209
  release:
192
210
  name: Update GitHub release
@@ -195,13 +213,13 @@ jobs:
195
213
  permissions:
196
214
  contents: write
197
215
  steps:
198
- - uses: actions/download-artifact@v7
216
+ - uses: actions/download-artifact@v8
199
217
  with:
200
218
  pattern: wheels-*
201
219
  path: dist
202
220
  merge-multiple: true
203
221
 
204
- - uses: actions/download-artifact@v7
222
+ - uses: actions/download-artifact@v8
205
223
  with:
206
224
  name: release-notes
207
225
 
@@ -25,3 +25,8 @@ wheels/
25
25
  # Walkthrough: downloaded dataset and exported figures
26
26
  /examples/walkthrough/data/
27
27
  /examples/walkthrough/output/
28
+
29
+ # Coverage
30
+ .coverage
31
+ .coverage.*
32
+ htmlcov/
@@ -0,0 +1,8 @@
1
+ {
2
+ "mcpServers": {
3
+ "linear": {
4
+ "type": "http",
5
+ "url": "https://mcp.linear.app/mcp"
6
+ }
7
+ }
8
+ }
@@ -22,7 +22,8 @@ pytest tests/test_downsample.py # one file
22
22
  pytest -k datetime # by keyword
23
23
 
24
24
  # Lint
25
- flake8 # config in .flake8 (max-line-length 120, E501/E722 ignored)
25
+ ruff check # config in [tool.ruff] in pyproject.toml (E, W, F, I, B, NPY, RUF, PT; line length 120; E501 and E722 enforced)
26
+ ruff check --fix # also sorts imports: built-in, third party, plothero
26
27
 
27
28
  # Docs (MkDocs + Material + mkdocstrings)
28
29
  pip install -e ".[docs]"
@@ -54,14 +55,17 @@ Two layers, one contract: every downsampling algorithm exists twice, once in `sr
54
55
 
55
56
  `subplots.py`'s `make_subplots` builds a `Figure` pre-populated with a grid of axes (row 1 = top, 1-indexed, matching Plotly convention) and reuses `graph_objects._axis_suffix` to map `(row, col)` to Plotly's `xaxis`/`xaxis2`/`xaxis3`/... naming scheme. `Figure.add_trace`/`update_xaxes`/`update_yaxes` accept `row=`/`col=` to route to a specific panel.
56
57
 
57
- `Figure.show()` serves the page plus a `/downsample` endpoint (zoom-triggered re-downsampling via `Scatter.resample_range`) through one HTTP handler, `graph_objects._make_request_handler`, used by two hosts. The default host is `plothero/_viewer.py`: `launch()` writes the rendered HTML and each decimated trace's full-resolution arrays (`.npz` plus a JSON manifest, no pickling) to a temp dir, then starts `python -m plothero._viewer <dir>` detached from the parent (new session on POSIX, `DETACHED_PROCESS` on Windows). The child loads the payload, deletes the temp dir, prints its URL on stdout for the parent, and exits once the page's heartbeats and `pagehide` beacon say no tab is left (`PageTracker`). `show(detached=False)` keeps the older in-process host, `_serve_figure_locally`, on a non-daemon thread. Lifecycle timeouts are module constants in `_viewer.py` and keyword arguments of `launch()`, so tests can shorten them.
58
+ `Figure.show()` serves the page plus a `/downsample` endpoint (zoom-triggered re-downsampling via `Scatter.resample_range`) through one HTTP handler, `graph_objects._make_request_handler`, used by two hosts. The default host is `plothero/_viewer.py`: `launch()` writes the rendered HTML and each decimated trace's full-resolution arrays (`.npz` plus a JSON manifest, no pickling) to a temp dir, then starts `python -m plothero._viewer <dir>` detached from the parent (new session on POSIX, `DETACHED_PROCESS` on Windows). The child loads the payload, deletes the temp dir, prints its URL on stdout for the parent, and exits once the page's heartbeats and `pagehide` beacon say no tab is left (`PageTracker`). The page side of zooming is `graph_objects._DYNAMIC_RESAMPLE_JS`: each fetch is padded by `DYNAMIC_RESAMPLE_PAD` visible spans per side and kept in a per-trace LRU cache of `DYNAMIC_RESAMPLE_CACHE_SIZE` windows, so panning rarely waits on the server; `tests/test_resample_js.py` runs it in Node. `show(detached=False)` keeps the older in-process host, `_serve_figure_locally`, on a non-daemon thread. Lifecycle timeouts are module constants in `_viewer.py` and keyword arguments of `launch()`, so tests can shorten them.
58
59
 
59
60
  `Scatter`, `Bar`, and `Heatmap` are implemented as trace types. Only `Scatter` is downsampled (line/marker plots, time series with automatic `datetime64`/`DatetimeIndex` handling); `Bar` and `Heatmap` pass their data through as-is.
60
61
 
61
62
  ## Git contract
62
63
  - Commit messages follow **Conventional Commits**.
64
+ - Branch names follow **[Conventional Branch](https://conventional-branch.github.io/)**: `<type>/<description>`, with type `feat/`, `fix/`, `hotfix/`, `release/`, or `chore/`. Prefer `feat/` and `fix/` over their long forms `feature/` and `bugfix/`, to match the Conventional Commits types. Use lowercase letters, digits, and single hyphens; dots only in release versions (e.g. `release/v1.2.0`). Include the issue number when there is one (e.g. `feat/issue-23-pan-cache`).
63
65
  - Signed commits: yes.
64
66
  - Co-Authored-By trailer: no.
67
+ - PR descriptions: always use the template in `.github/PULL_REQUEST_TEMPLATE.md` (`### Aim`, `### Changes`, `### Description`).
68
+ - PR descriptions: no "🤖 Generated with [Claude Code]" footer and no Claude session link.
65
69
  - **Integration:** direct-to-main, **fast-forward only**. No merge commits on `main`.
66
70
 
67
71
  ## Documentation contract
@@ -7,6 +7,74 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.0-rc.2] - 2026-11-25
11
+
12
+ ### Fixed
13
+
14
+ - `TestLaunch::test_start_failure_raises_and_cleans_up` no longer fails on Windows,
15
+ where the `FileNotFoundError` message does not include the executable path.
16
+ The test checks the exception type and `errno.ENOENT` on every OS, and the
17
+ path only on POSIX.
18
+
19
+ ## [0.3.0-rc.1] - 2026-11-24
20
+
21
+ ### Added
22
+
23
+ - Ruff rule set `PT` (flake8-pytest-style) is now enforced. Every
24
+ `pytest.raises` in the tests pins the exact error message with `match=`,
25
+ combined asserts are split and `parametrize` names are tuples.
26
+ - Ruff rule sets `B` (bugbear), `NPY` (NumPy) and `RUF` (ruff-specific) are
27
+ now enforced, alongside `E`, `W`, `F` and `I`. The few hits were fixed
28
+ (sorted `__all__`, unused `noqa` comments, unused unpacked variables and
29
+ the legacy `np.random` call in the example).
30
+ - A 95% total coverage floor (`fail_under = 95`): the coverage command
31
+ fails when coverage drops below it. See the development docs.
32
+ - Provenance for release files. The release workflow signs every wheel and
33
+ the sdist with a GitHub build provenance attestation
34
+ (`actions/attest-build-provenance`), verifiable with
35
+ `gh attestation verify`, and PyPI now stores a PEP 740 attestation for
36
+ each file. See "Verifying a download" in the installation docs.
37
+ - `SECURITY.md` with the supported versions and how to report a
38
+ vulnerability privately through GitHub Security Advisories.
39
+ - Dependabot configuration (`.github/dependabot.yml`) that keeps the
40
+ GitHub Actions in the workflows up to date.
41
+ - Pan cache for `Figure.show()` (#23). Each zoomed-in `/downsample` fetch
42
+ now covers one visible span on each side of the view
43
+ (`DYNAMIC_RESAMPLE_PAD`), so panning shows real data at once instead of
44
+ an empty plot while the next fetch runs. The page keeps the last 8
45
+ fetched windows per trace (`DYNAMIC_RESAMPLE_CACHE_SIZE`) and reuses one
46
+ that covers the view at a similar zoom level
47
+ (`DYNAMIC_RESAMPLE_ZOOM_TOLERANCE`), so panning back needs no request.
48
+ Near a window's edge, the next window is prefetched in the background.
49
+ - `tests/test_resample_js.py`: runs the zoom/pan page script in Node with a
50
+ fake Plotly.js. Skipped when `node` is not installed.
51
+ - Coverage reporting for the Python package: `pytest-cov` in the `dev`
52
+ extra and `[tool.coverage]` settings in `pyproject.toml`. Run
53
+ `pytest --cov` for total and per-module line coverage with missing
54
+ lines; the detached viewer subprocess is measured too. See
55
+ `docs/development.md`.
56
+
57
+ ### Changed
58
+
59
+ - `ruff` replaces `flake8` as the only linter (`ruff` in the `dev` extra,
60
+ `[tool.ruff]` in `pyproject.toml`, `.flake8` removed). It keeps the same
61
+ rules (E, W, F; line length 120, E501 and E722 enforced) and adds import
62
+ order (`I`): built-in, third party, `plothero`. The check is now
63
+ `ruff check`, and imports in `plothero/` and `examples/` were reordered.
64
+ - The release workflow publishes to PyPI with Trusted Publishing (OIDC)
65
+ instead of the `PYPI_API_TOKEN` secret. A trusted publisher for
66
+ `release.yml` and the `pypi` environment must be registered on PyPI
67
+ before the next release.
68
+ - The `/downsample` endpoint now accepts up to 100 000 points per request
69
+ (`MAX_RESAMPLE_POINTS`, was 50 000), to fit a padded window.
70
+ - A relayout that leaves the x-axis unchanged (e.g. a y-only zoom) no
71
+ longer re-fetches, and a response that arrives after the view moved on
72
+ is cached instead of overwriting the current view.
73
+
74
+ ### Fixed
75
+
76
+ - Bare `flake8` no longer lints virtualenvs, build output or `.claude` worktrees.
77
+
10
78
  ## [0.3.0-beta.1] - 2026-10-31
11
79
 
12
80
  ### Added
@@ -209,6 +277,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
209
277
  - Documentation site built with MkDocs, Material, and mkdocstrings, deployed
210
278
  to Cloudflare Pages.
211
279
 
280
+ [Unreleased]: https://github.com/matteo-serafino/plothero/compare/v0.3.0-rc.2...HEAD
281
+ [0.3.0-rc.2]: https://github.com/matteo-serafino/plothero/compare/v0.3.0-rc.1...v0.3.0-rc.2
282
+ [0.3.0-rc.1]: https://github.com/matteo-serafino/plothero/releases/tag/v0.3.0-rc.1
212
283
  [0.3.0-beta.1]: https://github.com/matteo-serafino/plothero/releases/tag/v0.3.0-beta.1
213
284
  [0.2.0]: https://github.com/matteo-serafino/plothero/releases/tag/v0.2.0
214
285
  [0.1.0]: https://github.com/matteo-serafino/plothero/releases/tag/v0.1.0
@@ -0,0 +1,12 @@
1
+ @AGENTS.md
2
+
3
+ ## Team tracker
4
+ Tracker: linear
5
+ Linear team key: AGT
6
+
7
+ ## Team git
8
+ Base branch: main
9
+ Pull requests: yes
10
+ Merge method: squash
11
+ Test command: maturin develop && pytest && ruff check
12
+ Worktree setup: each worktree needs its own `.venv` (`python3 -m venv .venv && . .venv/bin/activate && pip install -e ".[dev]"`); the main checkout's editable install points at the main checkout's code.
@@ -155,7 +155,7 @@ dependencies = [
155
155
 
156
156
  [[package]]
157
157
  name = "plothero-core"
158
- version = "0.3.0-beta.1"
158
+ version = "0.3.0-rc.2"
159
159
  dependencies = [
160
160
  "numpy",
161
161
  "pyo3",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "plothero-core"
3
- version = "0.3.0-beta.1"
3
+ version = "0.3.0-rc.2"
4
4
  edition = "2021"
5
5
  readme = "README.md"
6
6