NWChemEx / NWChemEx/PluginPlay

Bounds Check for Enum-Like Inputs

Open
#203 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
13
Forks
1
Avg merge
43m
Merged PRs (30d)
4

Description

Is your feature request related to a problem? Please describe.
It's not uncommon for modules to only accept "quantized" inputs, e.g. maybe your module uses finite-difference formulas and you've coded up the 1 and 3 point stencils. In this example the input which selects the stencil size is probably an integer, but it can only take on values of 1 and 3. With the current bounds checks there's no way to make sure the user only provided you one of those two values.

Describe the solution you'd like
Ultimately, I'd like an additional bounds check class which stores a list of approved values.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing bounds-check classes and their tests, then trace how checks are applied to module inputs. Done means an additional check accepts a configured list of approved values and rejects inputs outside that list, with coverage for both accepted and rejected values.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.