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

Psth use intervals #200

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

Psth use intervals #200

wants to merge 18 commits into from

Conversation

bendichter
Copy link
Collaborator

@bendichter bendichter commented Jan 21, 2022

More intelligently handle intervals for widgets that take them:

  • If a string is given, look up that table in nwb.intervals
  • If a TimeIntervals object is given, use that
  • If a Dropdown is given, use that as a selector
  • If there is no input for intervals, look at nwb.intervals
    • if nwb.intervals has 0 entries, render a placeholder
    • if nwb.intervals has 1 entry, use it
    • If nwb.intervals has more than one entry, create a dropdown

I'd like to hone this for PSTHWidgets and then factor it out so this logic can be used for any widget that uses intervals

# Conflicts:
#	test/test_controllers.py
* correct base where units was used accidentally instead of the generic input_data
* add route_psth, which decides between a standard PSTHWidget and a PSTHWidget inside a TimeIntervalsSelector wrapper
* change view to use new routing function
@codecov
Copy link

codecov bot commented Jan 22, 2022

Codecov Report

Merging #200 (8925e07) into master (b2fee99) will increase coverage by 0.14%.
The diff coverage is 76.08%.

❗ Current head 8925e07 differs from pull request most recent head 61fafe5. Consider uploading reports for the commit 61fafe5 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #200      +/-   ##
==========================================
+ Coverage   67.72%   67.87%   +0.14%     
==========================================
  Files          32       32              
  Lines        2947     2976      +29     
==========================================
+ Hits         1996     2020      +24     
- Misses        951      956       +5     
Flag Coverage Δ
unittests 67.87% <76.08%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
nwbwidgets/allen.py 0.00% <ø> (ø)
nwbwidgets/utils/units.py 90.47% <ø> (ø)
nwbwidgets/base.py 71.77% <50.00%> (ø)
nwbwidgets/misc.py 71.40% <77.27%> (+0.21%) ⬆️

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 b2fee99...61fafe5. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant