From 4392a958320bdc0f8b15b6711aba8481b1a3ed44 Mon Sep 17 00:00:00 2001 From: Levy-Naibei Date: Wed, 25 Nov 2020 22:00:49 +0300 Subject: [PATCH 1/2] test --- search_answers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/search_answers.py b/search_answers.py index b123aec..a36c685 100644 --- a/search_answers.py +++ b/search_answers.py @@ -24,6 +24,7 @@ def __init__(self,error_list): #error_message is a list of errors self.error_list=error_list self.error_message=' '.join(error_list) + # self.error_message='unsupported operand type(s) for int and str' def get_question_id(self): """ From d08f4dcf95e71a4d1e29a8621df5ebf2f0aedf1e Mon Sep 17 00:00:00 2001 From: Levy-Naibei Date: Thu, 26 Nov 2020 11:39:35 +0300 Subject: [PATCH 2/2] chore: published cli package --- .gitignore | 105 +++++++++++++++++++++++++++++++++++++++++++++++ README.md | 5 +++ __init__.py | 0 cli.py | 1 + requirements.txt | 22 ++++++++++ setup.py | 50 ++++++++++++++++++++++ 6 files changed, 183 insertions(+) create mode 100644 __init__.py create mode 100644 setup.py diff --git a/.gitignore b/.gitignore index 8cb07aa..aa020bc 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,108 @@ __pycache__ .vscode #csv file g4g.csv + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ \ No newline at end of file diff --git a/README.md b/README.md index d43b1b1..e62f343 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,11 @@ To get access to AskFlow, follow these steps: AskFlow will detect errors and will return answers accordingly. +# Published Package in PyPI + +- Install AskFlow CLI from [Live AskFlow-CLI](https://pypi.org/project/AskFlow-CLI/1.0.0/) +- To test AskFlow install from [AskFlow Test package](https://test.pypi.org/project/AskFlow-CLI/) + ## Extra Features To navigate between the answers diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/cli.py b/cli.py index a6380f5..d920454 100644 --- a/cli.py +++ b/cli.py @@ -12,6 +12,7 @@ __author__ = "Team 2 Sprint-4" @click.group() +@click.version_option("1.0.0") def main(): """ CLI for querying StackExchange API diff --git a/requirements.txt b/requirements.txt index ef55ff6..b043db1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,34 @@ +AskFlow-CLI==1.0.0 beautifulsoup4==4.9.3 +bleach==3.2.1 certifi==2020.11.8 +cffi==1.14.4 chardet==3.0.4 click==7.1.2 colorama==0.4.4 +cryptography==3.2.1 +docutils==0.16 idna==2.10 +importlib-metadata==3.1.0 +jeepney==0.6.0 +keyring==21.5.0 +packaging==20.4 +pkginfo==1.6.1 +pycparser==2.20 pyfiglet==0.8.post1 +Pygments==2.7.2 +pyparsing==2.4.7 python-dotenv==0.15.0 +readme-renderer==28.0 requests==2.25.0 +requests-toolbelt==0.9.1 +rfc3986==1.4.0 +SecretStorage==3.3.0 +six==1.15.0 soupsieve==2.0.1 termcolor==1.1.0 +tqdm==4.53.0 +twine==3.2.0 urllib3==1.26.2 +webencodings==0.5.1 +zipp==3.4.0 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..c1a7e90 --- /dev/null +++ b/setup.py @@ -0,0 +1,50 @@ +from setuptools import setup, find_packages +from io import open +from os import path + +import pathlib +# The directory containing this file +HERE = pathlib.Path(__file__).parent + +# The text of the README file +README = (HERE / "README.md").read_text() + +# automatically captured required modules for install_requires in requirements.txt +with open(path.join(HERE, 'requirements.txt'), encoding='utf-8') as f: + all_reqs = f.read().split('\n') + +install_requires = [x.strip() for x in all_reqs if ('git+' not in x) and ( + not x.startswith('#')) and (not x.startswith('-'))] +dependency_links = [x.strip().replace('git+', '') for x in all_reqs \ + if 'git+' not in x] + +setup ( + + name = 'AskFlow CLI', + description = 'AskFlow is a command line tool for automating debugging your code.\ + This CLI allows you to search StackOverflow for answers to \ + errors in your code without ever leaving the terminal.', + version = '1.0.0', + packages = find_packages(), # list of all packages + install_requires = install_requires, + python_requires='>=2.7', # any python greater than 2.7 + entry_points=''' + [console_scripts] + AskFlow=AskFlow.cli:main + ''', + author="Team 2 - Sprint #4", + keyword="AskFlow CLI, automatic code debug stackoverflow", + long_description=README, + long_description_content_type="text/markdown", + license='MIT', + url='https://github.com/yashika51/AskFlow', + download_url='https://github.com/yashika51/AskFlow/archive/1.0.0.tar.gz', + dependency_links=dependency_links, + author_email='levynaibei2@gmail.com', + classifiers=[ + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + ] +) \ No newline at end of file