Skip to content

add unified queue for match running#52

Open
amcsz wants to merge 16 commits into
tjcsl:masterfrom
amcsz:bigchanges
Open

add unified queue for match running#52
amcsz wants to merge 16 commits into
tjcsl:masterfrom
amcsz:bigchanges

Conversation

@amcsz
Copy link
Copy Markdown
Member

@amcsz amcsz commented Feb 2, 2026

still a wip

@JasonGrace2282 JasonGrace2282 marked this pull request as draft February 2, 2026 20:52
@amcsz amcsz force-pushed the bigchanges branch 2 times, most recently from 48c5f98 to f45653f Compare February 2, 2026 22:13
@coveralls
Copy link
Copy Markdown

coveralls commented Feb 2, 2026

Coverage Status

coverage: 33.261% (-0.7%) from 33.957%
when pulling 210515b on amcsz:bigchanges
into d8bb0a8 on tjcsl:master.

@amcsz amcsz force-pushed the bigchanges branch 6 times, most recently from b265330 to 158ef1f Compare February 3, 2026 13:46
@amcsz amcsz force-pushed the bigchanges branch 3 times, most recently from 5637179 to 0cd4092 Compare February 3, 2026 13:53
amcsz added 7 commits February 3, 2026 08:57
Add Docker Compose integration (tjcsl#51)

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

fix: polish queue table

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
@amcsz amcsz marked this pull request as ready for review February 10, 2026 23:25
Copy link
Copy Markdown
Member

@JasonGrace2282 JasonGrace2282 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the changes in this PR!
I've gone through and given feedback on how we can improve the code and get this merged - please take a look.

I do wish this PR had been split apart into multiple PRs based on the change. A nice split would have been:

  1. Fixing dev environment (easy to merge)
  2. Deleting unnecessary static files (easy to merge)
  3. Unifying the game queue
  4. Actual Elo implementation

This would have made the PR significantly easier to review - please never make a single PR this big ever again!
(See How to Make Your Code Reviewer Fall in Love with You)
That being said, it's far too late to split up the PR at this point in time, so don't try to do it with this PR :)

Comment on lines +8 to +17
uv run manage.py shell -c "
from django.contrib.auth import get_user_model
User = get_user_model()
if not User.objects.filter(username='admin').exists():
User.objects.create_superuser(
username='admin',
email='admin@admin.com',
password='123'
)
"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're going to do this, you should probably admin.set_password("tjcsl"), document it, and add a password login when settings.DEBUG is True

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the admin.set_password("tjcsl") part, wouldn't it be just the same as calling create_superuser? Also, why would you need to only add it on settings.DEBUG = True when it's always going to be true since its a testing environment?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash all the migrations into one big migration file

Comment thread othello/apps/auth/views.py
Comment thread othello/apps/auth/views.py
Comment on lines +93 to +96
<div id="player-score-box" class="centered col-7">
<p id="player-black" class="player-score"></p>
<p style="visibility: hidden">WWW</p>
<p id="player-white" class="player-score"></p>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The css seems a bit strange here:

Image

Maybe it would be better to have a half/half split for names, and use some other indicator for the turn?

# Celery
CELERY_RESULT_BACKEND = "django-db"
CELERY_BROKER_URL = "redis://localhost:6379/1"
CELERY_BROKER_URL = "redis://othello_redis:6379/1"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't we change all of this stuff in the secret.sample.docker.py? I would rather not modify it in this PR, and delete it from the main settings file in a follow-up PR

Comment on lines +200 to +203
"created_at": formats.date_format(
timezone.localtime(match.created_at),
"DATETIME_FORMAT",
),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The server should probably return it in UTC/isoformat and it should be converted to localtime client-side.

Comment thread othello/static/js/games/match_replay.js Outdated
Comment on lines +88 to +90
$("#stepForward").click(function (){
gameIndex = Math.min(++gameIndex, gameReplay.game.length-1);
drawBoardAtState(gameIndex);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we talked about this (and you possibly even showed it working), but it is intuitive to try arrow keys instead of clicking on buttons at the bottom of the screen. Can we do that in addition to the buttons?

<a class="nav-link" href="{% url 'games:help' %}">Help</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'games:queue' %}">Queue</a>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Queue seems a bit of a weird name - maybe something like "Matches" is better?

<li class="nav-item d-flex align-items-center">
<form method="post" action="{% url 'auth:logout' %}" style="display: inline;">
{% csrf_token %}
<button type="submit" class="nav-link nav-button">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make this like slightly red or some other indicator (other than the font size difference?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants