Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finalise backend-agnosticity of Distributions #33

Open
wants to merge 42 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
38c9c18
Pull backend_agnostic class
willGraham01 Mar 20, 2025
61eb331
Pull backend_agnostic tests
willGraham01 Mar 20, 2025
59f6af3
Test positive and negative case
willGraham01 Mar 20, 2025
2e91b2a
Tidy docstrings and methods
willGraham01 Mar 20, 2025
d2f40d6
Pull signature conversions from branch
willGraham01 Mar 20, 2025
9b3728a
Pull tests for converting signatures
willGraham01 Mar 20, 2025
1958d98
Hide hidden variable import behind typehint
willGraham01 Mar 20, 2025
89d08ab
Tidy vargs and kwargs checker function
willGraham01 Mar 20, 2025
aa7d06f
Refactor _check tests
willGraham01 Mar 20, 2025
1fd75f0
Tidy convert_signature docstring
willGraham01 Mar 20, 2025
44a8504
Parameter naming and docstrings for _signature_can_be_cast
willGraham01 Mar 20, 2025
dc283cf
Refactor _signature_can_be_cast tests
willGraham01 Mar 20, 2025
1dddcc7
Use fixtures for convert_signature test
willGraham01 Mar 20, 2025
5b28001
remove outdated comment
willGraham01 Mar 20, 2025
20a6dc6
Merge branch 'wgraham/backend-agnostic-abc' into wgraham/backend-tran…
willGraham01 Mar 20, 2025
6aedfcd
Write identity map
willGraham01 Mar 20, 2025
2e4def5
convert_signature now returns a mapping
willGraham01 Mar 20, 2025
24e7e05
Hidden method for calling the backend
willGraham01 Mar 20, 2025
f2aba0b
Split Translation out just to compartmentalise
willGraham01 Mar 21, 2025
f68ee90
Tests for Translator itself
willGraham01 Mar 21, 2025
6a495a1
Cannot multiple inherit from two classes that both define __slots__
willGraham01 Mar 21, 2025
f7732a7
Rework Distribution to be backend-agnostic and use translators
willGraham01 Mar 21, 2025
a0ec6e1
Fix up distribution families, which now just point to backend-agnosti…
willGraham01 Mar 21, 2025
a93071b
Remove now-defunct translator
willGraham01 Mar 21, 2025
689b798
Fix some outdated docstrings
willGraham01 Mar 21, 2025
5c27b0b
No longer need to test a deleted file
willGraham01 Mar 21, 2025
a5d1988
Pull signature conversions from branch
willGraham01 Mar 20, 2025
9fe5f3d
Pull tests for converting signatures
willGraham01 Mar 20, 2025
5b2dbae
Hide hidden variable import behind typehint
willGraham01 Mar 20, 2025
efc9315
Tidy vargs and kwargs checker function
willGraham01 Mar 20, 2025
51eaa8b
Refactor _check tests
willGraham01 Mar 20, 2025
7a5d1b6
Tidy convert_signature docstring
willGraham01 Mar 20, 2025
5f62aba
Parameter naming and docstrings for _signature_can_be_cast
willGraham01 Mar 20, 2025
e4b99a8
Refactor _signature_can_be_cast tests
willGraham01 Mar 20, 2025
7df9988
Use fixtures for convert_signature test
willGraham01 Mar 20, 2025
775489f
remove outdated comment
willGraham01 Mar 20, 2025
a463a14
Ruff correcting ruff...
willGraham01 Mar 21, 2025
0972b3a
Merge branch 'wgraham/signature-converting' into wgraham/distribution…
willGraham01 Mar 21, 2025
7cd3806
Remove utils import that has now disappeared
willGraham01 Mar 21, 2025
e0d22b9
Apply suggestions from code review
willGraham01 Mar 24, 2025
89ead04
Merge branch 'main' into wgraham/fix-conflicts-with-30
willGraham01 Mar 24, 2025
61748b4
Merge branch 'main' into wgraham/distributions-are-backend-agnostic
willGraham01 Mar 24, 2025
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
Prev Previous commit
Next Next commit
Cannot multiple inherit from two classes that both define __slots__
willGraham01 committed Mar 21, 2025
commit 6a495a1994e7b2ee67f5014c9136fb95b194b942
1 change: 0 additions & 1 deletion src/causalprog/_abc/backend_agnostic.py
Original file line number Diff line number Diff line change
@@ -17,7 +17,6 @@ class BackendAgnostic(ABC, Generic[Backend]):
calls to the ``_backend_obj`` as necessary.
"""

__slots__ = ("_backend_obj",)
_backend_obj: Backend

def __getattr__(self, name: str) -> Any: # noqa: ANN401
1 change: 0 additions & 1 deletion src/causalprog/_abc/labelled.py
Original file line number Diff line number Diff line change
@@ -11,7 +11,6 @@ class Labelled(ABC):
``label`` property of the class.
"""

__slots__ = ("_label",)
_label: str

@property