-
Notifications
You must be signed in to change notification settings - Fork 18
Usage report updated for analyses as collections #930
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #930 +/- ##
=========================================
+ Coverage 90.19% 90.2% +<.01%
=========================================
Files 48 48
Lines 6418 6410 -8
=========================================
- Hits 5789 5782 -7
+ Misses 629 628 -1
Continue to review full report at Codecov.
|
|
||
# Grab acquisitions and their ids | ||
acquisitions = config.db.acquisitions.find({'session': {'$in': session_ids}}, {'_id': 1, 'analyses':1}) | ||
acquisition_ids = [a['_id'] for a in acquisitions] |
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.
You can remove the projection for analyses above.
|
||
ids = session_ids + acquisition_ids + [p['_id']] | ||
analysis_ids = [an['_id'] for an in config.db.analyses.find({'parent.id': {'$in': ids}})] | ||
|
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.
Below there is more logic that would have to change now that analyses are in a separate collection.
Nice catch! I also noticed there is a problem with how we are calculating analysis files - we would only want to calculated "output" files. There is a way to conditionally project in an aggregation pipeline so you can set the size of input files as 0 and output files as expected before the sum step to fix this problem. |
9e2390c
to
1e63c37
Compare
Final changes look good, feel free to merge 👍 |
Fixes #915
Review Checklist