Skip to content

Commit

Permalink
Merge pull request #221 from uberfastman/release/v19.0.0
Browse files Browse the repository at this point in the history
Release/v19.0.0
  • Loading branch information
uberfastman authored Oct 4, 2024
2 parents ce4a42a + 4013541 commit 7584d9b
Show file tree
Hide file tree
Showing 27 changed files with 1,578 additions and 888 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ Every time you run the app it will check to see if you are using the latest vers

If you wish to update the app yourself manually, you can just type `n` to skip automatically updating, and run `git pull origin main` manually from within the application directory on the command line.

If you wish to disable the automatic check for updates, you can set `CHECK_FOR_UPDATES=False` in your `.env` file and the app will skip checking GitHub for any updates. *Please note that until you set the `CHECK_FOR_UPDATES` environment variable back to its default value of `True`, the app will **never** attempt to check for updates again.*

---

<a name="dependencies"></a>
Expand Down
4 changes: 3 additions & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,6 @@
git push
```

16. Go to the [FFMWR Releases page](https://github.com/uberfastman/fantasy-football-metrics-weekly-report/releases) and draft a new release using the above git tag.
16. Open a pull request (PR) with the `release/vX.X.X` branch, allow GitHub actions to complete successfully, draft release notes, and merge it.

17. Go to the [FFMWR Releases page](https://github.com/uberfastman/fantasy-football-metrics-weekly-report/releases) and draft a new release using the above git tag.
355 changes: 0 additions & 355 deletions calculate/bad_boy_stats.py

This file was deleted.

196 changes: 0 additions & 196 deletions calculate/beef_stats.py

This file was deleted.

42 changes: 40 additions & 2 deletions calculate/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,12 @@ def get_bad_boy_data(bad_boy_results: List[BaseTeam]) -> List[List[Any]]:
for team in bad_boy_results:
ranked_team_name = team.name
ranked_team_manager = team.manager_str
ranked_bb_points = str(team.bad_boy_points)
ranked_bad_boy_points = str(team.bad_boy_points)
ranked_offense = team.worst_offense
ranked_count = str(team.num_offenders)

bad_boy_results_data.append(
[place, ranked_team_name, ranked_team_manager, ranked_bb_points, ranked_offense, ranked_count]
[place, ranked_team_name, ranked_team_manager, ranked_bad_boy_points, ranked_offense, ranked_count]
)

place += 1
Expand All @@ -375,6 +375,28 @@ def get_beef_rank_data(beef_results: List[BaseTeam]) -> List[List[Any]]:
place += 1
return beef_results_data

@staticmethod
def get_high_roller_data(high_roller_results: List[BaseTeam]) -> List[List[Any]]:
logger.debug("Creating league high roller data.")

high_roller_results_data = []
place = 1
team: BaseTeam
for team in high_roller_results:
ranked_team_name = team.name
ranked_team_manager = team.manager_str
ranked_total_fines = str(team.fines_total)
ranked_violation = team.worst_violation
ranked_violation_fine = str(team.worst_violation_fine)

high_roller_results_data.append(
[place, ranked_team_name, ranked_team_manager, ranked_total_fines, ranked_violation,
ranked_violation_fine]
)

place += 1
return high_roller_results_data

def get_ties_count(self, results_data: List[List[Any]], tie_type: str, break_ties: bool) -> int:

if tie_type == "power_ranking":
Expand Down Expand Up @@ -420,6 +442,15 @@ def get_ties_count(self, results_data: List[List[Any]], tie_type: str, break_tie
team[4],
team[5]
]
elif tie_type == "high_roller":
results_data[team_index] = [
str(place) + ("*" if group_has_ties else ""),
team[1],
team[2],
team[3],
team[4],
team[5]
]
else:
results_data[team_index] = [
str(place) + ("*" if group_has_ties else ""),
Expand All @@ -441,6 +472,13 @@ def get_ties_count(self, results_data: List[List[Any]], tie_type: str, break_tie
if len(group) > 1 and int(group[0][3]) > 0:
num_ties += sum(range(len(group)))

if tie_type == "high_roller":
groups = [list(group) for key, group in itertools.groupby(results_data, lambda x: x[3])]
num_ties = 0
for group in groups:
if len(group) > 1 and float(group[0][3]) > 0:
num_ties += sum(range(len(group)))

return num_ties

@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
services:

app:
image: ghcr.io/uberfastman/fantasy-football-metrics-weekly-report:18.1.3
image: ghcr.io/uberfastman/fantasy-football-metrics-weekly-report:19.0.0
platform: linux/amd64
ports:
- "5001:5000"
Expand Down
Loading

0 comments on commit 7584d9b

Please sign in to comment.