You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 1, 2022. It is now read-only.
name: pdbman
version: "0.1"
author: Me
about: Does stuff
settings: [DeriveDisplayOrder, ArgRequiredElseHelp, ColoredHelp, ColorAlways]
# - UnifiedHelpMessage
# - DeriveDisplayOrder
args:
- INPUT:
about: Name of PDB file
required: true
- Query:
about: Query mode
long: query
short: Q
- Analyze:
about: Analysis mode
long: analyze
short: Y
- Add:
about: Add mode
long: add
short: A
- Remove:
about: Remove mode
long: remove
short: R
- Residues:
about: Residue mode
long: residues
short: r
- Atoms:
about: Atom mode
long: atoms
short: t
- Sidechain:
about: Use only sidechains of protein
long: sidechain
short: d
requires:
- Residues
- Backbone:
about: Use only backbones of protein
long: backbone
short: b
requires:
- Residues
- QM1:
about: QM1 region
long: qm1
short: q
- QM2:
about: QM1 region
long: qm2
short: o
- Active:
about: Active revion
long: active
short: a
- Infile:
about: File for list input
long: file
short: f
takes_value: true
- List:
about: Command line list
long: list
short: l
takes_value: true
multiple: true
use_delimiter: true
- Sphere:
about: Calculate sphere around atom. Requires Atom ID and radius in A as arguments.
long: sphere
short: s
takes_value: true
min_values: 2
max_values: 2
conflicts_with:
- Sidechain
- Backbone
- Outfile:
about: Name of PDB output file
long: outfile
short: e
takes_value: true
- Overwrite:
about: Overwrite input PDB file
long: overwrite
short: w
groups:
- mode:
args: [Query, Analyze, Add, Remove]
required: true
- partial:
args: [Sidechain, Backbone]
- target:
args: [Atoms, Residues]
- region:
args: [QM1, QM2, Active]
- source:
args: [File, List, Sphere]
- output:
args: [Outfile, Overwrite]
Steps to reproduce the bug with the above code
Use this .yaml for any command line parsing.
Actual Behaviour
When calling the binary like pdbman -QY it fails with error: The argument '--query' cannot be used with '--analyze'. However the same is not true if I call multiple arguments from other groups like so: pdbman -Aqo or pdbman -Qrt. These commands run without error. It appears that only the args from the topmost group in the YAML file are recognized as being mutally exclusive. I verified this by changing their order.
Expected Behaviour
I would expect a command calling arguments from the same group to also fail with this: error: The argument '--residues' cannot be used with '--atoms' if they belong to the same group.
Additional Context
No response
Debug Output
No response
The text was updated successfully, but these errors were encountered:
Comment by DocKDE Friday Mar 12, 2021 at 20:37 GMT
I updated the section for expected and actual behaviour. Although I must add I'm not sure what you mean by failing commands and debug output. My issue is precisely that there is no failing command when I expected it so there's no debug output I can post.
Issue by DocKDE
Friday Mar 12, 2021 at 16:01 GMT
Originally opened as clap-rs/clap#2409
Please complete the following tasks
Rust Version
1.50.0
Clap Version
3.0.0-beta.2
Minimal reproducible code
Steps to reproduce the bug with the above code
Use this .yaml for any command line parsing.
Actual Behaviour
When calling the binary like
pdbman -QY
it fails witherror: The argument '--query' cannot be used with '--analyze'
. However the same is not true if I call multiple arguments from other groups like so:pdbman -Aqo
orpdbman -Qrt
. These commands run without error. It appears that only the args from the topmost group in the YAML file are recognized as being mutally exclusive. I verified this by changing their order.Expected Behaviour
I would expect a command calling arguments from the same group to also fail with this:
error: The argument '--residues' cannot be used with '--atoms'
if they belong to the same group.Additional Context
No response
Debug Output
No response
The text was updated successfully, but these errors were encountered: