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

[FEATURE REQUEST] Simple Command Line Interface ~~ hang ~~ #71

Closed
rcgalbo opened this issue May 30, 2019 · 3 comments
Closed

[FEATURE REQUEST] Simple Command Line Interface ~~ hang ~~ #71

rcgalbo opened this issue May 30, 2019 · 3 comments
Labels
enhancement New feature or request Resolved

Comments

@rcgalbo
Copy link

rcgalbo commented May 30, 2019

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when

I want to use hanger (hang) at the terminal!

Describe the solution you'd like

I would like

~> hang commit -m "update the training set"
~> hang merge < branches-of-interest>

Describe alternatives you've considered

Additional context

there are many simple cli for python. even the base cli tool making should be sufficient to not require any dependencies. I have no issue completing this myself in a new branch. Most likely could do so this afternoon with mild coaching. is there a slack or discord i should be aware of?

@rcgalbo rcgalbo added the enhancement New feature or request label May 30, 2019
@rlizzo
Copy link
Member

rlizzo commented May 31, 2019

Hi Rick,

Thanks for the comment!

Hangar actually already includes a working (though very limited) CLI as of the latest (0.1.1) release. This should be working for both source builds & installations via pip / conda. You should be able to just run:

   $ hangar --help

from the command line to see the current abilities.

As you've noticed, we haven't included any user-facing documentation of this feature. This is because it's not yet feature complete, nor is it under test-coverage. That said I use it fairly frequently without issue, and the design of Hangar makes the potential for bugs in this area fairly limited. What's there should be fully functional, but it's just not ready for general use.

It would actually be really simple to flesh out the rest of the pertinent commands (commit, merge, force-release-writer-lock), which would actually make it useful. You can check out the CLI code in it's entirety in this file (it's really short):

https://github.com/tensorwerk/hangar-py/blob/master/src/hangar/cli.py

As you'll see, the commands are just click decorated functions which make calls straight to the same top level Repository class methods which are used in the programatic API. The Repository class is the entrance point for every user interaction with Hangar, no change required if it's on the command line . If you're curious, the Repository class defined in the following file:

https://github.com/tensorwerk/hangar-py/blob/master/src/hangar/repository.py

(Please excuse how ugly the fetch/push/clone methods are right now, the entire remote client / server implementation is about to undergo a major refactor in the next week or two; it'll be ready for the prime time in v0.2 when we squash a few outstanding bugs and introduce partial clones).

If you're interested in helping us out, we'd love the contribution in this area. I'm happy to help in any way I can!

Also, I just now created a Slack channel for hangar users. Feel free to join via This Invite Link

Best,
Rick

@rlizzo
Copy link
Member

rlizzo commented Jul 19, 2019

Hi @rgalbo, this has been updated in #85, there is not a commit or merge option. It is on the TODO list however.

Just wanted to provide you with an update.

@rlizzo
Copy link
Member

rlizzo commented Aug 9, 2019

Will close after #103 is merged!

@rlizzo rlizzo closed this as completed Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Resolved
Projects
None yet
Development

No branches or pull requests

2 participants