diff --git a/.gitignore b/.gitignore index 491434c..3975819 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,7 @@ __pycache__ .vercel tempCodeRunnerFile.py + +#pypi files +build +dist diff --git a/TechdocsAPI/README.md b/TechdocsAPI/README.md deleted file mode 100644 index 0af0c97..0000000 --- a/TechdocsAPI/README.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: TechdocsAPI -emoji: 🐢 -colorFrom: green -colorTo: green -sdk: docker -pinned: false ---- - -# Techdocs: A code documentation generator - -## Introduction - -**Code Documentation Generation** is a tool that generates documentation for your code. It is a simple tool that can be used by anyone who wants to generate documentation for their code. It leverages the power of **OpenAI GPT-3, Huggingface Transformers, Langchain and Clarifai** to generate documentation for your code. - -To use the application, you need to provide your code as input. The tool will analyze your code and generate documentation for it. The documentation will include comments, descriptions, parameters, return values, examples, and more. - -It is a useful tool for developers who want to document their code without spending too much time and effort. It can help you improve the readability, maintainability, and quality of your code. It can also help you share your code with others more easily. - -## Installation -> Download zip or Clone the repository and run the following command in the terminal to install the required packages. - -> We recommend using a virtual environment for the installation. - -```bash -$ git clone https://github.com/HemanthSai7/Techdocs -$ cd Techdocs -$ pip install -r requirements.txt -$ -- Run backend -$ uvicorn app:app --reload -``` - -## Tech Stack Used -![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54) -![Azure](https://img.shields.io/badge/azure_SQL-%230072C6.svg?style=for-the-badge&logo=microsoftazure&logoColor=white) -![FastAPI](https://img.shields.io/badge/FastAPI-005571?style=for-the-badge&logo=fastapi) -![Vercel](https://img.shields.io/badge/vercel-%23000000.svg?style=for-the-badge&logo=vercel&logoColor=white) -![JWT](https://img.shields.io/badge/JWT-black?style=for-the-badge&logo=JSON%20web%20tokens) -![GitHub Actions](https://img.shields.io/badge/github%20actions-%232671E5.svg?style=for-the-badge&logo=githubactions&logoColor=white) -![Streamlit](https://img.shields.io/badge/Streamlit-EA6566?style=for-the-badge&logo=streamlit&logoColor=white) -![Langchain](https://img.shields.io/badge/Langchain-F70A8D?style=for-the-badge&logo=langchain&logoColor=white) -![Clarifai](https://img.shields.io/badge/Clarifai-FFA500?style=for-the-badge&logo=clarifai&logoColor=white) - -## Team Members -| Name | Github | -| --- | --- | -| Mayuresh Agashe | [Mayuresh Agashe](https://github.com/mayureshagashe2105) | -| Hemanth Sai Garladinne | [Hemanth Sai Garladinne](https://github.com/HemanthSai7) | diff --git a/pyproject.toml b/pyproject.toml index 0054635..f8b4bac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "techdocs" -version = "0.0.1" +version = "0.1.0" description = "Code documentation generation CLI App" readme = "README.md" authors = [{ name = "Techdocs", email = "test@test.com" }] diff --git a/setup.cfg b/setup.cfg index 95ff27d..d6b71ee 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,12 +1,11 @@ [metadata] name = techdocs -version = 0.0.1 +version = 0.1.0 [options] packages = techdocs install_requires = requests - python_version >= "3.8.*" [options.entry_points] console_scripts = diff --git a/setup.py b/setup.py index 5927930..61b9baf 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,9 @@ +import setuptools from setuptools import setup setup( name='techdocs', - version='0.0.1', + version='0.1.0', # To provide executable scripts, use entry points in preference to the # "scripts" keyword. Entry points provide cross-platform support and allow # pip to create the appropriate form of executable for the target platform. @@ -11,4 +12,6 @@ 'techdocs=techdocs.cli:main' ] }, + + packages=setuptools.find_packages(), ) \ No newline at end of file diff --git a/techdocs.egg-info/PKG-INFO b/techdocs.egg-info/PKG-INFO new file mode 100644 index 0000000..f28fb76 --- /dev/null +++ b/techdocs.egg-info/PKG-INFO @@ -0,0 +1,11 @@ +Metadata-Version: 2.1 +Name: techdocs +Version: 0.1.0 +Summary: UNKNOWN +Home-page: UNKNOWN +License: UNKNOWN +Platform: UNKNOWN +License-File: AUTHORS + +UNKNOWN + diff --git a/techdocs.egg-info/SOURCES.txt b/techdocs.egg-info/SOURCES.txt new file mode 100644 index 0000000..c93490d --- /dev/null +++ b/techdocs.egg-info/SOURCES.txt @@ -0,0 +1,16 @@ +AUTHORS +README.md +pyproject.toml +setup.cfg +setup.py +techdocs/__init__.py +techdocs/cli.py +techdocs.egg-info/PKG-INFO +techdocs.egg-info/SOURCES.txt +techdocs.egg-info/dependency_links.txt +techdocs.egg-info/entry_points.txt +techdocs.egg-info/requires.txt +techdocs.egg-info/top_level.txt +techdocs/utils/__init__.py +techdocs/utils/functools.py +techdocs/utils/parse.py \ No newline at end of file diff --git a/techdocs.egg-info/dependency_links.txt b/techdocs.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/techdocs.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/techdocs.egg-info/entry_points.txt b/techdocs.egg-info/entry_points.txt new file mode 100644 index 0000000..b8e394b --- /dev/null +++ b/techdocs.egg-info/entry_points.txt @@ -0,0 +1,3 @@ +[console_scripts] +techdocs = techdocs.cli:main + diff --git a/techdocs.egg-info/requires.txt b/techdocs.egg-info/requires.txt new file mode 100644 index 0000000..f229360 --- /dev/null +++ b/techdocs.egg-info/requires.txt @@ -0,0 +1 @@ +requests diff --git a/techdocs.egg-info/top_level.txt b/techdocs.egg-info/top_level.txt new file mode 100644 index 0000000..53e49d1 --- /dev/null +++ b/techdocs.egg-info/top_level.txt @@ -0,0 +1 @@ +techdocs diff --git a/techdocs/cli.py b/techdocs/cli.py index 44be789..556ced2 100644 --- a/techdocs/cli.py +++ b/techdocs/cli.py @@ -1,4 +1,4 @@ -from utils import parse,functools +from .utils import parse,functools import argparse diff --git a/techdocs/requirements.txt b/techdocs/requirements.txt deleted file mode 100644 index e69de29..0000000 diff --git a/techdocs/utils/functools.py b/techdocs/utils/functools.py index 87bf007..f4e4dcf 100644 --- a/techdocs/utils/functools.py +++ b/techdocs/utils/functools.py @@ -1,7 +1,7 @@ import json import requests -BASE_URL = "https://hemanthsai7-techdocsapi.hf.space" +BASE_URL = "https://caffeinecrew-techdocs.hf.space" diff --git a/techdocs/utils/parse.py b/techdocs/utils/parse.py index 1defb8c..cfa55c9 100644 --- a/techdocs/utils/parse.py +++ b/techdocs/utils/parse.py @@ -1,9 +1,8 @@ import ast import os -import requests import threading -from utils.functools import * +from .functools import * # Function to extract and print the outermost nested function with line number diff --git a/testing/DBQueries.py b/testing/DBQueries.py index c388abd..8ad308f 100644 --- a/testing/DBQueries.py +++ b/testing/DBQueries.py @@ -20,6 +20,7 @@ def insert_to_database(cls, table_name: str, data: Union[Tuple, List[Tuple]], co Raises: TypeError: If the data is not a tuple or a list of tuples. """ + '\n This method is used to insert data into a specified table in the database.\n\n Args:\n table_name (str): The name of the table where the data will be inserted.\n data (Union[Tuple, List[Tuple]]): The data to be inserted into the table. It can be either a tuple or a list of tuples.\n cols (List[str], optional): A list of column names in the table. If not provided, the method will assume that all columns are required. Defaults to None.\n\n Raises:\n TypeError: If the data is not a tuple or a list of tuples.\n ' con = DBConnection.get_client() cursor = con.cursor() QUERY = f"INSERT INTO {{table_name}} ({','.join(cols)}) VALUES ".format(table_name=table_name) @@ -50,6 +51,7 @@ def fetch_data_from_database(cls, table_name: str, cols_to_fetch: Union[str, Lis Raises: - None """ + '\n This method is a class method that fetches data from a specified table in the database based on the specified\n column names and an optional WHERE clause.\n\n Args:\n - table_name (str): The name of the table from which to fetch data.\n - cols_to_fetch (Union[str, List[str]]): The column(s) to fetch from the table. If a single string, it should\n be a comma-separated list of column names.\n - where_clause (str, optional): An optional WHERE clause to filter the fetched data. Defaults to None.\n\n Returns:\n - List[tuple]: A list of tuples, where each tuple represents a row of data fetched from the database.\n\n Raises:\n - None\n ' con = DBConnection.get_client() cursor = con.cursor() if isinstance(cols_to_fetch, str):