Skip to content

feat: add mat-vis-client Python package - #50

Merged
gerchowl merged 22 commits into
devfrom
feature/36-mat-vis-client-package
Apr 17, 2026
Merged

gerchowl merged 22 commits into
devfrom
feature/36-mat-vis-client-package

Conversation

@gerchowl

Copy link
Copy Markdown
Contributor

Summary

Restructure the Python reference client as an installable package
(pip install mat-vis-client), enabling py-mat to import it
instead of vendoring.

Changes

  • clients/python/src/mat_vis_client/ — proper package layout
    • __init__.py — module-level API (search, fetch, prefetch,
      rowmap_entry, get_manifest, seed_indexes)
    • client.py — MatVisClient class (from mat_vis_client.py)
    • adapters.py — to_threejs, to_gltf, export_mtlx (generic)
  • clients/python/pyproject.toml — hatchling, zero deps
  • clients/python/tests/test_client.py — 49 tests, all passing
  • Fix: rowmap_entry() reads parquet_file from per-channel
    data (works with merged partitioned rowmaps)

Test plan

  • PYTHONPATH=clients/python/src pytest clients/python/tests/ -v — 49 passed
  • python -c "from mat_vis_client import search, fetch, to_threejs" — imports OK
  • CI passes
  • py-mat can import and use (PR 2 on mat repo, depends on this)

Refs: #36, #3

gerchowl and others added 22 commits April 17, 2026 09:27
Polyhaven API nesting fix + bake git commit fix.
Split git add, polyhaven categories list fix.
)

## Summary
- 4 reference clients (Python, JS, Rust, Shell) with tests
- Dagger test infrastructure for all client languages
- Python client: search, prefetch, adapters (to_threejs, to_gltf,
export_mtlx)
- 49 Python tests (39 mocked + 10 live)
- Parallel downloads: 10× ambientcg, 8× polyhaven
- Bake workflow fixes: git push permissions, artifact upload, index JSON
to release
- Pre-release data flow + promote-data-release workflow
Manifest rebuilds from release assets. GPUOpen trailing slash + field
names. Parallel bake/pack. Perf summary.
… CI (#42)

Fixes #40 + #41. Client merges partitioned rowmaps. Parquet auto-splits
at 1.8GB. Client tests in CI.
7 commits: sub-1k tiers (128/256/512), derive command,
catalog+thumbnails, client rowmap merging, weekly watch.
- Containerfile: COPY gh from ghcr.io/cli/cli:latest (no apt-get per batch)
- Dagger _baker_container: FROM ghcr.io/morepet/mat-vis-baker:latest
- Instant batch container startup instead of 2-3 min gh install
Restructure the Python reference client as an installable package:

  pip install clients/python/  (or PyPI: pip install mat-vis-client)

Package: clients/python/src/mat_vis_client/
  __init__.py  — module-level API (search, fetch, prefetch, etc.)
  client.py    — MatVisClient class
  adapters.py  — to_threejs, to_gltf, export_mtlx (generic)

- Module-level convenience functions ported from py-mat's _client.py
- seed_indexes() exposed as public helper
- Fix: rowmap_entry() reads parquet_file from per-channel data
- Old mat_vis_client.py → mat_vis_client_standalone.py
- 49 tests passing

Zero deps. Pure Python. ~750 lines.

Refs: #36, #3
@gerchowl
gerchowl merged commit 924c93f into dev Apr 17, 2026
6 of 8 checks passed
gerchowl added a commit that referenced this pull request Apr 17, 2026
PR #50 client package + accumulated fixes.
gerchowl added a commit that referenced this pull request May 15, 2026
Package structure verified, 49 tests pass, imports OK.
gerchowl added a commit that referenced this pull request May 15, 2026
PR #50 client package + accumulated fixes.
@gerchowl
gerchowl deleted the feature/36-mat-vis-client-package branch July 1, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant