diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a1d3e78 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +dist/ +rockset_stacky.egg-info/ +src/rockset_stacky.egg-info/ +build/ +src/stacky/__pycache__ diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..1bdf495 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,20 @@ +MIT License + +Copyright (c) 2023 Rockset +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index c9752a1..9a206e8 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,25 @@ ## Installation +### Pip +``` +pip3 install rockset-stacky +``` + +### Manual `stacky` requires the following python3 packages installed on the host 1. asciitree 2. ansicolors 3. simple-term-menu ``` -sudo pip3 install asciitree ansicolors simple-term-menu +pip3 install asciitree ansicolors simple-term-menu ``` -Stacky doesn't use any git or Github APIs. It expects `git` and `gh` cli commands to work and be properly configured. For instructions on installing the github cli `gh` please read their [documentation](https://cli.github.com/manual/). -After which `stacky` can be directly run with `./stacky`. We would recommend symlinking `stacky` into your path so you can use it anywhere +After which `stacky` can be directly run with `./src/stacky/stacky.py`. We would recommend symlinking `stacky.py` into your path so you can use it anywhere + + +## Accessing Github +Stacky doesn't use any git or Github APIs. It expects `git` and `gh` cli commands to work and be properly configured. For instructions on installing the github cli `gh` please read their [documentation](https://cli.github.com/manual/). ## Usage `stacky` stores all information locally, within your git repository @@ -138,23 +147,4 @@ $> stacky commit -m "updated new file" ``` ## License -MIT License - -Copyright (c) 2023 Rockset -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the “Software”), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +- [MIT License](https://github.com/rockset/stacky/blob/master/LICENSE.txt) diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..535bf12 --- /dev/null +++ b/setup.py @@ -0,0 +1,35 @@ +from setuptools import setup, find_packages +import pathlib + +here = pathlib.Path(__file__).parent.resolve() + +# Get the long description from the README file +long_description = (here / "README.md").read_text(encoding="utf-8") + +setup( + name="rockset-stacky", + version="1.0.10", + description=""" + stacky is a tool to manage stacks of PRs. This allows developers to easily + manage many smaller, more targeted PRs that depend on each other. + """, + long_description=long_description, + long_description_content_type="text/markdown", + url="https://github.com/rockset/stacky", + author="Rockset", + author_email="tudor@rockset.com", + keywords="github, stack, pr, pull request", + package_dir={"": "src"}, + packages=find_packages(where="src"), + python_requires=">=3.8, <4", + install_requires=["asciitree", "ansicolors", "simple-term-menu"], + entry_points={ + "console_scripts": [ + "stacky=stacky:main", + ], + }, + project_urls={ + "Bug Reports": "https://github.com/rockset/stacky/issues", + "Source": "https://github.com/rockset/stacky", + }, +) \ No newline at end of file diff --git a/src/stacky/__init__.py b/src/stacky/__init__.py new file mode 100644 index 0000000..f899f99 --- /dev/null +++ b/src/stacky/__init__.py @@ -0,0 +1,4 @@ +from .stacky import main + +def runner(): + main() \ No newline at end of file diff --git a/stacky b/src/stacky/stacky.py similarity index 97% rename from stacky rename to src/stacky/stacky.py index ee8424e..26c1a0b 100755 --- a/stacky +++ b/src/stacky/stacky.py @@ -1,26 +1,4 @@ #!/usr/bin/env python3 - -# MIT License - -# Copyright (c) 2023 Rockset -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the “Software”), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: - -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. - -# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - # GitHub helper for stacked diffs. # # Git maintains all metadata locally. Does everything by forking "git" and "gh"