Code Monkey home page Code Monkey logo

Comments (7)

Roger-luo avatar Roger-luo commented on June 27, 2024

yes, there are only two columns at the moment.

from comonicon.jl.

MilesCranmer avatar MilesCranmer commented on June 27, 2024

Sorry what I meant is the vertical spacing – seems to have a lot of space between each argument (especially at the top):

Compared to a regular man page:

Screenshot 2024-04-25 at 17 31 12

and, e.g., julia itself:

Screenshot 2024-04-25 at 17 31 32

from comonicon.jl.

Roger-luo avatar Roger-luo commented on June 27, 2024

you mean no space between commands? Or there is double space before Usage?

from comonicon.jl.

MilesCranmer avatar MilesCranmer commented on June 27, 2024

Right now it gets printed like this:

  benchpkg



Usage

  benchpkg <args> [options] [flags]

Args

  [package_name]                                            Name of the package. If not given, will be inferred.



Options

  -r, --rev <arg>                                           Revisions to test (delimit by comma). Use dirty to
                                                            benchmark the current state of the package at path
                                                            (and not a git commit). If not given, will be inferred based
                                                            on context.

  -o, --output-dir <arg>                                    Where to save the JSON results.

  -s, --script <arg>                                        The benchmark script. Default:
                                                            benchmark/benchmarks.jl downloaded from
                                                            stable.

  -e, --exeflags <arg>                                      CLI flags for Julia (default: none).

  -a, --add <arg>                                           Extra packages needed (delimit by comma).

  --url <arg>                                               URL of the package.

  --path <arg>                                              Path of the package.

  --bench-on <arg>                                          If the script is not set, this specifies the revision at
                                                            which to download benchmark/benchmarks.jl from the
                                                            package.

  -f, --filter <arg>                                        Filter the benchmarks to run (delimit by comma).

  --nsamples-load-time <arg>                                Number of samples to take when measuring load time of the
                                                            package (default: 5). (This means starting a Julia process
                                                            for each sample.)



Flags

  --tune                                                    Whether to run benchmarks with tuning (default: false).

  -h, --help                                                Print this help message.
  --version                                                 Print version.

I would like it to get printed as this:

  benchpkg

Usage
  benchpkg <args> [options] [flags]

Args
  [package_name]                                            Name of the package. If not given, will be inferred.

Options
  -r, --rev <arg>                                           Revisions to test (delimit by comma). Use dirty to
                                                            benchmark the current state of the package at path
                                                            (and not a git commit). If not given, will be inferred based
                                                            on context.
  -o, --output-dir <arg>                                    Where to save the JSON results.
  -s, --script <arg>                                        The benchmark script. Default:
                                                            benchmark/benchmarks.jl downloaded from
                                                            stable.
  -e, --exeflags <arg>                                      CLI flags for Julia (default: none).
  -a, --add <arg>                                           Extra packages needed (delimit by comma).
  --url <arg>                                               URL of the package.
  --path <arg>                                              Path of the package.
  --bench-on <arg>                                          If the script is not set, this specifies the revision at
                                                            which to download benchmark/benchmarks.jl from the
                                                            package.
  -f, --filter <arg>                                        Filter the benchmarks to run (delimit by comma).
  --nsamples-load-time <arg>                                Number of samples to take when measuring load time of the
                                                            package (default: 5). (This means starting a Julia process
                                                            for each sample.)
Flags
  --tune                                                    Whether to run benchmarks with tuning (default: false).
  -h, --help                                                Print this help message.
  --version                                                 Print version.

To save on vertical space.

from comonicon.jl.

Roger-luo avatar Roger-luo commented on June 27, 2024

The proposed format here looks too dense to me when the description is long, it's hard to tell which text belong to which option, which was why I put space in between, so it's not a bug it's a feature... I'm OK with having an option to turn this on/off. But I currently don't have the capacity to work on it. I'm preparing my defense. It shouldn't be too hard to add it here: https://github.com/comonicon/Comonicon.jl/blob/main/src/ast/printing.jl#L51

from comonicon.jl.

MilesCranmer avatar MilesCranmer commented on June 27, 2024

it's hard to tell which text belong to which option

I agree with that – I think it would also be nice to reduce the margin in the middle. See the Julia help menu:

image

It's nice because (a) it fits in my terminal window, and (b) you can still associate text and options.

from comonicon.jl.

Roger-luo avatar Roger-luo commented on June 27, 2024

yeah, it's prob because the two columns are too far. I agree with that.

from comonicon.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.