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

Commit 0978322

Browse files
committed
feature: Remove non-working doctests
Signed-off-by: John Andersen <[email protected]>
1 parent 8e3171a commit 0978322

File tree

2 files changed

+0
-43
lines changed

2 files changed

+0
-43
lines changed

dffml/feature/__init__.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1 @@
1-
# SPDX-License-Identifier: MIT
2-
# Copyright (c) 2019 Intel Corporation
3-
"""
4-
All features registered to the dffml.feature entry point using setuptools are
5-
derived from the Feature class. To add a feature, create a module which has a
6-
setup.py which specifies where to find your Feature subclass within your module.
7-
8-
>>> setup(
9-
>>> name='myfeatures',
10-
...
11-
>>> entry_points={
12-
>>> 'dffml.feature': [
13-
>>> 'numfiles = myfeatures:NumFilesFeature',
14-
>>> ],
15-
>>> },
16-
>>> )
17-
"""
181
from .feature import Data, Feature, Features, LoggingDict, DefFeature

dffml/feature/feature.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -112,32 +112,6 @@ class and implement the fetch, parse, and calc methods. These methods are
112112
Once the appropriate data is fetched the parse method is responsible for
113113
storing the parts of that data which will be used to calculate in the
114114
subclass
115-
116-
>>> self.__example_parsed_value_name = example_value
117-
118-
The calc method then uses variables set in parse to output an integer value.
119-
120-
>>> def calc(self):
121-
>>> return self.__example_parsed_value_name
122-
123-
Full example of a feature implementation:
124-
125-
>>> import glob
126-
>>> from dffml.feature import Feature
127-
>>>
128-
>>> class NumFilesFeature(Feature):
129-
>>>
130-
>>> @abc.abstractmethod
131-
>>> def fetch(self, data):
132-
>>> self._downloader.vcs(self._key, self.tempdir('src'))
133-
>>>
134-
>>> @abc.abstractmethod
135-
>>> def parse(self, data):
136-
>>> self.__num_files = glob.glob(self.tempdir(), recursive=True)
137-
>>>
138-
>>> @abc.abstractmethod
139-
>>> def calc(self, data):
140-
>>> return self.__num_files
141115
"""
142116

143117
LOGGER = LOGGER.getChild("Feature")

0 commit comments

Comments
 (0)