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

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

Layout

src/                  # vendored upstream + patches
patches/              # Pyodide-friendly diffs reapplied on each 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.0-py2.py3-none-any.whl (purelib; PyPI-compatible)

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

import pyodide_js
await pyodide_js.loadPackage([
    "numpy", "pandas", "scipy", "matplotlib", "statsmodels",
    "pillow", "pywavelets", "jinja2", "pyyaml", "pydantic",
    "tqdm", "requests", "wordcloud", "networkx", "micropip",
])

import micropip
await micropip.install([
    "seaborn", "multimethod==1.12", "dacite", "filetype",
    "typeguard", "imagehash==4.3.2", "visions==0.7.6", "attrs",
    "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()

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.1.0.tar.gz (309.4 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.1.0-py2.py3-none-any.whl (395.3 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: fg_data_profiling_wasm-0.1.0.tar.gz
  • Upload date:
  • Size: 309.4 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.1.0.tar.gz
Algorithm Hash digest
SHA256 9e648d926c1a3aa5e2de95f04ac6ebe927b19cee93b2fc1710ebdeb6693ca38c
MD5 0739461d2797c17115fa417961f0225f
BLAKE2b-256 62ddc18f9b26f6907dc6aa2e16497e0957d452dd144a95483ecd9b7a1792fde4

See more details on using hashes here.

Provenance

The following attestation bundles were made for fg_data_profiling_wasm-0.1.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.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for fg_data_profiling_wasm-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c9a01a6086ff809a707881d1c27b3b9dd5a4759ba97ee1c6422dafaeadded83d
MD5 b9ed55c029f2eb2b0b8a74eb5b00cd35
BLAKE2b-256 c1eb7a25df792e8ed99ddfe2ec76bda5150980c8b6135279ab0a34a2d16c24ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for fg_data_profiling_wasm-0.1.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