-
Notifications
You must be signed in to change notification settings - Fork 1
merge walker #13
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
Open
JohnDaWalka
wants to merge
7
commits into
sourcery-ai:main
Choose a base branch
from
JohnDaWalka:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
merge walker #13
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ce26e94
Integrate code into GitHub project
JohnDaWalka daf4bb2
Merge pull request #1 from JohnDaWalka/integrate-code
JohnDaWalka 83d2870
Update README.md
JohnDaWalka 6849db6
e496043
Add `actions/checkout@v4` step and update `GH_TOKEN` in GitHub workflows
JohnDaWalka 2a720cb
Add steps to merge `develop` into `main` branch in GitHub Actions wor…
JohnDaWalka 6c8fe55
Add Poker Coach UI implementation and tests
JohnDaWalka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Merge Repos | ||
|
||
on: | ||
repository_dispatch: | ||
types: [merge-repos] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
merge-repos: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out target repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ github.event.client_payload.target_repo }} | ||
token: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Merge source repository | ||
run: | | ||
git remote add source https://github.com/${{ github.event.client_payload.source_repo }}.git | ||
git fetch source | ||
git merge source/main --allow-unrelated-histories | ||
|
||
- name: Push changes to target repository | ||
run: | | ||
git push origin main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import tkinter as tk | ||
from tkinter import messagebox | ||
|
||
class PokerCoachUI: | ||
def __init__(self, root): | ||
self.root = root | ||
self.root.title("Poker Coach") | ||
|
||
self.create_widgets() | ||
|
||
def create_widgets(self): | ||
self.hand_label = tk.Label(self.root, text="Enter your hand:") | ||
self.hand_label.pack() | ||
|
||
self.hand_entry = tk.Entry(self.root) | ||
self.hand_entry.pack() | ||
|
||
self.analyze_button = tk.Button(self.root, text="Analyze Hand", command=self.analyze_hand) | ||
self.analyze_button.pack() | ||
|
||
self.result_label = tk.Label(self.root, text="") | ||
self.result_label.pack() | ||
|
||
def analyze_hand(self): | ||
hand = self.hand_entry.get() | ||
if not hand: | ||
messagebox.showerror("Error", "Please enter a hand.") | ||
return | ||
|
||
# Placeholder for hand analysis logic | ||
result = f"Analysis result for hand: {hand}" | ||
|
||
self.result_label.config(text=result) | ||
|
||
if __name__ == "__main__": | ||
root = tk.Tk() | ||
app = PokerCoachUI(root) | ||
root.mainloop() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import pytest | ||
import tkinter as tk | ||
from poker_coach.ui import PokerCoachUI | ||
|
||
@pytest.fixture | ||
def app(): | ||
root = tk.Tk() | ||
app = PokerCoachUI(root) | ||
yield app | ||
root.destroy() | ||
|
||
def test_initial_state(app): | ||
assert app.hand_entry.get() == "" | ||
assert app.result_label.cget("text") == "" | ||
|
||
def test_analyze_hand_empty(app): | ||
app.hand_entry.delete(0, tk.END) | ||
app.analyze_hand() | ||
assert app.result_label.cget("text") == "" | ||
|
||
def test_analyze_hand_valid(app): | ||
app.hand_entry.insert(0, "AS KS QS JS TS") | ||
app.analyze_hand() | ||
assert "Analysis result for hand: AS KS QS JS TS" in app.result_label.cget("text") |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.