Skip to content
This repository was archived by the owner on Aug 25, 2024. It is now read-only.

Commit d67bd2c

Browse files
raghav-ysJohn Andersen
authored andcommitted
source: source.py: Add base_entry_point decorator
Fixes: #223
1 parent 86e4a0f commit d67bd2c

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8585
- Strict flag in df.memory is now on by default
8686
- Dynamically created scikit models get config args correctly
8787
- Renamed `DNNClassifierModelContext` first init arg from `config` to `features`
88+
- BaseSource now has `base_entry_point` decoration
8889
### Removed
8990
- Repo objects are no longer classification specific. Their `classify`,
9091
`classified`, and `classification` methods were removed.

dffml/source/source.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
AsyncContextManagerListContext,
1919
AsyncContextManagerList,
2020
)
21-
from ..util.entrypoint import Entrypoint
21+
from ..util.entrypoint import Entrypoint, base_entry_point
2222

2323
from .log import LOGGER
2424

@@ -48,15 +48,13 @@ async def repo(self, src_url: str):
4848
"""
4949

5050

51+
@base_entry_point("dffml.source", "source")
5152
class BaseSource(BaseDataFlowFacilitatorObject):
5253
"""
5354
Abstract base class for all sources. New sources must be derived from this
5455
class and implement the repos method.
5556
"""
5657

57-
ENTRY_POINT = "dffml.source"
58-
ENTRY_POINT_NAME = ["source"]
59-
6058
def __call__(self) -> BaseSourceContext:
6159
return self.CONTEXT(self)
6260

0 commit comments

Comments
 (0)