Skip to content

feat(Init): Initial upload of array + interoperability package#1

Open
Simpag wants to merge 10 commits into
team-decent:mainfrom
Simpag:dev1
Open

feat(Init): Initial upload of array + interoperability package#1
Simpag wants to merge 10 commits into
team-decent:mainfrom
Simpag:dev1

Conversation

@Simpag
Copy link
Copy Markdown
Collaborator

@Simpag Simpag commented May 10, 2026

Initial upload of array + interoperability modules, including tests, docs, type-checking and compilation. Better docs and a README is needed.

Copilot AI review requested due to automatic review settings May 10, 2026 18:22
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Initial import of the decent_array package, providing an Array wrapper and a single-active-backend interoperability layer with NumPy/PyTorch/JAX/TensorFlow backends, plus CI, docs, benchmarks, and a comprehensive pytest suite.

Changes:

  • Added backend manager + abstract backend contract, plus concrete backends (NumPy/PyTorch/JAX/TensorFlow) and module-level iop functions/RNG coordination.
  • Added Array wrapper implementing operators, indexing, and common properties via the active backend.
  • Added tox/CI/Sphinx/ReadTheDocs scaffolding, benchmarks, and extensive tests.

Reviewed changes

Copilot reviewed 49 out of 52 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
tests/test_iop_rng.py Tests for RNG seeding, snapshot/restore, and distribution helpers.
tests/test_iop_functions.py Tests for module-level interoperability functions (creation, math, linalg, indexing).
tests/test_decorators.py Tests for the cost-method autodecorator argument unwrapping/rewrapping behavior.
tests/test_backend_manager.py Tests backend activation, registration, listener behavior, and reset semantics.
tests/test_array.py Tests Array operators/dunders, indexing, coercion, and properties across backends.
tests/conftest.py Parametrized backend/device fixture with skip logic for unavailable combinations.
readthedocs.yaml Read the Docs build configuration.
pyproject.toml Project metadata, dependencies/extras, tox envs, ruff/mypy/pytest config, mypyc build hook.
LICENSE Adds AGPL-3.0 license text.
docs/sphinx_theme.txt Sphinx theme requirements list.
docs/source/user.rst Initial user guide stub + installation snippet.
docs/source/index.rst Sphinx landing page and toctree.
docs/source/developer.rst Developer guide covering tox workflows, mypyc usage, and contribution process.
docs/source/conf.py Sphinx configuration (theme, intersphinx, missing-reference fixups, sidebar config).
docs/source/background.rst Background page stub.
docs/source/author.rst Contributors page.
docs/source/api/decent_array.types.rst API stub for decent_array.types.
docs/source/api/decent_array.rst API toctree root.
docs/source/api/decent_array.interoperability.rst API stub for decent_array.interoperability.
docs/source/api/decent_array.array.rst API stub for decent_array (exports Array).
docs/source/_templates/package.rst.jinja Custom sphinx-apidoc package template.
docs/source/_templates/module.rst.jinja Custom sphinx-apidoc module template.
docs/source/_static/custom.css Small theme CSS tweak for logo sizing.
docs/Makefile Sphinx Makefile (unix).
docs/make.bat Sphinx make script (windows).
decent_array/types.py Shared type aliases + supported framework/device enums.
decent_array/interoperability/_tensorflow/tensorflow_backend.py TensorFlow backend implementation + registration side-effect.
decent_array/interoperability/_tensorflow/init.py TensorFlow backend package initializer/export.
decent_array/interoperability/_pytorch/pytorch_backend.py PyTorch backend implementation + registration side-effect.
decent_array/interoperability/_pytorch/init.py PyTorch backend package initializer/export.
decent_array/interoperability/_numpy/numpy_backend.py NumPy backend implementation + registration side-effect.
decent_array/interoperability/_numpy/init.py NumPy backend package initializer/export.
decent_array/interoperability/_jax/jax_backend.py JAX backend implementation + registration side-effect.
decent_array/interoperability/_jax/init.py JAX backend package initializer/export.
decent_array/interoperability/_iop/rng.py Cross-backend RNG coordination (python random, numpy, backend) + distributions.
decent_array/interoperability/_iop/functions.py Module-level iop function surface delegating to the active backend.
decent_array/interoperability/_iop/init.py iop package marker/init (empty).
decent_array/interoperability/_decorators.py Decorator to unwrap Array args for backend-native cost-method implementations.
decent_array/interoperability/_backend_manager.py Backend registry/activation/reset + auto-import and listener mechanism.
decent_array/interoperability/_abstracts/backend.py Abstract Backend API contract (creation/manipulation/linalg/math/RNG).
decent_array/interoperability/_abstracts/init.py Abstracts package export (Backend).
decent_array/interoperability/init.py Public interoperability API exports (functions + RNG helpers + decorator).
decent_array/_array.py Array wrapper implementation (operators, indexing, properties) tied to active backend.
decent_array/init.py Package exports (Array, interoperability, types).
benchmarks/profile_hotpath.py cProfile-based hot-path profiler for wrapper vs function dispatch.
benchmarks/bench_iop.py Microbenchmark for iop function-call overhead vs native frameworks.
benchmarks/bench_common.py Shared benchmark helpers (backend discovery/activation + timing utilities).
benchmarks/bench_array.py Microbenchmark for Array operator overhead vs native frameworks.
.gitignore Python/build/dev artifact ignores.
.github/workflows/ci.yaml CI pipeline running tox envs (mypy/pytest/ruff/sphinx/mypyc) on Py3.13 across OSes.
.github/CODEOWNERS Sets default code owners for the repo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread benchmarks/bench_common.py Outdated
Comment thread benchmarks/bench_common.py Outdated
Comment thread benchmarks/bench_iop.py Outdated
Comment thread decent_array/interoperability/_iop/functions.py Outdated
Comment thread decent_array/interoperability/_backend_manager.py Outdated
Comment thread docs/source/author.rst Outdated
Comment thread tests/test_iop_rng.py
Comment thread pyproject.toml
Comment on lines +1 to +16
[project]
name = "decent-array"
version = "0.1.0"
authors = [{name = "Elias Ram"}, {name = "Simon Granström"}, {name = "Adriana Rodriguez"}, {name = "Nicola Bastianello"}]
maintainers = [{name = "Team Decent"}]
description = "A library of array operations and linear algebra primitives for interoperability across ML frameworks."
readme = "README.md"
requires-python = ">=3.13"
classifiers = [
"Programming Language :: Python :: 3.13",
"Operating System :: OS Independent",
]
license = "AGPL-3.0-only"
dependencies = [
"numpy",
]
Comment thread docs/source/developer.rst
Comment thread decent_array/_array.py Outdated
@Simpag
Copy link
Copy Markdown
Collaborator Author

Simpag commented May 10, 2026

I will try to remember to upload benchmark results tomorrow evening

@Simpag Simpag requested a review from nicola-bastianello May 10, 2026 21:33
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.

2 participants