Git Product home page Git Product logo

q2-mystery-stew's Introduction

q2-mystery-stew

This is a QIIME 2 plugin. For details on QIIME 2, see https://qiime2.org.

This plugin exists to define integration tests between interfaces and the framework.

q2-mystery-stew's People

Contributors

ebolyen avatar hagenjp avatar keegan-evans avatar lizgehret avatar oddant1 avatar q2d2 avatar thermokarst avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

q2-mystery-stew's Issues

Un-entry-point plugin for manual registration

This plugin should probably be registered by an interface's test-suite manually (and entry-point removed). There is an API for this, so we just need to create a public-facing factory which will generate a plugin object which can be registered. See this comment for additional motivation.

Seperate registrations by type

Currently the code smashes all of the possible types together in one large cartesian product.

We can probably get 90% of the testing power by splitting method registrations by type. So for each type-class, we would have a single-param test for the "happy path", and then some sample of combinations from #4 for different combinations.

A non-exhaustive list of edge cases I am used to dealing with interfaces are listed below:

  1. An action that takes only parameters
  2. An action with parameter predicates
  3. An action which generates multiple outputs
  4. Visualizations from only parameters (usually metadata)
  5. Metadata....
  6. Multiple metadata inputs
  7. Lists/Sets of parameters
  8. Unions of inputs
  9. Unions of primitives
  10. Unions of Lists/Sets
  11. Lists/Sets of Unions
  12. TypeMap and TypeMatch

I think we can hit this if we have the following registrations:

  • Exhaustive list of single-param methods (metadata is a param). So we would have an action for each candidate type (N).
    • covers: 1, 2, 5
  • A sampled combination of 2-3 params and inputs (<<N)
    • covers: nothing unique, but should catch the same weirdness that the cartesian product would catch
  • A few manually defined multiple output registrations
    • covers: 3, expects that output logic in an interface is independent from inputs (has always been true so far...)
  • A few manually defined visualizers
    • covers: 4, expects that the input logic for visualizers are handled the same in methods (has always been true so far...)
  • A method which takes all metadata params at once.
    • covers: 6
  • Using the exhaustive list of single-params, wrap them in a List and Set (2N)
    • covers: 7
  • A few manually defined methods/visualizers with Union-ed inputs
    • covers: 8, unions of inputs are simpler because they are always the interface mechanism (artifact)
  • Unions of each pairwise combination of parameters (N x N)
    • covers: 9
  • A sampled combination of 3 params in Union (<<NxN)
    • covers: 9
  • Unions of each pairwise combination of Set/List-ed parameters (N x N)
    • covers: 10
  • Lists and Sets of the sampled Unions (2(<<NxN))
    • covers: 11

... I am ignoring TypeMap for the moment.


I think a nice way to approach this would be to turn each of these into generators which can be consumed by other generators, allowing us to do wrapping and products as needed using the same overall interface. This also prevents any of the combinatorics from occurring before requested as generators are lazily evaluated.

Also, I kind of expect a reasonable split would be testing 1-6,8 as a particular registration mode, 7 as a more advanced one, and 9-11 as a even more advanced one. So a good start would be getting 1-6,8 in shape and then moving on to 7, etc.

Support different levels of testing/initialization

It would be good to allow registrars of this plugin to choose how many test-cases are desired. This would allow quick sanity checking and iteration without spending time exhaustively running each permutation.

This could be accomplished using reservoir sampling to decide when to use a given iteration of the product.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.