Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

Commit

Permalink
Elepolt api fix - version bump to 1.7.0 (#431)
Browse files Browse the repository at this point in the history
* Working board using new API + client (#430)

* Working board for previous and next game. It's a start

* Working previous/next/record summary

* More transitioning to the OpenAPI

* Most of the play by play is working

* Quick formatting

* Working score ticker

* Fix next game on gameday

* Stability for live game feed

* General system stability

* Fix game date format on scoreticker

* Fix assists

* General system stability

* Working standings (no wildcard)

* Include nhl-api-client

* Build and publish docs

* Bump version to match pipy

* Fixed a few bugs

* Version bump

---------

Co-authored-by: Evan <[email protected]>
  • Loading branch information
riffnshred and ELepolt authored Nov 23, 2023
1 parent bd353b1 commit da3d9fe
Show file tree
Hide file tree
Showing 38 changed files with 66,765 additions and 774 deletions.
82 changes: 42 additions & 40 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,53 @@
#
name: Redocly OpenAPI

on:
# Runs on pushes targeting the default branch
push:
# branches: [ beta ]
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Create Tagged Release
branches: ["master"]

jobs:
build:
name: Create Release
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
fetch-depth: 0
- name: Set current version variable
node-version: '20.x'
- run: npm i -g @redocly/cli@latest
- run: redocly build-docs swagger/nhl.json --output=docs/index.html
- name: Fix permissions
run: |
VER=$(cat VERSION)
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Bump version
run: |
echo "${{ steps.get_version.outputs.VERSION }}" > VERSION
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
force: "true"
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@main
chmod -c -R +rX "_site/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload GitHub Pages artifact
uses: actions/[email protected]
with:
commitMode: "true"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Upload entire repository
path: 'docs/'

- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: ${{ steps.get_version.outputs.VERSION }}
body: ${{ steps.github_release.outputs.changelog }}
# Deploy job
deploy:
# Add a dependency to the build job
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

51 changes: 51 additions & 0 deletions .github/workflows_riffnshred/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
on:
push:
# branches: [ beta ]
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Create Tagged Release

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set current version variable
run: |
VER=$(cat VERSION)
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Bump version
run: |
echo "${{ steps.get_version.outputs.VERSION }}" > VERSION
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
force: "true"
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@main
with:
commitMode: "true"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: ${{ steps.get_version.outputs.VERSION }}
body: ${{ steps.github_release.outputs.changelog }}
File renamed without changes.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,5 @@ src/renderer/boarddev

# Custom_logos to overwrite the standard one
config/custom_logos.json

nhl-api-client/
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.12
1.7.0
Empty file removed config/.default/firstrun
Empty file.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ephem==3.7.7.0
fastjsonschema>=2.14.4
geocoder==1.38.1
gpiozero==1.5.1
nhl-api-client==1.0.4
noaa-sdk>=0.1.18
printtools==1.2
PyInstaller==3.6
Expand Down
54 changes: 27 additions & 27 deletions src/boards/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,25 @@ def __init__(self):
pass

# Board handler for PushButton
def _pb_board(self, data, matrix,sleepEvent):
def _pb_board(self, data, matrix, sleepEvent):

board = getattr(self, data.config.pushbutton_state_triggered1)
board(data, matrix,sleepEvent)
board(data, matrix, sleepEvent)

# Board handler for Weather Alert
def _wx_alert(self, data, matrix,sleepEvent):
def _wx_alert(self, data, matrix, sleepEvent):

board = getattr(self, "wxalert")
board(data, matrix,sleepEvent)
board(data, matrix, sleepEvent)

# Board handler for screensaver
def _screensaver(self, data, matrix,sleepEvent):
def _screensaver(self, data, matrix, sleepEvent):

board = getattr(self, "screensaver")
board(data, matrix,sleepEvent)
board(data, matrix, sleepEvent)

# Board handler for Off day state
def _off_day(self, data, matrix,sleepEvent):
def _off_day(self, data, matrix, sleepEvent):
bord_index = 0
while True:
board = getattr(self, data.config.boards_off_day[bord_index])
Expand Down Expand Up @@ -78,15 +78,15 @@ def _off_day(self, data, matrix,sleepEvent):
else:
data.pb_trigger = False

board(data, matrix,sleepEvent)
board(data, matrix, sleepEvent)

if bord_index >= (len(data.config.boards_off_day) - 1):
return
else:
if not data.pb_trigger or not data.wx_alert_interrupt or not data.screensaver:
bord_index += 1

def _scheduled(self, data, matrix,sleepEvent):
def _scheduled(self, data, matrix, sleepEvent):
bord_index = 0
while True:
board = getattr(self, data.config.boards_scheduled[bord_index])
Expand Down Expand Up @@ -120,15 +120,15 @@ def _scheduled(self, data, matrix,sleepEvent):
else:
data.pb_trigger = False

board(data, matrix,sleepEvent)
board(data, matrix, sleepEvent)

if bord_index >= (len(data.config.boards_scheduled) - 1):
return
else:
if not data.pb_trigger or not data.wx_alert_interrupt or not data.screensaver:
bord_index += 1

def _intermission(self, data, matrix,sleepEvent):
def _intermission(self, data, matrix, sleepEvent):
bord_index = 0
while True:
board = getattr(self, data.config.boards_intermission[bord_index])
Expand Down Expand Up @@ -163,15 +163,15 @@ def _intermission(self, data, matrix,sleepEvent):
# else:
# data.pb_trigger = False

board(data, matrix,sleepEvent)
board(data, matrix, sleepEvent)

if bord_index >= (len(data.config.boards_intermission) - 1):
return
else:
if not data.pb_trigger or not data.wx_alert_interrupt or not data.screensaver:
bord_index += 1

def _post_game(self, data, matrix,sleepEvent):
def _post_game(self, data, matrix, sleepEvent):
bord_index = 0
while True:
board = getattr(self, data.config.boards_post_game[bord_index])
Expand Down Expand Up @@ -207,7 +207,7 @@ def _post_game(self, data, matrix,sleepEvent):
data.pb_trigger = False


board(data, matrix,sleepEvent)
board(data, matrix, sleepEvent)

if bord_index >= (len(data.config.boards_post_game) - 1):
return
Expand All @@ -218,10 +218,10 @@ def _post_game(self, data, matrix,sleepEvent):
def fallback(self, data, matrix, sleepEvent):
Clock(data, matrix, sleepEvent)

def scoreticker(self, data, matrix,sleepEvent):
def scoreticker(self, data, matrix, sleepEvent):
Scoreticker(data, matrix, sleepEvent).render()

def seriesticker(self, data, matrix,sleepEvent):
def seriesticker(self, data, matrix, sleepEvent):
'''
forcing it to show since the playoff start and regular season end are in conflict for 2021
'''
Expand All @@ -230,36 +230,36 @@ def seriesticker(self, data, matrix,sleepEvent):
Seriesticker(data, matrix, sleepEvent).render()
'''

def stanley_cup_champions(self, data, matrix,sleepEvent):
def stanley_cup_champions(self, data, matrix, sleepEvent):
StanleyCupChampions(data, matrix, sleepEvent).render()

def standings(self, data, matrix,sleepEvent):
def standings(self, data, matrix, sleepEvent):
#Try making standings a thread
Standings(data, matrix, sleepEvent).render()

def team_summary(self, data, matrix,sleepEvent):
def team_summary(self, data, matrix, sleepEvent):
TeamSummary(data, matrix, sleepEvent).render()

def clock(self, data, matrix,sleepEvent):
def clock(self, data, matrix, sleepEvent):
Clock(data, matrix, sleepEvent)

def pbdisplay(self, data, matrix,sleepEvent):
def pbdisplay(self, data, matrix, sleepEvent):
pbDisplay(data, matrix, sleepEvent)

def weather(self, data, matrix,sleepEvent):
def weather(self, data, matrix, sleepEvent):
wxWeather(data, matrix, sleepEvent)

def wxalert(self, data, matrix,sleepEvent):
def wxalert(self, data, matrix, sleepEvent):
wxAlert(data, matrix, sleepEvent)

def wxforecast(self, data, matrix,sleepEvent):
def wxforecast(self, data, matrix, sleepEvent):
wxForecast(data, matrix, sleepEvent)

def screensaver(self, data, matrix,sleepEvent):
def screensaver(self, data, matrix, sleepEvent):
screenSaver(data, matrix, sleepEvent)

def christmas(self, data, matrix,sleepEvent):
def christmas(self, data, matrix, sleepEvent):
Christmas(data, matrix, sleepEvent).draw()

def seasoncountdown(self, data, matrix,sleepEvent):
def seasoncountdown(self, data, matrix, sleepEvent):
SeasonCountdown(data, matrix, sleepEvent).draw()
6 changes: 3 additions & 3 deletions src/boards/scoreticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
from time import sleep
from utils import center_obj
from data.scoreboard import Scoreboard
from data.scoreboard import GameSummaryBoard
from renderer.scoreboard import ScoreboardRenderer
from renderer.matrix import MatrixPixels
import debug
Expand All @@ -28,8 +28,8 @@ def render(self):
self.matrix.clear()
if self.index >= (len(self.games)):
return
ScoreboardRenderer(self.data, self.matrix, Scoreboard(self.games[self.index], self.data)).render()

ScoreboardRenderer(self.data, self.matrix, GameSummaryBoard(self.games[self.index], self.data)).render()
self.show_indicator()
self.matrix.render()

Expand Down
2 changes: 1 addition & 1 deletion src/boards/screensaver.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def draw_screenSaver(self):

# Go through the frames
x = 0
while x is not 10:
while x != 10:
try:
toaster.seek(frame_nub)
except EOFError:
Expand Down
Loading

0 comments on commit da3d9fe

Please sign in to comment.