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

半荘情報、統計情報の取得 #1

Merged
merged 8 commits into from
Feb 9, 2024
Merged

Conversation

kackyt
Copy link
Owner

@kackyt kackyt commented Feb 7, 2024

Summary by CodeRabbit

  • 新機能
    • データセットの取得機能を追加しました。
    • ゲームデータの取得機能を追加しました。
    • 統計情報の取得機能を追加しました。
    • Mahjong Analysis APIのための新しいFastAPIアプリケーションを導入しました。

Copy link

coderabbitai bot commented Feb 7, 2024

Walkthrough

この変更は、FastAPIを使用した麻雀分析APIの開発に関連する新機能の導入を含みます。新しいmain.pyファイルでは、Mahjong Analysis APIのFastAPIアプリケーションが実装され、ゲームデータ、局データ、統計情報、およびデータセット向けのルートが設定されました。さらに、CORSミドルウェアを使用してクロスオリジンリクエストを処理し、エラーモニタリングのためにSentryを統合しています。

Changes

ファイル 変更概要
.api/routers/dataset.py 新規ファイル:Google BigQueryからデータセットを取得し、カスタムデータセットスキーマにマッピングするget_datasets()関数を導入
.api/routers/game.py, .api/routers/kyoku.py 新規ファイル:指定された条件に基づいてゲームデータや局を取得するAPIルートを導入
.api/routers/statistics.py 新規ファイル:指定された日付範囲内でプレイヤースコア、役のカウント、流れのカウントに関連する統計情報を取得するAPIルートを導入
main.py 新規ファイル:Mahjong Analysis APIのFastAPIアプリケーションを実装し、ルートを設定。CORSミドルウェアとSentryの統合を含む

🐇🌟
データの舞う、新たな旅路
麻雀の謎、解き明かさん
うさぎ跳ねる、夢の中
コードの詩、続く限り

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 16

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between 46a22d0 and 8af4ed8.
Files selected for processing (24)
  • .coderabbit.yaml (1 hunks)
  • .gcloudignore (1 hunks)
  • .github/pr-labeler.yml (1 hunks)
  • .github/release-drafter.yml (1 hunks)
  • .github/workflows/pr_label.yml (1 hunks)
  • .github/workflows/release.yml (1 hunks)
  • api/auth.py (1 hunks)
  • api/cruds/dataset.py (1 hunks)
  • api/cruds/game.py (1 hunks)
  • api/cruds/kyoku.py (1 hunks)
  • api/cruds/statstics.py (1 hunks)
  • api/routers/dataset.py (1 hunks)
  • api/routers/game.py (1 hunks)
  • api/routers/kyoku.py (1 hunks)
  • api/routers/statistics.py (1 hunks)
  • api/schemas/dataset.py (1 hunks)
  • api/schemas/game.py (1 hunks)
  • api/schemas/generic.py (1 hunks)
  • api/schemas/kyoku.py (1 hunks)
  • api/schemas/statistics.py (1 hunks)
  • app.yaml (1 hunks)
  • main.py (1 hunks)
  • pyproject.toml (1 hunks)
  • requirements.txt (1 hunks)
Files skipped from review due to trivial changes (1)
  • .gcloudignore
Additional comments: 11
api/schemas/dataset.py (1)
  • 1-9: このコードセグメントに問題はありません。
api/schemas/kyoku.py (1)
  • 1-15: このコードセグメントに問題はありません。
.github/workflows/pr_label.yml (1)
  • 1-15: このコードセグメントに問題はありません。
api/schemas/game.py (1)
  • 1-17: このコードセグメントに問題はありません。
requirements.txt (1)
  • 1-20: このコードセグメントに問題はありません。
api/schemas/generic.py (1)
  • 1-20: このコードセグメントに問題はありません。
api/schemas/statistics.py (1)
  • 1-28: このコードセグメントに問題はありません。
.github/release-drafter.yml (1)
  • 1-31: このコードセグメントに問題はありません。
.github/workflows/release.yml (1)
  • 1-33: このコードセグメントに問題はありません。
.coderabbit.yaml (1)
  • 1-41: このコードセグメントに問題はありません。
pyproject.toml (1)
  • 1-73: このコードセグメントに問題はありません。

app.yaml Show resolved Hide resolved
.github/pr-labeler.yml Show resolved Hide resolved
api/routers/dataset.py Outdated Show resolved Hide resolved
api/cruds/dataset.py Outdated Show resolved Hide resolved
api/routers/game.py Outdated Show resolved Hide resolved
api/routers/statistics.py Outdated Show resolved Hide resolved
api/auth.py Show resolved Hide resolved
api/cruds/game.py Outdated Show resolved Hide resolved
api/cruds/game.py Outdated Show resolved Hide resolved
api/cruds/kyoku.py Outdated Show resolved Hide resolved
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between 8af4ed8 and e77055c.
Files selected for processing (4)
  • api/routers/dataset.py (1 hunks)
  • api/routers/game.py (1 hunks)
  • api/routers/kyoku.py (1 hunks)
  • api/routers/statistics.py (1 hunks)
Files skipped from review as they are similar to previous changes (4)
  • api/routers/dataset.py
  • api/routers/game.py
  • api/routers/kyoku.py
  • api/routers/statistics.py

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between e77055c and 6e252ea.
Files selected for processing (6)
  • api/cruds/dataset.py (1 hunks)
  • api/cruds/game.py (1 hunks)
  • api/cruds/kyoku.py (1 hunks)
  • api/cruds/statstics.py (1 hunks)
  • main.py (1 hunks)
  • requirements.txt (1 hunks)
Files skipped from review as they are similar to previous changes (6)
  • api/cruds/dataset.py
  • api/cruds/game.py
  • api/cruds/kyoku.py
  • api/cruds/statstics.py
  • main.py
  • requirements.txt

@kackyt kackyt merged commit bb03c3a into main Feb 9, 2024
@kackyt kackyt deleted the feature/firststep-app branch February 9, 2024 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant