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

Client-side specimen ID matching #585

Merged
merged 46 commits into from
Sep 12, 2019
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
be1233f
ENH: Expose limit in StudySamplesHandler #520 #553
fedarko Aug 21, 2019
e00fcd0
MAINT: add get_active_samples(); abstract code
fedarko Aug 22, 2019
b69f649
Merge branch 'master' of https://github.com/jdereus/LabControl
fedarko Aug 22, 2019
f7fce69
Merge branch 'master' of https://github.com/jdereus/LabControl
fedarko Aug 23, 2019
129e30b
Merge branch 'master' of https://github.com/jdereus/LabControl
fedarko Aug 26, 2019
0421acb
ENH: Prototype impl. of multi-select #520 #553
fedarko Aug 27, 2019
1920405
MAINT: remove now-unneeded variable declaration
fedarko Aug 27, 2019
1f38eb4
MAINT: Apply auto-matching regardless of ms c.box
fedarko Aug 28, 2019
00b4abd
Merge branch 'master' of https://github.com/jdereus/LabControl
fedarko Aug 28, 2019
28e979c
MAINT: pass active study ID to patchWell
fedarko Aug 29, 2019
08226b5
Merge branch 'master' of https://github.com/jdereus/LabControl
fedarko Aug 29, 2019
d81253d
DOC: Add comments re: multi-matching details
fedarko Aug 30, 2019
967297e
ENH: show yellow box on indet. wells *initially*
fedarko Aug 30, 2019
cf36c66
DOC: Add TODO comment re: patchWell efficiency
fedarko Aug 30, 2019
948dd19
DOC: add comment re: a formerly-missing return val
fedarko Aug 30, 2019
0f3d2da
HACK: Document how the indet. color is temporary
fedarko Aug 30, 2019
9a5eefc
MAINT: Split getSubstringMatches into lc.js & test
fedarko Aug 30, 2019
c5de9aa
MAINT: remove old console.log statements
fedarko Aug 30, 2019
77cb5a6
MAINT: Add onRejected funcs throughout plateViewer
fedarko Sep 6, 2019
ed55343
MAINT: show responseText when applicable in alerts
fedarko Sep 6, 2019
2c37399
TST: Fix test_get_study_samples_handler re changes
fedarko Sep 6, 2019
26f82db
TST: Add missing response code check in a test
fedarko Sep 7, 2019
bea54e0
TST: Explicitly test & improve study samples limit
fedarko Sep 7, 2019
ea536f3
TST: Fix error in exp output + beef up test cases
fedarko Sep 7, 2019
b8e433b
DOC: Add Travis badge to README [ci skip]
fedarko Sep 7, 2019
f70a0ba
DOC: whoops, add a linebreak after Travis badge
fedarko Sep 7, 2019
75e0978
DOC: Add Coveralls badge to README
fedarko Sep 7, 2019
10ef1ef
BUG: Remove labcontrol/gui/test* from coverage
fedarko Sep 8, 2019
4014bad
STY: Change return signature to "explicit tuple"
fedarko Sep 10, 2019
1b558b4
MAINT: Don't explicitly check limit in a handler
fedarko Sep 10, 2019
289fcd4
DOC: updates -> update
fedarko Sep 10, 2019
1037e17
DOC: Fix error in patchWell studyID description
fedarko Sep 10, 2019
4b9752a
BUG: remove duplicate hidden IDs in plate template
fedarko Sep 10, 2019
cf3a841
MAINT: Make study limit-checking more pythonic
fedarko Sep 10, 2019
f7b6d06
TST: test negative float limit case from handler
fedarko Sep 10, 2019
661c8cc
BUG/TST: catch TypeError on int(limit)
fedarko Sep 11, 2019
f313223
DOC: Fix description of getSubstringMatches return
fedarko Sep 11, 2019
ad932ee
DOC: Remove comment that is superseded by #591
fedarko Sep 11, 2019
fb58786
DOC: Improve plateViewer docs/error messages
fedarko Sep 11, 2019
5e68a0d
DOC: Copy a comment to where code has been copied
fedarko Sep 11, 2019
7e4db61
DOC: possiblyNewContent -> possiblyMatchedContent
fedarko Sep 11, 2019
3fab6ed
DOC: add reference from comment to #592
fedarko Sep 11, 2019
827ac67
DOC: Update modifyWell() docs re reviewer comments
fedarko Sep 11, 2019
97f020d
TST: For consistency, propEqual -> deepEqual
fedarko Sep 11, 2019
9403705
MAINT: More general error-handling of int(limit)
fedarko Sep 11, 2019
c0db25b
TST: for completeness' sake, test str(<= 0) limits
fedarko Sep 11, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
MAINT: More general error-handling of int(limit)
Addresses comment in #585
fedarko committed Sep 11, 2019
commit 9403705052e5c08342d9a83a0472e38a9c27c74d
6 changes: 4 additions & 2 deletions labcontrol/db/study.py
Original file line number Diff line number Diff line change
@@ -233,11 +233,13 @@ def samples(self, term=None, limit=None):
# that the integer limit is greater than zero
try:
limit = int(limit)
except (ValueError, OverflowError, TypeError):
# Examples of why we catch these particular exceptions:
except Exception:
# Examples of possible exceptions due to int(limit) failing:
# - ValueError is most "common," occurs with int("abc")
# - OverflowError occurs with int(float("inf"))
# - TypeError occurs with int([1,2,3])
# This should catch all of the above and any other exceptions
# raised due to int(limit) failing.
raise ValueError("limit must be castable to an int")
if limit <= 0:
raise ValueError("limit must be greater than zero")