Skip to content

Feature/leaderboards#516

Draft
gabortodor wants to merge 36 commits intogamificationfrom
feature/leaderboards
Draft

Feature/leaderboards#516
gabortodor wants to merge 36 commits intogamificationfrom
feature/leaderboards

Conversation

@gabortodor
Copy link
Copy Markdown

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

ArchLens detected architectural changes in the following views:
diff
diff
diff

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.

Do we still want these scripts to generate test data?

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.

And this script to generate fake data? Do we want that?

from zeeguu.core.model.user_avatar import UserAvatar


def exercise_time_leaderboard(
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.

Currently this leaderboard has a limit of 20, should we keep that?


def read_articles_leaderboard(
user_ids_subquery,
limit: int = 20,
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.

Same here, limit of 20

receiver_id = Column(Integer, ForeignKey("user.id"), nullable=False)
status = Column(
Enum("pending", "accepted", "rejected", name="friend_request_status"),
Enum("pending", "accepted", "rejected", name="friend_request_status"), # TODO Do we need these? We basically only use pending since the request is deleted in both other cases
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.

Currently we do not use the status enum. So maybe it should be deleted. But it could also stay for future use?


@classmethod
def find_by_username(cls, username):
return User.query.filter(User.username == username).one()
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.

How is the behaviour of this. Can it throw and error?
If no user matches: raises NoResultFound. ?
If more than one matches: raises MultipleResultsFound.?

And do we handle that?

xXPinkmagicXx and others added 13 commits April 2, 2026 16:54
Skip expensive tokenization when caller only needs article metadata
(id, language, title). Used by SharedArticleHandler to show the
language choice modal immediately without waiting for NLP processing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Downloads and detects language + title without creating the article
in the DB. Returns instantly for already-existing articles.
Reverts the withContent flag — no longer needed since the share flow
now uses this lightweight endpoint instead of find_or_create_article.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

4 participants