-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
29 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
from frictionless import Resource | ||
from frictionless.resources import TableResource | ||
|
||
from skeem.settings import PEEK_LINES | ||
|
||
|
||
class ResourcePlus(Resource): | ||
class TableSampleResource(TableResource): | ||
""" | ||
Override sample size for frictionless `Resource` instances. | ||
""" | ||
|
||
def __init__(self, *args, **kwargs): | ||
from frictionless import Detector | ||
def __attrs_post_init__(self): | ||
if self.detector is None: | ||
from frictionless import Detector | ||
|
||
if "detector" not in kwargs: | ||
kwargs["detector"] = Detector(sample_size=PEEK_LINES) | ||
super().__init__(*args, **kwargs) | ||
self.detector = Detector(sample_size=PEEK_LINES) | ||
super().__attrs_post_init__() |