Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Feature Request: Tests filters in pipeline

Ouverte
#138 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
28/100
Type d'issue
Fonctionnalité
Clarté
À clarifier
Activité
À l'abandon
Domaine
testing

Piste de recherche

Commencez par lire OpenTabletDriver.Plugin/Output/OutputMode.cs autour des lignes 62-90 afin de comprendre comment PipelinePosition contrôle l’insertion des filtres. Définissez d’abord l’approche de test pour 0.6.x, puis couvrez les IDeviceReports non consommés et les valeurs invalides de PipelinePosition sans augmenter significativement la couverture des API de 0.5.x.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Shell
Étoiles
9
Forks
39
Merge moyen
2 j 13 min
PR mergées (30 j)
4

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de OpenTabletDriver/Plugin-Repository

Toutes les issues de OpenTabletDriver/Plugin-Repository

Issues similaires

Plus d'issues Shell/Bash

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.