Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

initial Dimension protocol #1

Merged
merged 5 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SCM syntax highlighting
pixi.lock linguist-language=YAML linguist-generated=true
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

# pixi environments
.pixi
*.egg-info
17 changes: 17 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[project]
authors = [{ name = "quantity-dev contributors" }]
dependencies = []
name = "dimension-api"
requires-python = ">= 3.12"
version = "0.0.1.dev0"

[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]

[tool.pixi.project]
channels = ["https://prefix.dev/conda-forge"]
platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"]

[tool.pixi.pypi-dependencies]
dimension_api = { path = ".", editable = true }
12 changes: 12 additions & 0 deletions src/dimension_api/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"""Dimension API."""

from typing import Final, Protocol, Self, runtime_checkable

__version__: Final = "0.0.1.dev0"
__all__ = ["__version__", "Dimension"]

@runtime_checkable
class Dimension(Protocol):
def __mul__(self, other: Self, /) -> Self: ...
def __truediv__(self, other: Self, /) -> Self: ...
def __pow__(self, other: int, /) -> Self: ...