Skip to content

Add warnings when number of cards is 0, and other edge cases #397

@andymeneely

Description

@andymeneely

Is your feature request related to a problem? Please describe.

It took me forever to realize I hadn't filled ou the qty field in my CSV, so it was returning a zero-sized dataframe. I wish Squib had warned me of this.

Describe the solution you'd like

  • When Squib::Deck.new(cards: 0) happens, send a warning that it's a zero-sized deck. Make it so you can suppress that warning in the config file if you want, but it's on by default. Also, if it's 0, don't execute the body either.
  • If we're doing quantity explosion for csv and xlsx, check that there's at least one number greater than 0 in the entire data. If not, raise an error with a helpful message.
  • If csv and xlsx is about to return a zero-sized data frame, print a warning. Make it the same warning setting as above in the config file.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions