-
Notifications
You must be signed in to change notification settings - Fork 18
Coverage low hanging - final #857
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
c_metadata = self.metadata.get(self.container_type, {}) | ||
if self.context.get('job_id') and c_metadata and not c_metadata.get('files', []): | ||
c_metadata = self.metadata.get(self.container_type, {}) # pragma: no cover | ||
if self.context.get('job_id') and c_metadata and not c_metadata.get('files', []): # pragma: no cover |
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.
Unfortunately we are still waiting on the classifier update I believe, as it was updated to use the classification
tag.
# Start coverage before local module loading so their def and imports are counted | ||
# http://coverage.readthedocs.io/en/coverage-4.2/faq.html | ||
if os.environ.get("SCITRAN_RUNTIME_COVERAGE") == "true": | ||
if os.environ.get("SCITRAN_RUNTIME_COVERAGE") == "true": # pragma: no cover - oh, the irony |
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.
😂😂😂😂
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.
LGTM but @kofalt should look over resolver tests to make sure I didn't miss anything.
if x['node_type'] == "file" and x.get('name') == criterion: | ||
return x, FileNode | ||
raise Exception('No ' + criterion + ' acquisition or file found.') | ||
raise Exception('No ' + criterion + ' file found.') |
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.
Nice find.
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.
LGTM
Closes #727 - declaring leftover coverage non-low-hanging
Closes #702 - perm handling got largely covered without explicit focus on the separate issue
Leftovers
Going forward - enforcement, CI integration
Ryan suggested adding no-cover to missed statements. My only addition is to add an extra tag to enable revisiting these in the future - eg.
#pragma no-cover 100%
Pros:
Con:
I've also considered the incremental approach (comparing to previous commit, or to master), but found way more cons:
The current coverage-miss, sorted by missed-lines-per-file (skipping completely covered ones):
api/dao/hierarchy.py
api/dao/containerstorage.py
api/handlers/listhandler.py
api/handlers/containerhandler.py
api/handlers/reporthandler.py
api/jobs/gears.py
api/auth/listauth.py
api/handlers/collectionshandler.py
api/jobs/queue.py
api/placer.py
api/dao/base.py
api/dao/containerutil.py
api/handlers/userhandler.py
api/web/base.py
api/jobs/rules.py
api/auth/containerauth.py
api/jobs/batch.py
api/handlers/refererhandler.py
api/tempdir.py
api/upload.py
api/handlers/dataexplorerhandler.py
api/auth/groupauth.py
api/config.py
api/handlers/grouphandler.py
api/auth/userauth.py
api/dao/liststorage.py
api/download.py
api/web/start.py
api/jobs/jobs.py
api/validators.py
api/dao/consistencychecker.py
api/auth/authproviders.py
api/dao/dbutil.py
api/jobs/handlers.py
api/util.py
api/auth/__init__.py
api/dao/__init__.py
api/files.py
api/handlers/devicehandler.py
api/web/encoder.py
Review Checklist