-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
BaseExperiment uses @abstractmethod decorators but does not inherit from ABC,
so Python does not enforce abstract methods. This allows instantiating incomplete
experiment subclasses without errors, which can lead to runtime failures later.
Steps to Reproduce
- Define a subclass of
BaseExperimentwithout implementing abstract methods. - Instantiate the subclass.
Expected Behavior
Instantiation should fail with a TypeError until all abstract methods are implemented.
Actual Behavior
Instantiation succeeds because BaseExperiment does not inherit from ABC.
Environment
- CausalPy version: 0.7.0 (or current main)
- Python version: 3.11+
- OS: macOS (darwin)
Proposed Solution (if known)
Make BaseExperiment inherit from abc.ABC to enforce abstract methods.
Additional Context
Relevant file: causalpy/experiments/base.py.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working