Closed Logar18 closed 4 years ago
@Logar18 Is this code tested?
To stick with convention the service file should be capitalized TotalMetersPerSide.py
, but the parameter passed to call the service in main.py
should be totalMetersPerSide
. (so the key value in the service switch dictionary should be camel case)
I'm not sure how to test it
On Fri, Dec 6, 2019, 2:19 PM Tadd Bindas notifications@github.com wrote:
@Logar18 https://github.com/Logar18
- Is this code tested?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rmdmattingly/RowlogAnalysis/pull/9?email_source=notifications&email_token=AKG4V5UAZ4RWEMR7QHIFUUDQXKPDZA5CNFSM4JW6SOQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGFBUKQ#issuecomment-562698794, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKG4V5XT2QVTDIL6WWLCP33QXKPDZANCNFSM4JW6SOQQ .
Yeah, to test it you need to write the necessary code to handle a metersBySide service and then run the main.py
file with the argument metersBySide
.
You'll need to make a function which imports your service and runs it, and then you'll need to make an addition to the serviceSwitch
(all in main.py
). If you're struggling with this then I can set this one up for you as an example for the future
^ This may be a good thing to document in the wiki section once we build this thing out for anyone new in the future joining the project
@taddyb @rmdmattingly pushed changes for this one
@Logar18 you had a good start on setting up the main.py
overhead to contain the TotalMetersPerSide
service with just a few things to improve, if you look at https://github.com/rmdmattingly/RowlogAnalysis/pull/9/commits/3ad95efe1ce2c4973bfaf18d03a517966f23e65e you'll see the changes that I made to get it functional.
You should now be able to test your service by running python main.py totalMetersPerSide
in the RowlogAnalysis
folder. I tested it and got an error, so there's definitely a little bit of debugging to do in your code and those previous comments to address regarding getting side data correctly
Ok I can get a better picture of what's going on now. Also did some testing and Got hit with this:
$ python main.py totalMetersPerSide
Traceback (most recent call last):
File "main.py", line 58, in <module>
output = serviceSwitch(parseInput())
File "main.py", line 56, in serviceSwitch
return service(arguments)
File "main.py", line 40, in totalMetersPerSide
from Data.RowlogApi import getWorkoutData
File "C:\Users\lfarm\OneDrive\Documents\GitHub\project-farmer-laibach\RowlogAnalysis\Data\RowlogApi.py", line 1, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
Any thoughts? @rmdmattingly @taddyb
You might need to install the requests module. Try running
python -m pip install requests
@rmdmattingly check last commit.
Code with theoretical implementation of people's sides.