Closed mehaase closed 2 years ago
Merging #178 (5e07e7d) into main (7d5e334) will increase coverage by
0.07%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #178 +/- ##
==========================================
+ Coverage 95.68% 95.76% +0.07%
==========================================
Files 9 9
Lines 858 874 +16
==========================================
+ Hits 821 837 +16
Misses 37 37
Impacted Files | Coverage Δ | |
---|---|---|
src/tram/urls.py | 100.00% <100.00%> (ø) |
|
src/tram/views.py | 95.48% <100.00%> (+0.48%) |
:arrow_up: |
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 0fabc1a...5e07e7d. Read the comment docs.
@mehaase Are there any plans to have test coverage on the new view?
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
Added tests for the new view.
Add an API route to trigger training of a model. This runs synchronously and the current implementation is a stop gap until a point in time where we could have training run asynchronously (e.g. background workers reading a message queue).
Adapted from @bsnyder70's PR #129. Unlike the PR, this implementation does not have a GUI component because the synchronous aspect of the API call would lead to high latency in the GUI (e.g. click the button and it freezes for 10-15 seconds while it trains the model). For now training can only be triggered from an API call (or from the command line, which has not changed in this PR).
TRAM doesn't really have an API authentication scheme. The "API" routes use the cookie-based authentication and the Django views require CSRF tokens, which is inconvenient for API calls. So this PR also adds JWT tokens (described in the README) so that API calls can be made with a bearer token and no CSRF token. This is still backwards compatible with session/CSRF auth, so it shouldn't break any existing API clients out there.