rmdmattingly / RowlogAnalysis

MIT License
5 stars 0 forks source link

Side meters #9

Closed Logar18 closed 4 years ago

Logar18 commented 4 years ago

Code with theoretical implementation of people's sides.

taddyb commented 4 years ago

@Logar18 Is this code tested?

rmdmattingly commented 4 years ago

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)

Logar18 commented 4 years ago

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 .

rmdmattingly commented 4 years ago

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

taddyb commented 4 years ago

^ 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

Logar18 commented 4 years ago

@taddyb @rmdmattingly pushed changes for this one

rmdmattingly commented 4 years ago

@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

Logar18 commented 4 years ago

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

rmdmattingly commented 4 years ago

You might need to install the requests module. Try running python -m pip install requests

Logar18 commented 4 years ago

@rmdmattingly check last commit.