Skip to main content

Pyodide-friendly fork of fg-data-profiling (ydata-profiling) for browser WASM

Project description

fg-data-profiling-wasm

Pyodide-friendly fork of fg-data-profiling (formerly ydata-profiling / pandas-profiling).

You do not compile this package to WASM. Upstream already ships as a pure-Python wheel (py2.py3-none-any). This fork only does dependency surgery so it can install and run under Pyodide.

What changed vs upstream

Change Why
Drop hard deps: numba, minify-html, phik Native / JIT; broken or impractical in browser WASM
Default html.minify_html = False Avoid lazy-importing the Rust minify-html extension
Soft-fail if minify is requested but missing Safer in constrained environments
Keep phi_k off (already upstream default) Avoid needing phik
Package name fg-data-profiling-wasm Distinguish the Pyodide wheel from upstream
Allow pandas>=3 (<4) Upstream still pins <3.0; this fork patches typeset/string paths

Optional native extras remain under [project.optional-dependencies] native for desktop use.

Layout

src/                  # vendored upstream + patches
patches/              # 0001 pyodide + 0002 pandas3 + 0003 display + 0004 font scale (reapplied on sync)
scripts/sync-upstream.sh
upstream.lock.json    # pinned upstream ref + commit
pyodide/              # install helper + dependency matrix
pyproject.toml        # Pyodide-friendly dependency set

Upgrading from upstream

Pinned upstream lives in upstream.lock.json.

# Is upstream ahead of our lock?
make check-upstream
# or: ./scripts/sync-upstream.sh --check

# Pull latest develop (or whatever ref is in the lock), re-apply patches,
# refresh dependency pins, update the lockfile
make sync
# or: ./scripts/sync-upstream.sh

# Sync a release tag / other ref
make sync-ref REF=v4.9.0
# or: ./scripts/sync-upstream.sh --ref v4.9.0

# After a successful sync, bump our PyPI version
./scripts/sync-upstream.sh --bump patch

# If a patch no longer applies: fix src/ by hand, then regenerate the patch series
./scripts/sync-upstream.sh --regen-patches

Typical release flow after upstream moves:

./scripts/sync-upstream.sh --ref develop --bump patch
python -m build
# review git diff, commit, push, twine upload dist/*

A weekly GitHub Action (.github/workflows/upstream-check.yml) opens/comments on an issue when the lock is behind.

Build a wheel

python -m pip install build
python -m build    # → dist/fg_data_profiling_wasm-*-py2.py3-none-any.whl

Current artifact:

  • dist/fg_data_profiling_wasm-0.1.1-py2.py3-none-any.whl (purelib; PyPI-compatible; pandas <4)

Publish to PyPI (GitHub Actions)

The package is not on PyPI yet. Publishing is automated via Trusted Publishing (OIDC) — no long-lived API token in the repo.

One-time PyPI setup

  1. Sign in at https://pypi.org/
  2. Open PublishingAdd a new pending publisher (project does not exist yet):
    • PyPI project name: fg-data-profiling-wasm
    • Owner: awesome-wasm-packages
    • Repository: fg-data-profiling-wasm
    • Workflow name: publish.yml
    • Environment name: pypi
  3. In GitHub → Settings → Environments → create environment pypi (optional protection rules / required reviewers).

Publish a version

# bump version in VERSION + pyproject.toml (or)
./scripts/sync-upstream.sh --bump patch
git add -A && git commit -m "Release $(tr -d '[:space:]' < VERSION)"
git tag "v$(tr -d '[:space:]' < VERSION)"
git push && git push --tags

Then create a GitHub Release for that tag (or use the UI). The Publish to PyPI workflow builds the wheel and uploads it.

You can also run the workflow manually: Actions → Publish to PyPI → Run workflow.

Use in Pyodide / PyConsole

Package name on PyPI is fg-data-profiling-wasm; import name is data_profiling.

import micropip
await micropip.install("fg-data-profiling-wasm")

import pandas as pd
from data_profiling import ProfileReport

df = pd.DataFrame({"a": [1, 2, 3], "b": ["x", "y", "x"]})
report = ProfileReport(
    df,
    minimal=True,
    progress_bar=False,
    correlations={"phi_k": {"calculate": False}},
    html={"minify_html": False},
)
html = report.to_html()

Notes for PyConsole (Pyodide 314 / Python 3.14):

  • Use >=0.1.2 (older releases reject Python 3.14 / pin numpy/scipy/matplotlib too tightly).
  • Auto-install-on-import will not find this package from import data_profiling — install by PyPI name first.
  • Prefer minimal=True and turn off phi_k / HTML minify for speed and missing native deps.

Display

PyConsole already detects ProfileReport and calls to_html() (no package API required). This fork also adds:

  • report.display()js.render in PyConsole, else Jupyter to_notebook_iframe()
  • _repr_html_() — returns an iframe HTML string (works without IPython)
report = ProfileReport(df, minimal=True, progress_bar=False)
report  # last expression: PyConsole / Jupyter rich display
# or: report.display()

Helpers live in pyodide/install.py; dependency notes in pyodide/DEPS.md.

Difficulty (recap)

Goal Difficulty
Install this pure wheel in Pyodide Easy
Usable ProfileReport (core EDA, minimal=True) Medium
Full upstream fidelity (phik, minify, numba-shaped features) Hard / skip

Upstream

Based on Data-Centric-AI-Community/fg-data-profiling. Tracked commit is in upstream.lock.json. MIT-licensed; see LICENSE.

Project details


Download files

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

Source Distribution

fg_data_profiling_wasm-0.2.0.tar.gz (313.0 kB view details)

Uploaded Source

Built Distribution

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

fg_data_profiling_wasm-0.2.0-py2.py3-none-any.whl (398.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file fg_data_profiling_wasm-0.2.0.tar.gz.

File metadata

  • Download URL: fg_data_profiling_wasm-0.2.0.tar.gz
  • Upload date:
  • Size: 313.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fg_data_profiling_wasm-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3bf7bbdd908e385f511c1165d812c96633d37670dafd839494b433de74d9c901
MD5 bb48e40d45758ec99aa21d59949b314f
BLAKE2b-256 81b50c9064aef676ce54f4904f288dd824f9316eb38e0838c0636dabad1b517a

See more details on using hashes here.

Provenance

The following attestation bundles were made for fg_data_profiling_wasm-0.2.0.tar.gz:

Publisher: publish.yml on awesome-wasm-packages/fg-data-profiling-wasm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fg_data_profiling_wasm-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for fg_data_profiling_wasm-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 308a4d5fd327534da7cdcf9ab84723008105762db565df7fb91637c5186beb09
MD5 61896fed8d680ad8be0633397be5dcc0
BLAKE2b-256 119d56d6e40277f7edd85de3a3ae4e47b0b6fbc2bc0834499bed3236eb86231a

See more details on using hashes here.

Provenance

The following attestation bundles were made for fg_data_profiling_wasm-0.2.0-py2.py3-none-any.whl:

Publisher: publish.yml on awesome-wasm-packages/fg-data-profiling-wasm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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