Feature Request: Tests filters in pipeline
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 28/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 領域
- testing
調査の方向性
まず、OpenTabletDriver.Plugin/Output/OutputMode.cs の62~90行付近を読んで、PipelinePosition がフィルターの挿入をどのように制御するかを理解してください。最初に 0.6.x のテスト方針を定め、その後、未消費の IDeviceReports と無効な PipelinePosition 値を対象にしつつ、0.5.x API のカバレッジを大幅に拡張しないようにしてください。
索引モデルが issue の本文から書いたものです。
説明
The OpenTabletDriver 0.6.x plugin pipeline has edge cases that can cause filter plugins to incorrectly drop reports.
For plugins with filters targeting the 0.6.x plugin API the following tests should be done.
Plugins targeting earlier API's like 0.5.x should preferably not be covered if it significantly increases the amount of code to maintain.
It is unclear how to implement these tests properly. I currently have 2 ideas:
- Have a separate repository that can be targeted as a GitHub action, that tests the filter in a virtual pipeline, which could be used to test pull requests on this repository in some way.
- Driver gets a "Plugin Developer" mode that would actively check active filters for these issues - this would help plugin developers from making these mistakes unintentionally.
While outside of the scope of this issue, future driver plugin API's should preferably be designed in a way that removes these necessary tests.
Minimum Test Coverage
At the very minimum, the tests should check for the following
Properly passes through IDeviceReports
Some filters incorrectly only pass through ITabletReports. Normal filters should ensure Consume(IDeviceReport) runs Emit?.Invoke(). Async filters should ensure ConsumeState() runs OnEmit() (or Emit?.Invoke()) on unconsumed reports.
Sets a PipelinePosition that isn't PreTransform or PostTransform (or an alias)
Currently, the driver only links filters that have a PipelinePosition with one of the above values as seen here:
https://github.com/OpenTabletDriver/OpenTabletDriver/blob/aa345e5b7365647f25c8651f3e35fb7dd4c13676/OpenTabletDriver.Plugin/Output/OutputMode.cs#L62-L90
This means that a PipelinePosition of e.g. 0 would result in the filter never being inserted into the pipeline.
If you think of anything else that would be worth testing for, please let us know here.
- 主要言語
- Shell
- スター
- 9
- フォーク
- 39
- 平均マージ
- 2日 13分
- マージ済み PR(30日)
- 4
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenTabletDriver/Plugin-Repository のほかの issue
-
Add simple PR testsオープンenhancement
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
OpenTabletDriver/Plugin-Repository#77 · コメント 4 件 ·
OpenTabletDriver/Plugin-Repository の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
aws-samples/appmod-blueprints#972 ·
メンテナーはふだん 1 日以内に返信
-
status:needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
out-of-date
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
CachyOS/CachyOS-PKGBUILDS#1965 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Sorogate/example-consumer#14 ·