From 8ae70beec9761b800f959c3509415dc1265f6f36 Mon Sep 17 00:00:00 2001 From: Yashwanth Nannapaneni Date: Wed, 8 Nov 2023 22:06:20 +0000 Subject: [PATCH 1/3] Adding files needed for distribution --- .gitignore | 2 ++ LICENSE.txt | 20 ++++++++++++++++++++ README.md | 6 ++++++ setup.py | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE.txt create mode 100644 setup.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..db555c0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +dist/ +rockset_stacky.egg-info/ 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..fcfa469 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,12 @@ ## Installation +### Pip +``` +pip3 install rockset-stacky +``` + +### Manual `stacky` requires the following python3 packages installed on the host 1. asciitree 2. ansicolors diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..b2dee4c --- /dev/null +++ b/setup.py @@ -0,0 +1,34 @@ +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.8", + 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", + py_modules=["stacky"], + 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 From 104fb1a31da9154d78e3871b3fd9b2ca0a513a2c Mon Sep 17 00:00:00 2001 From: Yashwanth Nannapaneni Date: Thu, 9 Nov 2023 17:56:54 +0000 Subject: [PATCH 2/3] Adding link to license --- README.md | 20 +------------------- stacky | 22 ---------------------- 2 files changed, 1 insertion(+), 41 deletions(-) diff --git a/README.md b/README.md index fcfa469..4317380 100644 --- a/README.md +++ b/README.md @@ -144,23 +144,5 @@ $> stacky commit -m "updated new file" ``` ## License -MIT License +- [MIT License](https://github.com/rockset/stacky/blob/master/LICENSE.txt) -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/stacky b/stacky index ee8424e..26c1a0b 100755 --- a/stacky +++ b/stacky @@ -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" From 0c0ec81d81fbc3c3ee9c978b798e931d5c33b9a9 Mon Sep 17 00:00:00 2001 From: Yashwanth Nannapaneni Date: Thu, 9 Nov 2023 22:57:06 +0000 Subject: [PATCH 3/3] Fixing pip installation --- .gitignore | 3 +++ README.md | 10 ++++++---- setup.py | 5 +++-- src/stacky/__init__.py | 4 ++++ stacky => src/stacky/stacky.py | 0 5 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 src/stacky/__init__.py rename stacky => src/stacky/stacky.py (100%) diff --git a/.gitignore b/.gitignore index db555c0..a1d3e78 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ dist/ rockset_stacky.egg-info/ +src/rockset_stacky.egg-info/ +build/ +src/stacky/__pycache__ diff --git a/README.md b/README.md index 4317380..9a206e8 100644 --- a/README.md +++ b/README.md @@ -13,11 +13,14 @@ pip3 install rockset-stacky 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 @@ -145,4 +148,3 @@ $> stacky commit -m "updated new file" ## License - [MIT License](https://github.com/rockset/stacky/blob/master/LICENSE.txt) - diff --git a/setup.py b/setup.py index b2dee4c..535bf12 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name="rockset-stacky", - version="1.0.8", + 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. @@ -19,7 +19,8 @@ author="Rockset", author_email="tudor@rockset.com", keywords="github, stack, pr, pull request", - py_modules=["stacky"], + package_dir={"": "src"}, + packages=find_packages(where="src"), python_requires=">=3.8, <4", install_requires=["asciitree", "ansicolors", "simple-term-menu"], entry_points={ 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 100% rename from stacky rename to src/stacky/stacky.py