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

マインクラフト出力設定をGUIに追加 #554

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

nokonoko1203
Copy link
Collaborator

Close #538

Description(変更内容)

  • Minecraft SinkをGUIから指定できるようにしました。
  • 座標系はMinecraft Sinkの中でUTMに変換されますが、Transform Stageでは4979に変換されることを想定しているので、「WGS 84 (EPSG:4979)」のような記載にしました。

Manual Testing(手動テスト)

Not required / 不要

@nokonoko1203 nokonoko1203 requested a review from ciscorn June 3, 2024 02:54
@nokonoko1203 nokonoko1203 marked this pull request as ready for review June 3, 2024 02:55
Copy link

coderabbitai bot commented Jun 3, 2024

Walkthrough

この変更は、マインクラフト形式(.mcaフォルダ)の出力をGUIに追加するためのものです。座標系の変換やマッピングルールの指定はできないように制限されています。

Changes

ファイルパス 変更内容
app/src-tauri/src/main.rs minecraft::MinecraftSinkProviderの追加とselect_sink_provider関数へのオプション追加
app/src/lib/settings.ts filetypeOptions定数にマインクラフトのエントリを追加

Sequence Diagram(s) (Beta)

sequenceDiagram
    participant User
    participant GUI
    participant MinecraftSinkProvider
    participant FileSystem

    User->>GUI: マインクラフト形式で出力を選択
    GUI->>MinecraftSinkProvider: 出力形式の確認
    MinecraftSinkProvider->>FileSystem: .mcaフォルダの出力
    FileSystem-->>MinecraftSinkProvider: 出力完了
    MinecraftSinkProvider-->>GUI: 出力完了通知
    GUI-->>User: 出力完了メッセージ
Loading

Assessment against linked issues

Objective Addressed Explanation
GUIでマインクラフト形式への変換(.mcaを含むフォルダの出力) (#538)
座標系は変換できないようにグレーアウト (#538)
マッピングルールも指定できないようにする (#538)
出力はフォルダで出力されるようにする (#538)

Poem

変換の風が吹き抜ける、
マインクラフトの地へと行く。
グレーアウトされた座標系、
マッピングルールもお休みさ。
フォルダの中に夢が詰まる、
新しい冒険、始まるよ!


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 testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • 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 testing code 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 and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @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.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@nokonoko1203 nokonoko1203 enabled auto-merge (squash) June 3, 2024 02:55
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.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 2c2c1df and 4b99b50.

Files selected for processing (2)
  • app/src-tauri/src/main.rs (2 hunks)
  • app/src/lib/settings.ts (1 hunks)
Additional context used
Learnings (1)
app/src-tauri/src/main.rs (3)
User: satoshi7190
PR: MIERUNE/plateau-gis-converter#528
File: nusamai/src/sink/minecraft/mod.rs:108-348
Timestamp: 2024-05-27T15:02:46.017Z
Learning: In the `MinecraftSinkProvider` implementation, avoid splitting the `run` method itself; instead, extract parts of its logic into separate functions.
User: satoshi7190
PR: MIERUNE/plateau-gis-converter#528
File: nusamai/src/sink/minecraft/mod.rs:28-60
Timestamp: 2024-05-27T04:16:29.608Z
Learning: In the `MinecraftSinkProvider` implementation, replace `unwrap` with proper error handling using `match` to avoid potential panics.
User: satoshi7190
PR: MIERUNE/plateau-gis-converter#528
File: nusamai/src/sink/minecraft/mod.rs:53-59
Timestamp: 2024-05-28T02:47:34.897Z
Learning: In the `MinecraftSinkProvider` implementation, the usage of `unwrap` is consistent with other sink implementations in the codebase.
Additional comments not posted (2)
app/src/lib/settings.ts (1)

127-130: Minecraftの拡張子が空ですが、これは意図的ですか?もし意図的でない場合は、適切な拡張子(例:.mcworld, .mctemplate)を追加することをお勧めします。

app/src-tauri/src/main.rs (1)

118-118: MinecraftSinkProviderの追加はPRの目的に沿っています。ただし、以前の学習から、エラーハンドリングとメソッドの複雑さに関する問題が指摘されています。適切なエラーハンドリングを確保し、必要に応じてメソッドの複雑さを管理することをお勧めします。

Copy link
Member

@ciscorn ciscorn left a comment

Choose a reason for hiding this comment

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

lgtm!

Copy link

codecov bot commented Jun 3, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Files Patch % Lines
app/src-tauri/src/main.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
Components Coverage Δ
GUI 0.00% <0.00%> (ø)
Backend ∅ <ø> (∅)
Libraries 95.53% <ø> (+5.67%) ⬆️

📢 Thoughts on this report? Let us know!

@nokonoko1203 nokonoko1203 merged commit f2fefce into main Jun 3, 2024
6 of 8 checks passed
@nokonoko1203 nokonoko1203 deleted the feature/gui-minecraft branch June 3, 2024 03:06
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.

GUI: マインクラフト出力を追加する
2 participants