Closed josuebrunel closed 9 years ago
@josuebrunel I'm happy to help out. I just tried running a test case and got an error... I'm not sure if it's something in the code or I'm not running the test case correctly (it's likely me). Here's what I've done so far:
1) In the GitHub application installed on my computer I cloned your yahoo-fantasy-sport repo to the folder yahoo-fantasy-sport, which is in a folder on my hard drive called pyth
2) In the yahoo-fantasy-sport folder I added a document called 'oauth.json'with my consumer secret and key
3) I changed my working directory in terminal to be the yahoo-fantasy-sport folder
4) In the terminal window I typed in: ./run_tests.sh TestFantasySports test_get_game_info
The error message I got back was:
Let me know if this was correct, your thoughts.
Thanks,
@unpairestgood, first of all thank you. My bad, I forgot to tell you to use a virtual environment. The good thing is that from what i can see from your screenshot you use a Mac :smile: I hope you use macport too
sudo port install git # if not already installed
sudo port install py27-pip # if not already installed
sudo port install py27-virtualenv # if not already installed
$ git clone https://github.com/josuebrunel/yahoo-fantasy-sport
$ cd yahoo-fantasy-sport
$ git checkout development # changes the branch you're working on
$ virtualenv env # create the virtualenv
$ source env/bin/activate # active the virtualenv
(env)$ pip install -r requirements.txt # install package in the requirements.txt file in the virtual env
(env)$ ./run_tests.sh
It is highly recommended to use virtualenvs when you develop in Python. It helps you install libraries and test or use them without messing with your real environment.
@josuebrunel I followed the steps you outlined above (thank you, they were very clear and I have a better idea of how to use venv's now) and ran the code again. Once again there was an error, which is one I remember seeing when I first started trying to use Yahoo's API, about how urllib3 can't configure SSL appropriately.
I'm assuming you've seen this error before too, so in typical fashion I'm going to provide some screenshots:
That's what happened, I'm always happy to help out so feel free to continue to reach out. These are obviously good learning experiences for me.
I've been working on coding an algorithm that uses projections for each player to determine who are the best players to start and who should be on the bench. I'll make that available tomorrow sometime on github and it'd be great to get any feedback on it. Thank you!
Thanks @unpairestgood . That helped me out :smile: . I was just using the wrong OAuth version. In my tests i used OAuth2 instead of OAuth1. I'm gonna push the modifications on the master branch as soon as i'm done. I just have to set up Continuous Integration with travis .
Have a good one Paul, and thanks again
Just to let you know, i'm trying to develop an easy to use python API for yahoo-fantasy-sports. Your contribution is greatly appreciated. It will greatly help me to work with you on this project. All your suggestions are welcomed, so please don't hesitate.
I do believe that we will do something great together. You do have a better user experience than me on Yahoo Fantasy Sport.
One more time, thank you for your contribution @unpairestgood
Sounds good. I'm busy tomorrow but Thursday and this weekend I'll definitely take a look at what you're doing and submit ideas I think people would find useful.
ok thanks paul
Hello @unpairestgood , Could you please help test my development. Nothing is on the master branch yet, but there are already 2 methods in the development branch. Don't forget to put your oauth credentials in a file named oauth.json
Your help is greatly appreciated