Skip to main content

pyd3js-path

Python port of d3-path.

Tracked version: see upstream_lock.json.

What you get

  • 100% upstream export parity (for the pinned d3-path@3.1.0): the compatibility matrix below covers every upstream export.
  • 100% Python test coverage for pyd3js_path (run the coverage command below).
  • 100% upstream d3-path JS tests vendored and passing: the upstream Mocha suite under packages/pyd3js-path/upstream/d3-path/test/ is run via a pytest gate (-m upstream).
  • UI parity checks (oracle): representative tests compare the SVG path d output to upstream via the repo’s Node oracle (-m oracle).

Install

From PyPI:

pip install pyd3js-path

This repo is a uv workspace monorepo. For local development:

uv sync --group dev

Usage

import pyd3js_path as p

path = p.path()
path.moveTo(0, 0)
path.lineTo(10, 10)
print(str(path))

Compatibility matrix

Pinned upstream inventory: docs/UPSTREAM_API.md (from d3-path@3.1.0).

Legend:

  • [oracle]: implemented and has oracle parity tests for representative cases.
  • [unit + upstream-js]: implemented and covered by Python unit tests plus the vendored upstream JS suite gate.

Upstream exports (d3-path@3.1.0)

  • Path — [oracle]
  • path — [oracle]
  • pathRound — [oracle]

Development

uv run pytest packages/pyd3js-path/package_tests
uv run ruff format packages/pyd3js-path
uv run ruff check packages/pyd3js-path
uv run ty check packages/pyd3js-path/src

Coverage (Python)

uv run pytest packages/pyd3js-path/package_tests --cov=pyd3js_path --cov-report=term-missing

Oracle parity tests (Node)

cd tools/oracle && npm ci
uv run pytest -m oracle packages/pyd3js-path/package_tests

Upstream d3-path test suite (vendored)

uv run python scripts/vendor_upstream.py
cd packages/pyd3js-path/upstream/d3-path && npm install
uv run pytest -m upstream packages/pyd3js-path/package_tests

Documentation

  • Upstream export inventory: docs/UPSTREAM_API.md

Metadata

Release files for pyd3js-path 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyd3js-path 0.1.0
File Size Uploaded
pyd3js_path-0.1.0.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyd3js-path 0.1.0
File Interpreter ABI Platform
pyd3js_path-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.6 kB

Release files / pyd3js_path-0.1.0.tar.gz

Download URL pyd3js_path-0.1.0.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a75e9bcac671fc1b90523264583bdc7b7ea3ba347731e66e4e4a75794c912406
BLAKE2b-256 checksum
How to use checksums
7ccf22114b306c4028a4437958c5825781f172f30d5a5ec8a5117c8ba6eb663e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / pyd3js_path-0.1.0-py3-none-any.whl

Download URL pyd3js_path-0.1.0-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7307733962f5efb265f8b02cb3f5a619357c55c10d8e0450b03734a076b13746
BLAKE2b-256 checksum
How to use checksums
b869ad8f8f787b4b96223608ace248d0792c5aac0ce8c2644ac924dfef9a5d6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page