ManageIQ / ManageIQ/optimist

Add general constraint handling that can be the basis of depends/conflicts/either

Open
#131 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
Ruby
Stars
259
Forks
35
PR merge metrics
No merged PRs in 30d

Description

From https://github.com/ManageIQ/optimist/pull/130#issuecomment-1100475979, @nanobowers wrote:
> This seems like a specialization of a more general type of argument validation.
>
> More specifically, the condition you are trying to satisfy with either: is max==1 and min==1. Should we entertain cases where min/max are not 1? conflicts: is kinda like max==1 and min==ANY
>
> Was thinking something along the lines of:
>
> ```ruby
> validate min: , max: , args:
> ```

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 with PR #130 and the linked issue comment, then inspect how depends, conflicts, and either are represented in Optimist. Define and document a general validation interface that accepts min, max, and argument symbols, with tests showing it can support those constraint types.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.