removing imports.py and increasing coverage
This commit is contained in:
@@ -7,14 +7,13 @@ from rowers.utils import myqueue
|
||||
# (There is still some stuff defined directly in views.py. Need to
|
||||
# move that here.)
|
||||
|
||||
from rowers.imports import *
|
||||
import datetime
|
||||
from requests import Request, Session
|
||||
import rowers.mytypes as mytypes
|
||||
from rowers.mytypes import otwtypes
|
||||
from rowers.rower_rules import is_workout_user, ispromember
|
||||
from iso8601 import ParseError
|
||||
|
||||
import pandas as pd
|
||||
import numpy
|
||||
import json
|
||||
from scipy import optimize
|
||||
@@ -22,6 +21,7 @@ from json.decoder import JSONDecodeError
|
||||
|
||||
from pytz.exceptions import UnknownTimeZoneError
|
||||
from rowers.utils import dologging
|
||||
import numpy as np
|
||||
|
||||
from rowsandall_app.settings import (
|
||||
C2_CLIENT_ID, C2_REDIRECT_URI, C2_CLIENT_SECRET,
|
||||
@@ -83,6 +83,8 @@ def getagegrouprecord(age, sex='male', weightcategory='hwt',
|
||||
|
||||
p0 = [700, 120, 700, 10, 100, 100]
|
||||
|
||||
p1, success = optimize.leastsq(errfunc, p0[:],
|
||||
args=(ages, powers))
|
||||
try:
|
||||
p1, success = optimize.leastsq(errfunc, p0[:],
|
||||
args=(ages, powers))
|
||||
@@ -99,5 +101,6 @@ def getagegrouprecord(age, sex='male', weightcategory='hwt',
|
||||
else:
|
||||
power = 0
|
||||
|
||||
|
||||
return power
|
||||
|
||||
|
||||
Reference in New Issue
Block a user