Skip to content

Commit

Permalink
Merge pull request #17 from mayureshagashe2105/main
Browse files Browse the repository at this point in the history
package tooling
  • Loading branch information
mayureshagashe2105 authored Sep 29, 2023
2 parents b302b32 + 2c4895e commit 60bba56
Show file tree
Hide file tree
Showing 16 changed files with 48 additions and 56 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@
__pycache__
.vercel
tempCodeRunnerFile.py

#pypi files
build
dist
48 changes: 0 additions & 48 deletions TechdocsAPI/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "[email protected]" }]
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -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 =
Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -11,4 +12,6 @@
'techdocs=techdocs.cli:main'
]
},

packages=setuptools.find_packages(),
)
11 changes: 11 additions & 0 deletions techdocs.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -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

16 changes: 16 additions & 0 deletions techdocs.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions techdocs.egg-info/dependency_links.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

3 changes: 3 additions & 0 deletions techdocs.egg-info/entry_points.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[console_scripts]
techdocs = techdocs.cli:main

1 change: 1 addition & 0 deletions techdocs.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
requests
1 change: 1 addition & 0 deletions techdocs.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
techdocs
2 changes: 1 addition & 1 deletion techdocs/cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from utils import parse,functools
from .utils import parse,functools

import argparse

Expand Down
Empty file removed techdocs/requirements.txt
Empty file.
2 changes: 1 addition & 1 deletion techdocs/utils/functools.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
import requests

BASE_URL = "https://hemanthsai7-techdocsapi.hf.space"
BASE_URL = "https://caffeinecrew-techdocs.hf.space"



Expand Down
3 changes: 1 addition & 2 deletions techdocs/utils/parse.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions testing/DBQueries.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 60bba56

Please sign in to comment.