-
Notifications
You must be signed in to change notification settings - Fork 477
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
Move downloads config and add extra options #1702
Conversation
1a3ff14
to
d92f1c4
Compare
@@ -69,7 +69,7 @@ def pickle_decode(b: bytes, info: t.Optional[t.Dict] = None) -> t.Any: | |||
|
|||
|
|||
def dill_encode(object: t.Any, info: t.Optional[t.Dict] = None) -> bytes: | |||
return dill.dumps(object) | |||
return dill.dumps(object, recurse=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important so that saving from jupyter
works.
@@ -177,7 +177,10 @@ def build_datalayer(cfg=None, databackend=None, **kwargs) -> Datalayer: | |||
|
|||
# Update configuration with keyword arguments. | |||
for k, v in kwargs.items(): | |||
cfg.force_set(k, v) | |||
if '__' in k: | |||
getattr(cfg, k.split('__')[0]).force_set(k.split('__')[1], v) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allows developers to set deeper parameters.
@dc.dataclass | ||
class Downloads(BaseConfigJSONable): | ||
folder: t.Optional[str] = None | ||
n_workers: int = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set these parameters here not in some collection somewhere.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1702 +/- ##
==========================================
- Coverage 80.33% 78.89% -1.45%
==========================================
Files 95 122 +27
Lines 6602 8736 +2134
==========================================
+ Hits 5304 6892 +1588
- Misses 1298 1844 +546 ☔ View full report in Codecov by Sentry. |
Description
Related Issues
Checklist
make unit-testing
andmake integration-testing
successfully?Additional Notes or Comments