Skip to content
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

Introduce con-duct "gateway" entrypoint for subcommands #122

Closed
yarikoptic opened this issue Aug 9, 2024 · 8 comments · Fixed by #164
Closed

Introduce con-duct "gateway" entrypoint for subcommands #122

yarikoptic opened this issue Aug 9, 2024 · 8 comments · Fixed by #164
Assignees

Comments

@yarikoptic
Copy link
Member

yarikoptic commented Aug 9, 2024

just an idea: previously we mentioned establishing duct-suite but now that we have it as con-duct on pypi and con_duct python module, it should just be con-duct CLI...

This way, eventually, someone could even come up with con frontend to all con-* tools if we follow's git's approach of git- prefix and just taking any git-blah into git blah ;-)

WDYT @asmacdo !

  • con-duct is made available in default lean installation, although sub-commands (to function) might require additional components
    • should provide listing of those commands (click library does that for you)
    • @yarikoptic thinks that by default those commands should be available and if executed but requiring an external (e.g. matplotlib) they should error out and announce that.
      • Very weak may be: con-duct --help listing of those commands could mention what those dependencies are and/or either they are installed.
  • (may be) Make duct == con-duct run so it is nicely visible in con-duct --help which would list the commands
  • (later) Make con-duct "dynamically extensible" similarly to how either git or datalad do it
    • git blah is picking up any git-blah in PATH (after considering built-ins under /usr/lib/git-core).
      • called by some "command dispatcher pattern" (and makes analogies to GoF's Mediator pattern)
      • since CLI, defines protocols for git-remote-* etc helpers
      • similarly git-annex defines protocol for git-annex-remote- helpers, but AFAIK does not extend git annex COMMAND namespace
    • datalad uses Python entry points under the common prefix (datalad.) and conventions for interfaces to define in its "datalad-extensions"
@asmacdo
Copy link
Member

asmacdo commented Aug 9, 2024

just to be clear, you're thinking duct entrypoint is con-duct on pypi, and con-duct entry point is the renderer? I think thats kind of confusing if thats what you meant.

@yarikoptic
Copy link
Member Author

con-duct to be the entry point for further commands such as where I have already mentioned duct-suite:

@asmacdo
Copy link
Member

asmacdo commented Aug 12, 2024

so it would look like:

 pip install con-duct[minimal]
 duct sleep 1
 
 pip install con-duct[full]
 con-duct render usage.json
`

@yarikoptic
Copy link
Member Author

yeap, it could indeed. moreover [minimal] is just the default list of requirements (i.e. none)

@asmacdo
Copy link
Member

asmacdo commented Aug 12, 2024

Thanks @yarikoptic. if its all under a single python package, why not stick with a single top level entry point?

@yarikoptic
Copy link
Member Author

In principle could be duct and then duct run for is current purpose but then it becomes even more mouthful to specify it: datalad run ... duct run ...

@asmacdo
Copy link
Member

asmacdo commented Aug 12, 2024

Ah ok, im with you now. The point is to avoid subcommands in duct, since it wouldn't play nice with the inner command positional argument.

@yarikoptic yarikoptic changed the title make it con-duct not duct-suite Introduce con-duct "gateway" entrypoint for subcommands Aug 14, 2024
asmacdo added a commit to asmacdo/duct that referenced this issue Aug 22, 2024
asmacdo added a commit to asmacdo/duct that referenced this issue Aug 22, 2024
@asmacdo
Copy link
Member

asmacdo commented Sep 3, 2024

Also inspect #173

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants