Spaces:
Runtime error
Runtime error
Merge pull request #17 from mayureshagashe2105/main
Browse files- .gitignore +4 -0
- TechdocsAPI/README.md +0 -48
- pyproject.toml +1 -1
- setup.cfg +1 -2
- setup.py +4 -1
- techdocs.egg-info/PKG-INFO +11 -0
- techdocs.egg-info/SOURCES.txt +16 -0
- techdocs.egg-info/dependency_links.txt +1 -0
- techdocs.egg-info/entry_points.txt +3 -0
- techdocs.egg-info/requires.txt +1 -0
- techdocs.egg-info/top_level.txt +1 -0
- techdocs/cli.py +1 -1
- techdocs/requirements.txt +0 -0
- techdocs/utils/functools.py +1 -1
- techdocs/utils/parse.py +1 -2
- testing/DBQueries.py +2 -0
.gitignore
CHANGED
@@ -11,3 +11,7 @@
|
|
11 |
__pycache__
|
12 |
.vercel
|
13 |
tempCodeRunnerFile.py
|
|
|
|
|
|
|
|
|
|
11 |
__pycache__
|
12 |
.vercel
|
13 |
tempCodeRunnerFile.py
|
14 |
+
|
15 |
+
#pypi files
|
16 |
+
build
|
17 |
+
dist
|
TechdocsAPI/README.md
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
---
|
2 |
-
title: TechdocsAPI
|
3 |
-
emoji: 🐢
|
4 |
-
colorFrom: green
|
5 |
-
colorTo: green
|
6 |
-
sdk: docker
|
7 |
-
pinned: false
|
8 |
-
---
|
9 |
-
|
10 |
-
# Techdocs: A code documentation generator
|
11 |
-
|
12 |
-
## Introduction
|
13 |
-
|
14 |
-
**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.
|
15 |
-
|
16 |
-
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.
|
17 |
-
|
18 |
-
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.
|
19 |
-
|
20 |
-
## Installation
|
21 |
-
> Download zip or Clone the repository and run the following command in the terminal to install the required packages.
|
22 |
-
|
23 |
-
> We recommend using a virtual environment for the installation.
|
24 |
-
|
25 |
-
```bash
|
26 |
-
$ git clone https://github.com/HemanthSai7/Techdocs
|
27 |
-
$ cd Techdocs
|
28 |
-
$ pip install -r requirements.txt
|
29 |
-
$ -- Run backend
|
30 |
-
$ uvicorn app:app --reload
|
31 |
-
```
|
32 |
-
|
33 |
-
## Tech Stack Used
|
34 |
-

|
35 |
-

|
36 |
-

|
37 |
-

|
38 |
-

|
39 |
-

|
40 |
-

|
41 |
-

|
42 |
-

|
43 |
-
|
44 |
-
## Team Members
|
45 |
-
| Name | Github |
|
46 |
-
| --- | --- |
|
47 |
-
| Mayuresh Agashe | [Mayuresh Agashe](https://github.com/mayureshagashe2105) |
|
48 |
-
| Hemanth Sai Garladinne | [Hemanth Sai Garladinne](https://github.com/HemanthSai7) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pyproject.toml
CHANGED
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4 |
|
5 |
[project]
|
6 |
name = "techdocs"
|
7 |
-
version = "0.0
|
8 |
description = "Code documentation generation CLI App"
|
9 |
readme = "README.md"
|
10 |
authors = [{ name = "Techdocs", email = "[email protected]" }]
|
|
|
4 |
|
5 |
[project]
|
6 |
name = "techdocs"
|
7 |
+
version = "0.1.0"
|
8 |
description = "Code documentation generation CLI App"
|
9 |
readme = "README.md"
|
10 |
authors = [{ name = "Techdocs", email = "[email protected]" }]
|
setup.cfg
CHANGED
@@ -1,12 +1,11 @@
|
|
1 |
[metadata]
|
2 |
name = techdocs
|
3 |
-
version = 0.0
|
4 |
|
5 |
[options]
|
6 |
packages = techdocs
|
7 |
install_requires =
|
8 |
requests
|
9 |
-
python_version >= "3.8.*"
|
10 |
|
11 |
[options.entry_points]
|
12 |
console_scripts =
|
|
|
1 |
[metadata]
|
2 |
name = techdocs
|
3 |
+
version = 0.1.0
|
4 |
|
5 |
[options]
|
6 |
packages = techdocs
|
7 |
install_requires =
|
8 |
requests
|
|
|
9 |
|
10 |
[options.entry_points]
|
11 |
console_scripts =
|
setup.py
CHANGED
@@ -1,8 +1,9 @@
|
|
|
|
1 |
from setuptools import setup
|
2 |
|
3 |
setup(
|
4 |
name='techdocs',
|
5 |
-
version='0.0
|
6 |
# To provide executable scripts, use entry points in preference to the
|
7 |
# "scripts" keyword. Entry points provide cross-platform support and allow
|
8 |
# pip to create the appropriate form of executable for the target platform.
|
@@ -11,4 +12,6 @@ setup(
|
|
11 |
'techdocs=techdocs.cli:main'
|
12 |
]
|
13 |
},
|
|
|
|
|
14 |
)
|
|
|
1 |
+
import setuptools
|
2 |
from setuptools import setup
|
3 |
|
4 |
setup(
|
5 |
name='techdocs',
|
6 |
+
version='0.1.0',
|
7 |
# To provide executable scripts, use entry points in preference to the
|
8 |
# "scripts" keyword. Entry points provide cross-platform support and allow
|
9 |
# pip to create the appropriate form of executable for the target platform.
|
|
|
12 |
'techdocs=techdocs.cli:main'
|
13 |
]
|
14 |
},
|
15 |
+
|
16 |
+
packages=setuptools.find_packages(),
|
17 |
)
|
techdocs.egg-info/PKG-INFO
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: techdocs
|
3 |
+
Version: 0.1.0
|
4 |
+
Summary: UNKNOWN
|
5 |
+
Home-page: UNKNOWN
|
6 |
+
License: UNKNOWN
|
7 |
+
Platform: UNKNOWN
|
8 |
+
License-File: AUTHORS
|
9 |
+
|
10 |
+
UNKNOWN
|
11 |
+
|
techdocs.egg-info/SOURCES.txt
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
AUTHORS
|
2 |
+
README.md
|
3 |
+
pyproject.toml
|
4 |
+
setup.cfg
|
5 |
+
setup.py
|
6 |
+
techdocs/__init__.py
|
7 |
+
techdocs/cli.py
|
8 |
+
techdocs.egg-info/PKG-INFO
|
9 |
+
techdocs.egg-info/SOURCES.txt
|
10 |
+
techdocs.egg-info/dependency_links.txt
|
11 |
+
techdocs.egg-info/entry_points.txt
|
12 |
+
techdocs.egg-info/requires.txt
|
13 |
+
techdocs.egg-info/top_level.txt
|
14 |
+
techdocs/utils/__init__.py
|
15 |
+
techdocs/utils/functools.py
|
16 |
+
techdocs/utils/parse.py
|
techdocs.egg-info/dependency_links.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
|
techdocs.egg-info/entry_points.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
[console_scripts]
|
2 |
+
techdocs = techdocs.cli:main
|
3 |
+
|
techdocs.egg-info/requires.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
requests
|
techdocs.egg-info/top_level.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
techdocs
|
techdocs/cli.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
from utils import parse,functools
|
2 |
|
3 |
import argparse
|
4 |
|
|
|
1 |
+
from .utils import parse,functools
|
2 |
|
3 |
import argparse
|
4 |
|
techdocs/requirements.txt
DELETED
File without changes
|
techdocs/utils/functools.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import json
|
2 |
import requests
|
3 |
|
4 |
-
BASE_URL = "https://
|
5 |
|
6 |
|
7 |
|
|
|
1 |
import json
|
2 |
import requests
|
3 |
|
4 |
+
BASE_URL = "https://caffeinecrew-techdocs.hf.space"
|
5 |
|
6 |
|
7 |
|
techdocs/utils/parse.py
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
import ast
|
2 |
import os
|
3 |
-
import requests
|
4 |
import threading
|
5 |
|
6 |
-
from
|
7 |
|
8 |
|
9 |
# Function to extract and print the outermost nested function with line number
|
|
|
1 |
import ast
|
2 |
import os
|
|
|
3 |
import threading
|
4 |
|
5 |
+
from .functools import *
|
6 |
|
7 |
|
8 |
# Function to extract and print the outermost nested function with line number
|
testing/DBQueries.py
CHANGED
@@ -20,6 +20,7 @@ class DBQueries:
|
|
20 |
Raises:
|
21 |
TypeError: If the data is not a tuple or a list of tuples.
|
22 |
"""
|
|
|
23 |
con = DBConnection.get_client()
|
24 |
cursor = con.cursor()
|
25 |
QUERY = f"INSERT INTO {{table_name}} ({','.join(cols)}) VALUES ".format(table_name=table_name)
|
@@ -50,6 +51,7 @@ class DBQueries:
|
|
50 |
Raises:
|
51 |
- None
|
52 |
"""
|
|
|
53 |
con = DBConnection.get_client()
|
54 |
cursor = con.cursor()
|
55 |
if isinstance(cols_to_fetch, str):
|
|
|
20 |
Raises:
|
21 |
TypeError: If the data is not a tuple or a list of tuples.
|
22 |
"""
|
23 |
+
'\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 '
|
24 |
con = DBConnection.get_client()
|
25 |
cursor = con.cursor()
|
26 |
QUERY = f"INSERT INTO {{table_name}} ({','.join(cols)}) VALUES ".format(table_name=table_name)
|
|
|
51 |
Raises:
|
52 |
- None
|
53 |
"""
|
54 |
+
'\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 '
|
55 |
con = DBConnection.get_client()
|
56 |
cursor = con.cursor()
|
57 |
if isinstance(cols_to_fetch, str):
|