-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve the CLI's documentation of the remap
subcommand
#89
Comments
The primary purpose of You can find an example here: What it does is to completely ignore whatever bin limits you previously set, and apply new ones, based on a cartesian product. In the case above, '116,150,200,...;0,0.2,0.4,...' produces the two-dimensional bin limits in the following order:
The pipe
By default where only the bin width for the first ( Finally, you can use |
remap
subcommand of the CLI
remap
subcommand of the CLIremap
subcommand
Maybe @cschwan it might be an idea to extend CLI help with examples, at some point. It's fine that help is the only docs for a CLI (unless you want to write a You could also consider to add a couple to https://tldr.sh/ |
Commit 25fc84a adds additional documentation and even a few basic examples. Let me know what you think! |
Sorry not to have replied before. It looks good, just a small observation:
|
The commit probably doesn't belong to any branch because I've merged it; what is being duplicated, where is the discussion? |
The duplication is simply in the test: since you edited the message, you had to duplicate the string in the test. |
I think the main Issue here has been addressed, therefore I'll close it. |
|
Thanks for reviewing it, @felixhekhorn! The |
fine! the operations is to be read as "OR" ... maybe you could give this specific example? |
What I understand is that the documentation needs to improved for I wouldn't call the
there must be |
You can also think of
but the bins of rapidity depend on the invariant mass and the angle (the previous dimensions). The further you go away from the Z peak at roughly 90.0 and the more extreme the angle is, the more rapidity bins are 'cut out' of the cartesian product 'cube'. |
I'm still missing something: in the example there is written
so I get that the Later on, there is the other example on syntactic sugar for repetition:
but in the case there are 2 bins in the first dimension (before I'm confused, I'd have expected something like |
About the (Very recently they started using that operator even in the context of types, like in Typescript, but the one for actual sets existed at least from 3.0, if not before...) |
You're right, the example is clearly wrong, good job for spotting the mistake! |
That was actually what I was thinking about: "OR" in a bitwise sense, really meaning UNION (as implemented in C).
however, as @cschwan said, this is not really what the operator is doing ... "THEN" would be a better name, if I understood correctly
|
and this should really be mentioned in the docs |
I guess there is no default name for that operator. @cschwan actually needs a separator further than Most likely For me, the three good ones are EDIT: of course I forgot |
The operator |
Yeah, compare to other choices |
I'd say |
Commit f90f3ca improves the description. Please let me know what you think. |
Definitely better. Maybe we can improve even more? How much white space or space in general can we use? how about going more into actual Python doc syntax?
|
For me, it's perfect: the concept is a bit tough, but there is nothing we can do, except explaining as good as possible, and I'd say it's well explained. Unfortunately now it's a whole bunch of text, so I'd like to have more formatting options (like markdown) to make it more readable. |
Separating the examples from the description is a very good idea and formatting it better also. As far as I understand the text is simply dumped after the help, but I'm looking into it the clap documentation to see if there's anything better... |
I already had a look some weeks ago, but that's all they offer (and as you said it's simply a print after the generated help, or before with the partner function). |
that might actually be the best option ... since online we can have infinite format PS: and it would solve the duplication issue 🙃 |
Duplication issue still remains, because it was mainly testing the part generated by |
We probably want this: clap-rs/clap#2389. I can try the |
I believe we already got something pretty good, what do you think is still missing for this? @cschwan We could do a much better job if The other option of documenting |
@alecandido I agree, let's close this Issue. |
To continue the APPL comparison I will need to renormalize the grids - I saw that the
remap
command seems to be able to do such a thing, but I don't know how to use it; i.e. what is the "remap string" - can you provide us with an example?The text was updated successfully, but these errors were encountered: