Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Team LPR (Logan, Patrick, Rig) - Futbol Project Submission #1153

Open
wants to merge 84 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
5fb5dca
add discussion question framework
ontruster74 Jan 13, 2025
c137b27
complete iteration 1 discussion questions
ontruster74 Jan 13, 2025
463cedb
Merge pull request #1 from ontruster74/readme
ldsauer Jan 13, 2025
7cf7e6c
Update README.md
ontruster74 Jan 13, 2025
ad85277
create simple versions of csv data
ontruster74 Jan 14, 2025
2f8b834
add StatTracker class skeleton
ontruster74 Jan 14, 2025
a040be3
add first draft of self.from_csv method
ontruster74 Jan 14, 2025
58a75ef
attempt csv file i/o setup
ontruster74 Jan 14, 2025
9e96baa
refactor StatTracker.from_csv method
ontruster74 Jan 14, 2025
856fe0e
Initial Commit
ontruster74 Jan 14, 2025
adc1928
add game, team, and game_team wrapper classes functionality
ontruster74 Jan 14, 2025
7e73951
add factory class integration
ontruster74 Jan 14, 2025
2cbf8c3
clear stat_tracker_spec file
ontruster74 Jan 14, 2025
ec265f6
add highest_total score and lowest_total score tests
ontruster74 Jan 14, 2025
743a167
Merge branch 'fileio' of github.com:ontruster74/futbol
ldsauer Jan 14, 2025
2746b7e
Initial Commit
ontruster74 Jan 14, 2025
f11b945
Merge branch 'fileio' of github.com:ontruster74/futbol
ldsauer Jan 14, 2025
b6b352d
Merge pull request #2 from ontruster74/fileio
little-Patrick Jan 14, 2025
abfa159
completion of the percentage_home_wins, percentage_visitor_wins, perc…
ldsauer Jan 16, 2025
1c4d022
made some small edits
ldsauer Jan 16, 2025
f74e0a5
correct spec folder filenames
ontruster74 Jan 16, 2025
0e1dcef
add first three League Stats methods
ontruster74 Jan 16, 2025
d7807cc
add missing attr_reader methods
ontruster74 Jan 16, 2025
bfb8ed7
add season and type to Game and GameFactory class. The method count o…
little-Patrick Jan 16, 2025
6e3cb4d
add season and type to Game and GameFactory class. The method count o…
little-Patrick Jan 16, 2025
1faa95f
accidental last commit, this commit adds testing for agerage goals pe…
little-Patrick Jan 16, 2025
4a38ab7
agerage_goals per game method passes test
little-Patrick Jan 16, 2025
68de073
average_goals_per_season passes testrspec spec/stat_tracker_spec.rb !
little-Patrick Jan 16, 2025
d394017
trying to fix push
little-Patrick Jan 16, 2025
09bc056
Merge pull request #3 from ontruster74/percentages
ontruster74 Jan 16, 2025
14e18de
Merge branch 'main' into leaguestat-methods
ldsauer Jan 16, 2025
3d05a41
Merge pull request #4 from ontruster74/leaguestat-methods
ldsauer Jan 16, 2025
ca62ea6
did some psudocoding to help me map out what I need to doing for the …
ldsauer Jan 16, 2025
d227fd2
Merge branch 'main' of github.com:ontruster74/futbol into lowest_scor…
ldsauer Jan 16, 2025
ef96e43
helper method made for score average
little-Patrick Jan 16, 2025
0b890e9
helper method for average goals split into away and home
little-Patrick Jan 16, 2025
e9a15eb
manually put in the methods that Patrick worked on because github was…
ldsauer Jan 16, 2025
94dfd7d
helper method for finding team names created
little-Patrick Jan 16, 2025
a9cb588
helper methods created
little-Patrick Jan 16, 2025
e154150
highest scoring methods are done and comply with tests
little-Patrick Jan 16, 2025
1277782
brought down the average_score methods that Patrick did
ldsauer Jan 16, 2025
9c6e254
wrote the methods for lowest scoring home and away teams with correcs…
ldsauer Jan 17, 2025
ba82de7
Merge branch 'main' into game_stats_patrick
ontruster74 Jan 17, 2025
ce3b58e
Merge pull request #5 from ontruster74/game_stats_patrick
ontruster74 Jan 17, 2025
37080e9
add last two season stats methods
ontruster74 Jan 17, 2025
9c47cb3
add csv wrapper object tests
ontruster74 Jan 17, 2025
8dfee6d
add factory class method tests
ontruster74 Jan 17, 2025
af359b0
correct class method test titles
ontruster74 Jan 17, 2025
fef9717
Merge branch 'main' into highest_score_league_stat
little-Patrick Jan 17, 2025
2526af8
Merge pull request #6 from ontruster74/highest_score_league_stat
ontruster74 Jan 17, 2025
df83b1b
Merge branch 'main' into lowest_scoreres
ontruster74 Jan 17, 2025
82b005c
Merge pull request #7 from ontruster74/lowest_scoreres
ontruster74 Jan 17, 2025
d3d4196
Merge branch 'main' into routine-tests
ldsauer Jan 17, 2025
d1ad9d1
Merge pull request #8 from ontruster74/routine-tests
ldsauer Jan 17, 2025
b2bb499
Update README.md
ontruster74 Jan 17, 2025
7b2bdbc
added the winningest_coach and worst_coach methods and corresponding …
ldsauer Jan 18, 2025
5155d0e
Initial Commit
ontruster74 Jan 18, 2025
510cbe0
update tests and class file for stattracker for #most/least_accurate_…
little-Patrick Jan 18, 2025
9322cf2
integrate methods with spec harness tests
ontruster74 Jan 19, 2025
3e9a981
fix variable names and remove extraneous data
ontruster74 Jan 19, 2025
6d412df
got the winningest_coach and worst_coach to pass against the dummy data
ldsauer Jan 19, 2025
ce5ab51
Merge pull request #9 from ontruster74/team_season
ldsauer Jan 19, 2025
877d31e
Merge branch 'main' into coach_stats
little-Patrick Jan 19, 2025
dcf01eb
Merge pull request #10 from ontruster74/coach_stats
little-Patrick Jan 19, 2025
dbc8fe8
Merge branch 'main' into varnames
little-Patrick Jan 19, 2025
abca86a
Merge pull request #11 from ontruster74/varnames
little-Patrick Jan 19, 2025
9f355cf
refactor winningest and worst_coach methods
ontruster74 Jan 19, 2025
93a3c88
update least and most accurate teams to comply with spec harness
little-Patrick Jan 20, 2025
cca105d
all methods pass the spec_harness, and simplecov in integrated into p…
little-Patrick Jan 20, 2025
6b82e38
Merge pull request #12 from ontruster74/season-stats-final
ldsauer Jan 20, 2025
11e004d
Add best and worst season methods
ontruster74 Jan 20, 2025
9dc9aa7
adding methods for worst and best season. they have not been tested a…
little-Patrick Jan 20, 2025
9a78e58
adding most_goals_scored to stattracker
little-Patrick Jan 20, 2025
2b4f9b0
update StatTracker to add #fewest/most_goals_scores they comply with …
little-Patrick Jan 20, 2025
a072aa1
add favorite_opponent and rival methods
ontruster74 Jan 20, 2025
1f6e30d
finalize this branch for a pull request
little-Patrick Jan 20, 2025
dbf9c73
best and worst season methods taken out
little-Patrick Jan 20, 2025
a6e072d
Merge pull request #14 from ontruster74/team_stats_patrick
ontruster74 Jan 20, 2025
7654807
added the team_info and average_win_percentage with correponding tests
ldsauer Jan 20, 2025
66d87e5
Merge pull request #15 from ontruster74/iter4-methods
ldsauer Jan 20, 2025
dbeeb91
Merge branch 'main' into iteration_4_ls
ontruster74 Jan 20, 2025
dfa5b86
Merge pull request #16 from ontruster74/iteration_4_ls
ontruster74 Jan 20, 2025
5ffbdf1
rearrange spec describe blocks
ontruster74 Jan 20, 2025
fd8681c
Merge pull request #17 from ontruster74/test-revisions
little-Patrick Jan 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'

gem 'simplecov', require: false, group: :test
74 changes: 72 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,73 @@
# Futbol
# Futbol Project - Team LPR

Repository for the Team LPR version of the [Turing School](https://turing.edu/) Futbol project.

Team LPR Members:
---------------------------------
Patrick Little

Logan Sauer

Rig Freyr

---------------------------------
- Check-Ins
----------------------------------
We are planning on having scheduled check-ins at 2:00 pm MST on Tuesday the 14th and Friday the 17th, as well as at 11:00 am on Monday the 20th. However, we also plan to check-in on a more continuous and less formal basis throughout the development of the project.

-----------------------------------
- Project Organization and Workflow
-----------------------------------
Our primary vehicle for collaboration will be through GitHub; specifically, developing parallel branches of the same project repository in tandem and merging them when necessary. All merges will be handled as a group; no group member will merge their own pull requests. All group efforts and responsibilites will be tracked through a Miro board (link:https://miro.com/app/board/uXjVLuMoXq0=/) and jointly updated throughout the development process. The main body of the project can be broken into Game, League, and Season statistics methods; the team will attempt to complete one of these three categories of instanced methods collaboratavely each day.

----------------------------------
- How we made a decision on Project Organization
-----------------------------------
We discussed learning the usage of GitHub Projects to coordinate our work in this project, but decided it was too steep of an additional learning curve to manage for our first group development effort. Miro seemed like an efficient and easy to use alternative that we could all learn to use asynchronously in a short amount of time.


----------------------------------
- Approach to Code Design
----------------------------------
In addition to the required StatTracker class, we will need Team, Game, and Season classes to handle manipulation and sorting of the underlying CSV data for us. We will start by divying up the required Game Statistics Methods between the three of us and working on them asynchronously, so that each team member only has two or three methods to complete each day. On the next day, we will repeat this process with the League Statistics methods, and then once more with the Season Statistics on the day after that.

-----------------------------------
Initial DTR Doc Link:
-----------------------------------
https://docs.google.com/document/d/1ooIWGVt1z2ep9oW6uYpbnLjC3UoshCzuDN0YrBzbF_g/edit?pli=1&tab=t.0

----------------------------------
Contributors
----------------------------------

Patrick Little
Github profile link: https://github.com/little-Patrick

Rig Freyr
Github profile link: https://github.com/ontruster74

Logan Sauer
Github profile link: https://github.com/ldsauer

------------------------------------
Iteration 3 Retrospective
------------------------------------

For our retro, we used the EasyRetro online tool: https://easyretro.io/publicboard/bfWsAYUml2aXrJCv72tOrW7ybsM2/705879bf-e1ad-48ea-8c4f-391b64eb8ccb

3 Things That Went Well During The Project
-----------------------------------------------
1 (Logan): I think we did a great job of staying in communication with each other and making sure that we were all on the same page as far as working through the iterations at a good pace as a group.

2 (Patrick): I feel that the integration between methods and testing went a lot smoother than I expected. We had conflicts when merging to main, but it was mostly formatting issues. I like that we came together during the pull requests to do a little more live code eval, and worked through it together.

3 (Rig): The team did a great job of balancing both their synchronous and asynchronous efforts. In other words, I felt like I was able to make my own schedule during the project while still working closely with everyone else involved.

3 Things We Would Do Differently Next Time
--------------------------------------------------
1 (Logan): Take the initiative to host a "group work session" where I set up a huddle/zoom and work in there, even if it's cameras off. We talked about doing it at the beginning but I never followed through with it. So taking the initiative to set up the meeting and not wait for someone else to set it up.

2 (Patrick): In the future, I want to be more communicative of what and when I am working on stuff, so if I need to reach out for help it might be easier for others to help. And vice versa, if someone needs help it is easier for them to coordinate with me.

3 (Rig): It will be a good idea to slow down and review my code more carefully as I am writing it; good code is better than fast code. I will try to make my branches smaller in scope and plan their creation in advance so that they are easier to review with the group as a whole.

Starter repository for the [Turing School](https://turing.edu/) Futbol project.
6 changes: 6 additions & 0 deletions lib/.keep
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@






16 changes: 16 additions & 0 deletions lib/game.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
class Game
attr_reader :game_id, :season, :type, :date_time, :away_team_id, :home_team_id, :away_goals, :home_goals, :venue, :venue_link

def initialize(game_id, season, type, date_time, away_team_id, home_team_id, away_goals, home_goals, venue, venue_link)
@game_id = game_id
@season = season
@type = type
@date_time = date_time
@away_team_id = away_team_id
@home_team_id = home_team_id
@away_goals = away_goals
@home_goals = home_goals
@venue = venue
@venue_link = venue_link
end
end
9 changes: 9 additions & 0 deletions lib/game_factory.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class GameFactory
def self.create_games(filepath)
games = []
CSV.foreach(filepath, headers: true, header_converters: :symbol) do |row|
games << Game.new(row[:game_id], row[:season], row[:type], row[:date_time], row[:away_team_id], row[:home_team_id], row[:away_goals].to_i, row[:home_goals].to_i, row[:venue], row[:venue_link])
end
return games
end
end
23 changes: 23 additions & 0 deletions lib/game_team.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
class GameTeam
attr_reader :game_id, :team_id, :hoa, :result, :settled_in, :head_coach, :goals, :shots, :tackles, :pim, :power_play_opportunities, :power_play_goals, :face_off_win_percentage, :giveaways, :takeaways

def initialize(game_id, team_id, hoa, result, settled_in, head_coach, goals, shots, tackles, pim, power_play_opportunities, power_play_goals, face_off_win_percentage, giveaways, takeaways)
@game_id = game_id
@team_id = team_id
@hoa = hoa
@result = result
@settled_in = settled_in
@head_coach = head_coach
@goals = goals
@shots = shots
@tackles = tackles
@pim = pim
@power_play_opportunities = power_play_opportunities
@power_play_goals = power_play_goals
@face_off_win_percentage = face_off_win_percentage
@giveaways = giveaways
@takeaways = takeaways
end
end


10 changes: 10 additions & 0 deletions lib/game_team_factory.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class GameTeamFactory
def self.create_game_teams(filepath)
game_teams = []
CSV.foreach(filepath, headers: true, header_converters: :symbol) do |row|
game_teams << GameTeam.new(row[:game_id], row[:team_id], row[:hoa], row[:result], row[:settled_in], row[:head_coach], row[:goals].to_i, row[:shots].to_i, row[:tackles].to_i, row[:pim].to_i, row[:powerPlayOpportunities].to_i, row[:powerPlayGoals].to_i, row[:faceOffWinPercentage].to_i, row[:giveaways].to_i, row[:takeaways].to_i)
end
return game_teams
end
end

Loading