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 defaults + 0002 pandas3 compat (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

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.1.tar.gz (311.6 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.1-py2.py3-none-any.whl (396.6 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: fg_data_profiling_wasm-0.1.1.tar.gz
  • Upload date:
  • Size: 311.6 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.1.tar.gz
Algorithm Hash digest
SHA256 6023b1a7104cfdee6f31ba1eafeca1c14033664aa3a8650b3a66490bb59148aa
MD5 34cae65a45603395b6de09be9a72c1aa
BLAKE2b-256 46b62ea4b27f8b72311ef787fb0135d228eaaa182cc69739f3236a1c95f10965

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fg_data_profiling_wasm-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0c292929ade9677c33040462ceca4c0fddf09088dea1a5430b3a5cd86838d81b
MD5 af6cf7d48c728ef9df68f880911f0bd9
BLAKE2b-256 c475e520167cdd933285f3981af394c332171f11f9b3e124cd8cee5b1860ccdf

See more details on using hashes here.

Provenance

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