Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyagreco committed Jul 4, 2024
1 parent 548d932 commit cb544a7
Showing 1 changed file with 28 additions and 24 deletions.
52 changes: 28 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Instant stats for any fantasy football league.
![End-to-end Tests](https://github.com/joeyagreco/leeger/actions/workflows/e2e-tests.yml/badge.svg)
![Unit Tests](https://github.com/joeyagreco/leeger/actions/workflows/unit-tests.yml/badge.svg)
![Formatting Check](https://github.com/joeyagreco/leeger/actions/workflows/formatting-check.yml/badge.svg)

</div>

### Table of Contents
Expand Down Expand Up @@ -68,13 +69,13 @@ in the [`example`](https://github.com/joeyagreco/leeger/tree/main/example) folde
#### 2. Create a basic Python file to use this library

- Create a file that ends in the extension ".py"
- Example: _my_script.py_
- Example: _my_script.py_

#### 3. Download this library

- Navigate in your terminal to the directory where you created your Python script in Step 2
- Run the command `pip install leeger`
- If you do not have [pip](https://pip.pypa.io/en/stable/) installed, you will need to install it
- If you do not have [pip](https://pip.pypa.io/en/stable/) installed, you will need to install it

#### 4. Download your league data using a league loader

Expand All @@ -83,17 +84,17 @@ in the [`example`](https://github.com/joeyagreco/leeger/tree/main/example) folde
- Once you have everything you need for your selected site/s, use the code examples
found [here](https://github.com/joeyagreco/leeger/tree/main/example/league_loader) for your specific site/s to
download your league data
- You can put the code inside the Python script you created in Step 2
- You can put the code inside the Python script you created in Step 2
- If you have leagues that are continued in multiple sites, you can pull from multiple sites and add the League objects
together to combine the different sites
- An example of this can be
found [here](https://github.com/joeyagreco/leeger/blob/main/example/league/combiningLeagues.py)
- An example of this can be
found [here](https://github.com/joeyagreco/leeger/blob/main/example/league/combiningLeagues.py)

#### 5. Run your script

- Navigate in your terminal to the directory where you created your Python script in Step 2
- Run the command `py my_script.py`
- Replace _my_script.py_ with whatever you named your script in Step 2
- Replace _my_script.py_ with whatever you named your script in Step 2

#### 6. Load your league stats into Excel

Expand All @@ -106,12 +107,15 @@ in the [`example`](https://github.com/joeyagreco/leeger/tree/main/example) folde

**Question:**
I'm getting this error when I run my script:

<!---
// @formatter:off
-->

```python3
TypeError: dataclass() got an unexpected keyword argument 'kw_only'
```

<!---
// @formatter:on
-->
Expand All @@ -120,7 +124,8 @@ TypeError: dataclass() got an unexpected keyword argument 'kw_only'
This error occurs when the Python version you are using is not 3.10 or greater.\
Make sure you are using Python version 3.10 or a newer version.

___
---

**Q:**
How do I use this library to pull stats from my online fantasy league?

Expand All @@ -131,21 +136,26 @@ How do I use this library to pull stats from my online fantasy league?
2. Follow the [example code snippets](https://github.com/joeyagreco/leeger/tree/main/example/league_loader) for your
fantasy site to load the League object

___
---

**Q:**
How can I get stats into Excel once I have my League object?

**A:**
Follow [this example code](https://github.com/joeyagreco/leeger/blob/main/example/stat/statsToExcelExample.py).
___

---

**Q:**
Can I combine years from different fantasy sites that are loaded as separate League objects into a single League object?

**A:**
Yes, the League object supports addition (+) to combine multiple league objects.\
An example of this can be
found [here](https://github.com/joeyagreco/leeger/blob/main/example/league/combiningLeagues.py).
___

---

**Q:**
Can I disable validation on my League object?

Expand All @@ -166,17 +176,20 @@ pip install leeger
Sites that you can automatically load your league data from.

| Name | Website | Supported | Setup Documentation |
|-----------------|-------------------------------------------|--------------------|---------------------------------------------------------------------------------------------------------------------------|
| --------------- | ----------------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------- |
| ESPN | https://www.espn.com/fantasy/football/ | :heavy_check_mark: | [ESPN :page_facing_up:](https://github.com/joeyagreco/leeger/blob/main/doc/league_loader/espn.md) |
| Fleaflicker | https://www.fleaflicker.com/ | :heavy_check_mark: | [Fleaflicker :page_facing_up:](https://github.com/joeyagreco/leeger/blob/main/doc/league_loader/fleaflicker.md) |
| Fleaflicker | https://www.fleaflicker.com/ | :heavy_check_mark: | [Fleaflicker :page_facing_up:](https://github.com/joeyagreco/leeger/blob/main/doc/league_loader/fleaflicker.md) |
| MyFantasyLeague | http://home.myfantasyleague.com/ | :heavy_check_mark: | [MyFantasyLeague :page_facing_up:](https://github.com/joeyagreco/leeger/blob/main/doc/league_loader/my_fantasy_league.md) |
| NFL | https://fantasy.nfl.com/ | :x: | :x: |
| Sleeper | https://sleeper.com/fantasy-football/ | :heavy_check_mark: | [Sleeper :page_facing_up:](https://github.com/joeyagreco/leeger/blob/main/doc/league_loader/sleeper.md) |
| Yahoo | https://football.fantasysports.yahoo.com/ | :heavy_check_mark: | [Yahoo :page_facing_up:](https://github.com/joeyagreco/leeger/blob/main/doc/league_loader/yahoo.md) |

<!---
// @formatter:off
-->

If a fantasy site you use is not listed here and you would like it to be, please [open an issue](https://github.com/joeyagreco/leeger/issues/new/choose).

<!---
// @formatter:on
-->
Expand All @@ -195,18 +208,9 @@ Please make sure to update tests as appropriate.
## Development

_Run these commands from the root folder_
- Format Code: `./main fmt`
- Run Unit Tests: `./main test`
- Generate Coverage Report: `./main cov`

### Running Tests

Run the following command from the root folder:

```bash
pytest
```

- Format Code: `make fmt`
- Run Unit Tests: `make test`

## License

Expand All @@ -219,4 +223,4 @@ Run the following command from the root folder:
- [fleaflicker](https://github.com/joeyagreco/fleaflicker)
- [pymfl](https://github.com/joeyagreco/pymfl)
- [sleeper](https://github.com/joeyagreco/sleeper)
- [YahooFantasy](https://github.com/mattdodge/yahoofantasy)
- [YahooFantasy](https://github.com/mattdodge/yahoofantasy)

0 comments on commit cb544a7

Please sign in to comment.