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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyd3js_path-0.1.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyd3js_path-0.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file pyd3js_path-0.1.0.tar.gz.

File metadata

  • Download URL: pyd3js_path-0.1.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for pyd3js_path-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a75e9bcac671fc1b90523264583bdc7b7ea3ba347731e66e4e4a75794c912406
MD5 f6d08d8dfba8517459434efc7a9dcee2
BLAKE2b-256 7ccf22114b306c4028a4437958c5825781f172f30d5a5ec8a5117c8ba6eb663e

See more details on using hashes here.

File details

Details for the file pyd3js_path-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyd3js_path-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for pyd3js_path-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7307733962f5efb265f8b02cb3f5a619357c55c10d8e0450b03734a076b13746
MD5 bd38107399df66cbdfd0063f6258fcfd
BLAKE2b-256 b869ad8f8f787b4b96223608ace248d0792c5aac0ce8c2644ac924dfef9a5d6a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

0.0.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page