Skip to content
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

GH 1357: Project caches should not accept arbitrary kwargs #1373

Merged
merged 2 commits into from
Mar 13, 2020

Conversation

kschelonka
Copy link
Contributor

@kschelonka kschelonka commented Feb 20, 2020

Accepting arbitrary kwargs led to confusion for scientists
accidentally passing incorrect keywords. This PR removes
the ability to pass arbitrary kwargs to public Project cache
constructors, to reduce the possibility of silent errors.

In addition to unit-testing I ran quick notebook examples with all the different constructors (fixed, warehouse, lims, etc.). In doing so I noticed a typo in the keyword-argument of the ecephys example, and a failure in the behavior project cache notebook due to an oversight about which ID is used.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

You'll be able to see Jupyter notebook diff and discuss changes. Powered by ReviewNB.

@codecov-io
Copy link

codecov-io commented Feb 20, 2020

Codecov Report

Merging #1373 into rc/1.5.0 will increase coverage by 0.01%.
The diff coverage is 64.28%.

Impacted file tree graph

@@             Coverage Diff              @@
##           rc/1.5.0    #1373      +/-   ##
============================================
+ Coverage     34.53%   34.54%   +0.01%     
============================================
  Files           342      342              
  Lines         33231    33262      +31     
============================================
+ Hits          11475    11492      +17     
- Misses        21756    21770      +14
Impacted Files Coverage Δ
...ain_observatory/behavior/behavior_project_cache.py 88.09% <58.33%> (-2.89%) ⬇️
...brain_observatory/ecephys/ecephys_project_cache.py 84.08% <68.75%> (-1.16%) ⬇️
allensdk/internal/api/behavior_ophys_api.py 28.71% <0%> (-1.18%) ⬇️
allensdk/internal/api/behavior_data_lims_api.py 54.38% <0%> (+0.53%) ⬆️
allensdk/config/manifest.py 70.55% <0%> (+0.61%) ⬆️
...lensdk/brain_observatory/behavior/sync/__init__.py 25.86% <0%> (+14.32%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5056007...ffea826. Read the comment docs.

@kschelonka kschelonka force-pushed the GH-1347/cache-kwarg-fix branch 3 times, most recently from 95516df to ffea826 Compare February 20, 2020 20:29
@wbwakeman wbwakeman added the braintv relates to Insitute BrainTV program label Feb 25, 2020
Copy link
Contributor

@njmei njmei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me.

Accepting arbitrary kwargs led to confusion for scientists
accidentally passing incorrect keywords. This PR removes
the ability to pass arbitrary kwargs to public Project cache
constructors, to reduce the possibility of silent errors.
@kschelonka kschelonka force-pushed the GH-1347/cache-kwarg-fix branch from ffea826 to 4350828 Compare March 13, 2020 16:48
@kschelonka kschelonka changed the base branch from rc/1.5.0 to rc/1.6.0 March 13, 2020 16:48
@kschelonka kschelonka merged commit 57b67b2 into rc/1.6.0 Mar 13, 2020
@kschelonka kschelonka deleted the GH-1347/cache-kwarg-fix branch March 13, 2020 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
braintv relates to Insitute BrainTV program
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants