From f5c9eeacada9496bd37623e8e7399a3ab5105b25 Mon Sep 17 00:00:00 2001 From: Eli <43382407+eli64s@users.noreply.github.com> Date: Sun, 1 Oct 2023 18:19:37 -0500 Subject: [PATCH 1/2] Fix: Correct return type in git utils. --- pyproject.toml | 2 +- readmeai/md_builder/__init__.py | 0 readmeai/utils/github.py | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 readmeai/md_builder/__init__.py diff --git a/pyproject.toml b/pyproject.toml index dcaf4ad0..70265bed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "readmeai" -version = "0.4.04" +version = "0.4.05" description = "๐Ÿš€ Generate beautiful README.md files from the terminal. Powered by OpenAI's GPT LLMs ๐Ÿ’ซ" authors = ["Eli <0x.eli.64s@gmail.com>"] license = "MIT" diff --git a/readmeai/md_builder/__init__.py b/readmeai/md_builder/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/readmeai/utils/github.py b/readmeai/utils/github.py index e7825541..1a16f74d 100644 --- a/readmeai/utils/github.py +++ b/readmeai/utils/github.py @@ -104,7 +104,7 @@ def get_user_repository_name(url_or_path) -> (str, str): """ if os.path.exists(url_or_path): - return os.path.basename(url_or_path), "local" + return os.path.basename(url_or_path) patterns = { "github": r"https?://github.com/([^/]+)/([^/]+)", From b2aee999ea5198a87e3afb59df48863ff1674906 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Tue, 3 Oct 2023 15:27:35 -0700 Subject: [PATCH 2/2] working litellm changes --- poetry.lock | 349 ++++++++++++++++++++++++++++++++- pyproject.toml | 2 + readme-ai.md | 354 ++++++++++++++++++++++++++++++++++ readmeai/core/model.py | 24 +-- readmeai/settings/config.toml | 2 +- 5 files changed, 713 insertions(+), 18 deletions(-) create mode 100644 readme-ai.md diff --git a/poetry.lock b/poetry.lock index e5ea3e23..8d062bf0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -143,6 +143,17 @@ doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)"] test = ["anyio[trio]", "coverage[toml] (>=7)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] trio = ["trio (>=0.22)"] +[[package]] +name = "appdirs" +version = "1.4.4" +description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +optional = false +python-versions = "*" +files = [ + {file = "appdirs-1.4.4-py2.py3-none-any.whl", hash = "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128"}, + {file = "appdirs-1.4.4.tar.gz", hash = "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41"}, +] + [[package]] name = "async-timeout" version = "4.0.3" @@ -599,6 +610,41 @@ files = [ {file = "frozenlist-1.4.0.tar.gz", hash = "sha256:09163bdf0b2907454042edb19f887c6d33806adc71fbd54afc14908bfdc22251"}, ] +[[package]] +name = "fsspec" +version = "2023.9.2" +description = "File-system specification" +optional = false +python-versions = ">=3.8" +files = [ + {file = "fsspec-2023.9.2-py3-none-any.whl", hash = "sha256:603dbc52c75b84da501b9b2ec8c11e1f61c25984c4a0dda1f129ef391fbfc9b4"}, + {file = "fsspec-2023.9.2.tar.gz", hash = "sha256:80bfb8c70cc27b2178cc62a935ecf242fc6e8c3fb801f9c571fc01b1e715ba7d"}, +] + +[package.extras] +abfs = ["adlfs"] +adl = ["adlfs"] +arrow = ["pyarrow (>=1)"] +dask = ["dask", "distributed"] +devel = ["pytest", "pytest-cov"] +dropbox = ["dropbox", "dropboxdrivefs", "requests"] +full = ["adlfs", "aiohttp (!=4.0.0a0,!=4.0.0a1)", "dask", "distributed", "dropbox", "dropboxdrivefs", "fusepy", "gcsfs", "libarchive-c", "ocifs", "panel", "paramiko", "pyarrow (>=1)", "pygit2", "requests", "s3fs", "smbprotocol", "tqdm"] +fuse = ["fusepy"] +gcs = ["gcsfs"] +git = ["pygit2"] +github = ["requests"] +gs = ["gcsfs"] +gui = ["panel"] +hdfs = ["pyarrow (>=1)"] +http = ["aiohttp (!=4.0.0a0,!=4.0.0a1)", "requests"] +libarchive = ["libarchive-c"] +oci = ["ocifs"] +s3 = ["s3fs"] +sftp = ["paramiko"] +smb = ["smbprotocol"] +ssh = ["paramiko"] +tqdm = ["tqdm"] + [[package]] name = "gitdb" version = "4.0.10" @@ -711,6 +757,38 @@ cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] +[[package]] +name = "huggingface-hub" +version = "0.16.4" +description = "Client library to download and publish models, datasets and other repos on the huggingface.co hub" +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "huggingface_hub-0.16.4-py3-none-any.whl", hash = "sha256:0d3df29932f334fead024afc7cb4cc5149d955238b8b5e42dcf9740d6995a349"}, + {file = "huggingface_hub-0.16.4.tar.gz", hash = "sha256:608c7d4f3d368b326d1747f91523dbd1f692871e8e2e7a4750314a2dd8b63e14"}, +] + +[package.dependencies] +filelock = "*" +fsspec = "*" +packaging = ">=20.9" +pyyaml = ">=5.1" +requests = "*" +tqdm = ">=4.42.1" +typing-extensions = ">=3.7.4.3" + +[package.extras] +all = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "black (>=23.1,<24.0)", "gradio", "jedi", "mypy (==0.982)", "numpy", "pydantic", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "ruff (>=0.0.241)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "urllib3 (<2.0)"] +cli = ["InquirerPy (==0.3.4)"] +dev = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "black (>=23.1,<24.0)", "gradio", "jedi", "mypy (==0.982)", "numpy", "pydantic", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "ruff (>=0.0.241)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "urllib3 (<2.0)"] +fastai = ["fastai (>=2.4)", "fastcore (>=1.3.27)", "toml"] +inference = ["aiohttp", "pydantic"] +quality = ["black (>=23.1,<24.0)", "mypy (==0.982)", "ruff (>=0.0.241)"] +tensorflow = ["graphviz", "pydot", "tensorflow"] +testing = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "gradio", "jedi", "numpy", "pydantic", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "soundfile", "urllib3 (<2.0)"] +torch = ["torch"] +typing = ["pydantic", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3"] + [[package]] name = "hyperframe" version = "6.0.1" @@ -747,6 +825,25 @@ files = [ {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, ] +[[package]] +name = "importlib-metadata" +version = "6.8.0" +description = "Read metadata from Python packages" +optional = false +python-versions = ">=3.8" +files = [ + {file = "importlib_metadata-6.8.0-py3-none-any.whl", hash = "sha256:3ebb78df84a805d7698245025b975d9d67053cd94c79245ba4b3eb694abe68bb"}, + {file = "importlib_metadata-6.8.0.tar.gz", hash = "sha256:dbace7892d8c0c4ac1ad096662232f831d4e64f4c4545bd53016a3e9d4654743"}, +] + +[package.dependencies] +zipp = ">=0.5" + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +perf = ["ipython"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] + [[package]] name = "iniconfig" version = "2.0.0" @@ -775,6 +872,102 @@ pipfile-deprecated-finder = ["pip-shims (>=0.5.2)", "pipreqs", "requirementslib" plugins = ["setuptools"] requirements-deprecated-finder = ["pip-api", "pipreqs"] +[[package]] +name = "jinja2" +version = "3.1.2" +description = "A very fast and expressive template engine." +optional = false +python-versions = ">=3.7" +files = [ + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, +] + +[package.dependencies] +MarkupSafe = ">=2.0" + +[package.extras] +i18n = ["Babel (>=2.7)"] + +[[package]] +name = "litellm" +version = "0.1.817" +description = "Library to easily interface with LLM API providers" +optional = false +python-versions = ">=3.8,<4.0" +files = [ + {file = "litellm-0.1.817-py3-none-any.whl", hash = "sha256:202675a289f3debcdf7feb70048fb6383bc3ef1d624599e3c27e0baa7402df92"}, + {file = "litellm-0.1.817.tar.gz", hash = "sha256:6a880b539171d386c5a36b4d1bb1c5e20910a69ef6976ff49923179297af44d5"}, +] + +[package.dependencies] +appdirs = ">=1.4.4,<2.0.0" +click = "*" +importlib-metadata = ">=6.8.0" +openai = ">=0.27.0,<0.29.0" +python-dotenv = ">=0.2.0" +tiktoken = ">=0.4.0" +tokenizers = "*" + +[[package]] +name = "markupsafe" +version = "2.1.3" +description = "Safely add untrusted strings to HTML/XML markup." +optional = false +python-versions = ">=3.7" +files = [ + {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cd0f502fe016460680cd20aaa5a76d241d6f35a1c3350c474bac1273803893fa"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e09031c87a1e51556fdcb46e5bd4f59dfb743061cf93c4d6831bf894f125eb57"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:68e78619a61ecf91e76aa3e6e8e33fc4894a2bebe93410754bd28fce0a8a4f9f"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65c1a9bcdadc6c28eecee2c119465aebff8f7a584dd719facdd9e825ec61ab52"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:525808b8019e36eb524b8c68acdd63a37e75714eac50e988180b169d64480a00"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:962f82a3086483f5e5f64dbad880d31038b698494799b097bc59c2edf392fce6"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:aa7bd130efab1c280bed0f45501b7c8795f9fdbeb02e965371bbef3523627779"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c9c804664ebe8f83a211cace637506669e7890fec1b4195b505c214e50dd4eb7"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-win32.whl", hash = "sha256:10bbfe99883db80bdbaff2dcf681dfc6533a614f700da1287707e8a5d78a8431"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-win_amd64.whl", hash = "sha256:1577735524cdad32f9f694208aa75e422adba74f1baee7551620e43a3141f559"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ad9e82fb8f09ade1c3e1b996a6337afac2b8b9e365f926f5a61aacc71adc5b3c"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3c0fae6c3be832a0a0473ac912810b2877c8cb9d76ca48de1ed31e1c68386575"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b076b6226fb84157e3f7c971a47ff3a679d837cf338547532ab866c57930dbee"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfce63a9e7834b12b87c64d6b155fdd9b3b96191b6bd334bf37db7ff1fe457f2"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:338ae27d6b8745585f87218a3f23f1512dbf52c26c28e322dbe54bcede54ccb9"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e4dd52d80b8c83fdce44e12478ad2e85c64ea965e75d66dbeafb0a3e77308fcc"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:df0be2b576a7abbf737b1575f048c23fb1d769f267ec4358296f31c2479db8f9"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca379055a47383d02a5400cb0d110cef0a776fc644cda797db0c5696cfd7e18e"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:b7ff0f54cb4ff66dd38bebd335a38e2c22c41a8ee45aa608efc890ac3e3931bc"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c011a4149cfbcf9f03994ec2edffcb8b1dc2d2aede7ca243746df97a5d41ce48"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:56d9f2ecac662ca1611d183feb03a3fa4406469dafe241673d521dd5ae92a155"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-win32.whl", hash = "sha256:8758846a7e80910096950b67071243da3e5a20ed2546e6392603c096778d48e0"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-win_amd64.whl", hash = "sha256:787003c0ddb00500e49a10f2844fac87aa6ce977b90b0feaaf9de23c22508b24"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:2ef12179d3a291be237280175b542c07a36e7f60718296278d8593d21ca937d4"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2c1b19b3aaacc6e57b7e25710ff571c24d6c3613a45e905b1fde04d691b98ee0"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8afafd99945ead6e075b973fefa56379c5b5c53fd8937dad92c662da5d8fd5ee"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c41976a29d078bb235fea9b2ecd3da465df42a562910f9022f1a03107bd02be"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d080e0a5eb2529460b30190fcfcc4199bd7f827663f858a226a81bc27beaa97e"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:69c0f17e9f5a7afdf2cc9fb2d1ce6aabdb3bafb7f38017c0b77862bcec2bbad8"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:504b320cd4b7eff6f968eddf81127112db685e81f7e36e75f9f84f0df46041c3"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:42de32b22b6b804f42c5d98be4f7e5e977ecdd9ee9b660fda1a3edf03b11792d"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-win32.whl", hash = "sha256:ceb01949af7121f9fc39f7d27f91be8546f3fb112c608bc4029aef0bab86a2a5"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-win_amd64.whl", hash = "sha256:1b40069d487e7edb2676d3fbdb2b0829ffa2cd63a2ec26c4938b2d34391b4ecc"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8023faf4e01efadfa183e863fefde0046de576c6f14659e8782065bcece22198"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6b2b56950d93e41f33b4223ead100ea0fe11f8e6ee5f641eb753ce4b77a7042b"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9dcdfd0eaf283af041973bff14a2e143b8bd64e069f4c383416ecd79a81aab58"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:282c2cb35b5b673bbcadb33a585408104df04f14b2d9b01d4c345a3b92861c2c"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ab4a0df41e7c16a1392727727e7998a467472d0ad65f3ad5e6e765015df08636"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7ef3cb2ebbf91e330e3bb937efada0edd9003683db6b57bb108c4001f37a02ea"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:0a4e4a1aff6c7ac4cd55792abf96c915634c2b97e3cc1c7129578aa68ebd754e"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-win32.whl", hash = "sha256:fec21693218efe39aa7f8599346e90c705afa52c5b31ae019b2e57e8f6542bb2"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-win_amd64.whl", hash = "sha256:3fd4abcb888d15a94f32b75d8fd18ee162ca0c064f35b11134be77050296d6ba"}, + {file = "MarkupSafe-2.1.3.tar.gz", hash = "sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"}, +] + [[package]] name = "mccabe" version = "0.7.0" @@ -1100,6 +1293,20 @@ pytest = ">=4.6" [package.extras] testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtualenv"] +[[package]] +name = "python-dotenv" +version = "1.0.0" +description = "Read key-value pairs from a .env file and set them as environment variables" +optional = false +python-versions = ">=3.8" +files = [ + {file = "python-dotenv-1.0.0.tar.gz", hash = "sha256:a8df96034aae6d2d50a4ebe8216326c61c3eb64836776504fcca410e5937a3ba"}, + {file = "python_dotenv-1.0.0-py3-none-any.whl", hash = "sha256:f5971a9226b701070a4bf2c38c89e5a3f0d64de8debda981d1db98583009122a"}, +] + +[package.extras] +cli = ["click (>=5.0)"] + [[package]] name = "pyyaml" version = "6.0.1" @@ -1112,6 +1319,7 @@ files = [ {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, + {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, @@ -1119,8 +1327,15 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, + {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, + {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, + {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, + {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, @@ -1137,6 +1352,7 @@ files = [ {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, + {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, @@ -1144,6 +1360,7 @@ files = [ {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, + {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, @@ -1398,6 +1615,121 @@ requests = ">=2.26.0" [package.extras] blobfile = ["blobfile (>=2)"] +[[package]] +name = "tokenizers" +version = "0.14.0" +description = "" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tokenizers-0.14.0-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:1a90e1030d9c61de64045206c62721a36f892dcfc5bbbc119dfcd417c1ca60ca"}, + {file = "tokenizers-0.14.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:7cacc5a33767bb2a03b6090eac556c301a1d961ac2949be13977bc3f20cc4e3c"}, + {file = "tokenizers-0.14.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:81994795e1b4f868a6e73107af8cdf088d31357bae6f7abf26c42874eab16f43"}, + {file = "tokenizers-0.14.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1ec53f832bfa91abafecbf92b4259b466fb31438ab31e8291ade0fcf07de8fc2"}, + {file = "tokenizers-0.14.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:854aa813a55d6031a6399b1bca09e4e7a79a80ec05faeea77fc6809d59deb3d5"}, + {file = "tokenizers-0.14.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8c34d2f02e25e0fa96e574cadb43a6f14bdefc77f84950991da6e3732489e164"}, + {file = "tokenizers-0.14.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7f17d5ad725c827d3dc7db2bbe58093a33db2de49bbb639556a6d88d82f0ca19"}, + {file = "tokenizers-0.14.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:337a7b7d6b32c6f904faee4304987cb018d1488c88b91aa635760999f5631013"}, + {file = "tokenizers-0.14.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:98a7ceb767e1079ef2c99f52a4e7b816f2e682b2b6fef02c8eff5000536e54e1"}, + {file = "tokenizers-0.14.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:25ad4a0f883a311a5b021ed979e21559cb4184242c7446cd36e07d046d1ed4be"}, + {file = "tokenizers-0.14.0-cp310-none-win32.whl", hash = "sha256:360706b0c2c6ba10e5e26b7eeb7aef106dbfc0a81ad5ad599a892449b4973b10"}, + {file = "tokenizers-0.14.0-cp310-none-win_amd64.whl", hash = "sha256:1c2ce437982717a5e221efa3c546e636f12f325cc3d9d407c91d2905c56593d0"}, + {file = "tokenizers-0.14.0-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:612d0ba4f40f4d41163af9613dac59c902d017dc4166ea4537a476af807d41c3"}, + {file = "tokenizers-0.14.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3013ad0cff561d9be9ce2cc92b76aa746b4e974f20e5b4158c03860a4c8ffe0f"}, + {file = "tokenizers-0.14.0-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:c89a0d6d2ec393a6261df71063b1e22bdd7c6ef3d77b8826541b596132bcf524"}, + {file = "tokenizers-0.14.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5514417f37fc2ca8159b27853cd992a9a4982e6c51f04bd3ac3f65f68a8fa781"}, + {file = "tokenizers-0.14.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8e761fd1af8409c607b11f084dc7cc50f80f08bd426d4f01d1c353b097d2640f"}, + {file = "tokenizers-0.14.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c16fbcd5ef10df9e51cc84238cdb05ee37e4228aaff39c01aa12b0a0409e29b8"}, + {file = "tokenizers-0.14.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3439d9f858dd9033b69769be5a56eb4fb79fde13fad14fab01edbf2b98033ad9"}, + {file = "tokenizers-0.14.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c19f8cdc3e84090464a6e28757f60461388cc8cd41c02c109e180a6b7c571f6"}, + {file = "tokenizers-0.14.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:df763ce657a297eb73008d5907243a7558a45ae0930b38ebcb575a24f8296520"}, + {file = "tokenizers-0.14.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:095b0b6683a9b76002aa94659f75c09e4359cb291b318d6e77a60965d7a7f138"}, + {file = "tokenizers-0.14.0-cp311-none-win32.whl", hash = "sha256:712ec0e68a399ded8e115e7e25e7017802fa25ee6c36b4eaad88481e50d0c638"}, + {file = "tokenizers-0.14.0-cp311-none-win_amd64.whl", hash = "sha256:917aa6d6615b33d9aa811dcdfb3109e28ff242fbe2cb89ea0b7d3613e444a672"}, + {file = "tokenizers-0.14.0-cp312-cp312-macosx_10_7_x86_64.whl", hash = "sha256:8464ee7d43ecd9dd1723f51652f49b979052ea3bcd25329e3df44e950c8444d1"}, + {file = "tokenizers-0.14.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:84c2b96469b34825557c6fe0bc3154c98d15be58c416a9036ca90afdc9979229"}, + {file = "tokenizers-0.14.0-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:24b3ccec65ee6f876cd67251c1dcfa1c318c9beec5a438b134f7e33b667a8b36"}, + {file = "tokenizers-0.14.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bde333fc56dd5fbbdf2de3067d6c0c129867d33eac81d0ba9b65752ad6ef4208"}, + {file = "tokenizers-0.14.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1ddcc2f251bd8a2b2f9a7763ad4468a34cfc4ee3b0fba3cfb34d12c964950cac"}, + {file = "tokenizers-0.14.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:10a34eb1416dcec3c6f9afea459acd18fcc93234687de605a768a987eda589ab"}, + {file = "tokenizers-0.14.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:56bc7252530a6a20c6eed19b029914bb9cc781efbe943ca9530856051de99d0f"}, + {file = "tokenizers-0.14.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:07f5c2324326a00c85111081d5eae4da9d64d56abb5883389b3c98bee0b50a7c"}, + {file = "tokenizers-0.14.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:5efd92e44e43f36332b5f3653743dca5a0b72cdabb012f20023e220f01f675cb"}, + {file = "tokenizers-0.14.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:9223bcb77a826dbc9fd0efa6bce679a96b1a01005142778bb42ce967581c5951"}, + {file = "tokenizers-0.14.0-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:e2c1b4707344d3fbfce35d76802c2429ca54e30a5ecb05b3502c1e546039a3bb"}, + {file = "tokenizers-0.14.0-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:5892ba10fe0a477bde80b9f06bce05cb9d83c15a4676dcae5cbe6510f4524bfc"}, + {file = "tokenizers-0.14.0-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0e1818f33ac901d5d63830cb6a69a707819f4d958ae5ecb955d8a5ad823a2e44"}, + {file = "tokenizers-0.14.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d06a6fe406df1e616f9e649522683411c6c345ddaaaad7e50bbb60a2cb27e04d"}, + {file = "tokenizers-0.14.0-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8b6e2d4bc223dc6a99efbe9266242f1ac03eb0bef0104e6cef9f9512dd5c816b"}, + {file = "tokenizers-0.14.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:08ea1f612796e438c9a7e2ad86ab3c1c05c8fe0fad32fcab152c69a3a1a90a86"}, + {file = "tokenizers-0.14.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6ab1a58c05a3bd8ece95eb5d1bc909b3fb11acbd3ff514e3cbd1669e3ed28f5b"}, + {file = "tokenizers-0.14.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:495dc7d3b78815de79dafe7abce048a76154dadb0ffc7f09b7247738557e5cef"}, + {file = "tokenizers-0.14.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:aaa0401a245d891b3b2ba9cf027dc65ca07627e11fe3ce597644add7d07064f8"}, + {file = "tokenizers-0.14.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ae4fa13a786fd0d6549da241c6a1077f9b6320a7120d922ccc201ad1d4feea8f"}, + {file = "tokenizers-0.14.0-cp37-none-win32.whl", hash = "sha256:ae0d5b5ab6032c24a2e74cc15f65b6510070926671129e922aa3826c834558d7"}, + {file = "tokenizers-0.14.0-cp37-none-win_amd64.whl", hash = "sha256:2839369a9eb948905612f5d8e70453267d9c7bf17573e5ab49c2f28368fd635d"}, + {file = "tokenizers-0.14.0-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:f483af09a07fcb8b8b4cd07ac1be9f58bb739704ef9156e955531299ab17ec75"}, + {file = "tokenizers-0.14.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9c2ec661d0d63e618cb145ad15ddb6a81e16d9deb7a203f385d78141da028984"}, + {file = "tokenizers-0.14.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:97e87eb7cbeff63c3b1aa770fdcf18ea4f1c852bfb75d0c913e71b8924a99d61"}, + {file = "tokenizers-0.14.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:98c4bd09b47f77f41785488971543de63db82608f0dc0bc6646c876b5ca44d1f"}, + {file = "tokenizers-0.14.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0cbeb5406be31f7605d032bb261f2e728da8ac1f4f196c003bc640279ceb0f52"}, + {file = "tokenizers-0.14.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fe799fa48fd7dd549a68abb7bee32dd3721f50210ad2e3e55058080158c72c25"}, + {file = "tokenizers-0.14.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:66daf7c6375a95970e86cb3febc48becfeec4e38b2e0195218d348d3bb86593b"}, + {file = "tokenizers-0.14.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce4b177422af79a77c46bb8f56d73827e688fdc092878cff54e24f5c07a908db"}, + {file = "tokenizers-0.14.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:a9aef7a5622648b70f979e96cbc2f795eba5b28987dd62f4dbf8f1eac6d64a1a"}, + {file = "tokenizers-0.14.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:397a24feff284d39b40fdd61c1c828bb6648dfe97b6766c84fbaf7256e272d09"}, + {file = "tokenizers-0.14.0-cp38-none-win32.whl", hash = "sha256:93cc2ec19b6ff6149b2e5127ceda3117cc187dd38556a1ed93baba13dffda069"}, + {file = "tokenizers-0.14.0-cp38-none-win_amd64.whl", hash = "sha256:bf7f540ab8a6fc53fb762963edb7539b11f00af8f70b206f0a6d1a25109ad307"}, + {file = "tokenizers-0.14.0-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:a58d0b34586f4c5229de5aa124cf76b9455f2e01dc5bd6ed018f6e3bb12572d3"}, + {file = "tokenizers-0.14.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:90ceca6a06bb4b0048d0a51d0d47ef250d3cb37cc36b6b43334be8c02ac18b0f"}, + {file = "tokenizers-0.14.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5f6c9554bda64799b1d65052d834553bff9a6ef4a6c2114668e2ed8f1871a2a3"}, + {file = "tokenizers-0.14.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8ee14b41024bc05ea172fc2c87f66b60d7c5c636c3a52a09a25ec18e752e6dc7"}, + {file = "tokenizers-0.14.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:879201b1c76b24dc70ce02fc42c3eeb7ff20c353ce0ee638be6449f7c80e73ba"}, + {file = "tokenizers-0.14.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ca79ea6ddde5bb32f7ad1c51de1032829c531e76bbcae58fb3ed105a31faf021"}, + {file = "tokenizers-0.14.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fd5934048e60aedddf6c5b076d44ccb388702e1650e2eb7b325a1682d883fbf9"}, + {file = "tokenizers-0.14.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a1566cabd4bf8f09d6c1fa7a3380a181801a495e7218289dbbd0929de471711"}, + {file = "tokenizers-0.14.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:a8fc72a7adc6fa12db38100c403d659bc01fbf6e57f2cc9219e75c4eb0ea313c"}, + {file = "tokenizers-0.14.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:7fd08ed6c14aa285482d9e5f48c04de52bdbcecaca0d30465d7a36bbea6b14df"}, + {file = "tokenizers-0.14.0-cp39-none-win32.whl", hash = "sha256:3279c0c1d5fdea7d3499c582fed392fb0463d1046544ca010f53aeee5d2ce12c"}, + {file = "tokenizers-0.14.0-cp39-none-win_amd64.whl", hash = "sha256:203ca081d25eb6e4bc72ea04d552e457079c5c6a3713715ece246f6ca02ca8d0"}, + {file = "tokenizers-0.14.0-pp310-pypy310_pp73-macosx_10_7_x86_64.whl", hash = "sha256:b45704d5175499387e33a1dd5c8d49ab4d7ef3c36a9ba8a410bb3e68d10f80a0"}, + {file = "tokenizers-0.14.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:6d17d5eb38ccc2f615a7a3692dfa285abe22a1e6d73bbfd753599e34ceee511c"}, + {file = "tokenizers-0.14.0-pp310-pypy310_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:4a7e6e7989ba77a20c33f7a8a45e0f5b3e7530b2deddad2c3b2a58b323156134"}, + {file = "tokenizers-0.14.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:81876cefea043963abf6c92e0cf73ce6ee10bdc43245b6565ce82c0305c2e613"}, + {file = "tokenizers-0.14.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d8cd05f73d1ce875a23bfdb3a572417c0f46927c6070ca43a7f6f044c3d6605"}, + {file = "tokenizers-0.14.0-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:419a38b89be0081d872eac09449c03cd6589c2ee47461184592ee4b1ad93af1d"}, + {file = "tokenizers-0.14.0-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:4caf274a9ba944eb83bc695beef95abe24ce112907fb06217875894d8a4f62b8"}, + {file = "tokenizers-0.14.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl", hash = "sha256:6ecb3a7741d7ebf65db93d246b102efca112860707e07233f1b88703cb01dbc5"}, + {file = "tokenizers-0.14.0-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:cb7fe9a383cb2932848e459d0277a681d58ad31aa6ccda204468a8d130a9105c"}, + {file = "tokenizers-0.14.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b4731e0577780d85788ab4f00d54e16e76fe305739396e6fb4c54b89e6fa12de"}, + {file = "tokenizers-0.14.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b9900291ccd19417128e328a26672390365dab1d230cd00ee7a5e2a0319e2716"}, + {file = "tokenizers-0.14.0-pp37-pypy37_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:493e6932fbca6875fd2e51958f1108ce4c5ae41aa6f2b8017c5f07beaff0a1ac"}, + {file = "tokenizers-0.14.0-pp37-pypy37_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:1792e6b46b89aba0d501c0497f38c96e5b54735379fd8a07a28f45736ba51bb1"}, + {file = "tokenizers-0.14.0-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:0af26d37c7080688ef606679f3a3d44b63b881de9fa00cc45adc240ba443fd85"}, + {file = "tokenizers-0.14.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:99379ec4d7023c07baed85c68983bfad35fd210dfbc256eaafeb842df7f888e3"}, + {file = "tokenizers-0.14.0-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:84118aa60dcbb2686730342a0cb37e54e02fde001f936557223d46b6cd8112cd"}, + {file = "tokenizers-0.14.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d616e1859ffcc8fcda60f556c34338b96fb72ca642f6dafc3b1d2aa1812fb4dd"}, + {file = "tokenizers-0.14.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7826b79bbbffc2150bf8d621297cc600d8a1ea53992547c4fd39630de10466b4"}, + {file = "tokenizers-0.14.0-pp38-pypy38_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:eb3931d734f1e66b77c2a8e22ebe0c196f127c7a0f48bf9601720a6f85917926"}, + {file = "tokenizers-0.14.0-pp38-pypy38_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:6a475b5cafc7a740bf33d00334b1f2b434b6124198384d8b511931a891be39ff"}, + {file = "tokenizers-0.14.0-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:3d3c9e286ae00b0308903d2ef7b31efc84358109aa41abaa27bd715401c3fef4"}, + {file = "tokenizers-0.14.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:27244e96810434cf705f317e9b74a1163cd2be20bdbd3ed6b96dae1914a6778c"}, + {file = "tokenizers-0.14.0-pp39-pypy39_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:ca9b0536fd5f03f62427230e85d9d57f9eed644ab74c319ae4877c9144356aed"}, + {file = "tokenizers-0.14.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9f64cdff8c0454295b739d77e25cff7264fa9822296395e60cbfecc7f66d88fb"}, + {file = "tokenizers-0.14.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a00cdfb40544656b7a3b176049d63227d5e53cf2574912514ebb4b9da976aaa1"}, + {file = "tokenizers-0.14.0-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:b611d96b96957cb2f39560c77cc35d2fcb28c13d5b7d741412e0edfdb6f670a8"}, + {file = "tokenizers-0.14.0-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:27ad1c02fdd74dcf3502fafb87393412e65f698f2e3aba4ad568a1f3b43d5c9f"}, + {file = "tokenizers-0.14.0.tar.gz", hash = "sha256:a06efa1f19dcc0e9bd0f4ffbf963cb0217af92a9694f68fe7eee5e1c6ddc4bde"}, +] + +[package.dependencies] +huggingface_hub = ">=0.16.4,<0.17" + +[package.extras] +dev = ["tokenizers[testing]"] +docs = ["setuptools_rust", "sphinx", "sphinx_rtd_theme"] +testing = ["black (==22.3)", "datasets", "numpy", "pytest", "requests"] + [[package]] name = "toml" version = "0.10.2" @@ -1606,10 +1938,25 @@ files = [ idna = ">=2.0" multidict = ">=4.0" +[[package]] +name = "zipp" +version = "3.17.0" +description = "Backport of pathlib-compatible object wrapper for zip files" +optional = false +python-versions = ">=3.8" +files = [ + {file = "zipp-3.17.0-py3-none-any.whl", hash = "sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31"}, + {file = "zipp-3.17.0.tar.gz", hash = "sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy (>=0.9.1)", "pytest-ruff"] + [extras] dev = [] [metadata] lock-version = "2.0" python-versions = "^3.8.1" -content-hash = "6b2d18beba2bfbd66de4f6dd8432f6b0e8d218647f8d926608a09a2226ca65cc" +content-hash = "501ab1215ed300846f92625c8e6c65129d8e7a5c18e1513cd4ccf9ff62491852" diff --git a/pyproject.toml b/pyproject.toml index 70265bed..fdd3b2fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,6 +57,8 @@ tornado = "^6.3.3" asyncio = "^3.4.3" aiohttp = "^3.8.5" click = "^8.1.7" +litellm = "^0.1.817" +jinja2 = "^3.1.2" [tool.poetry.dev-dependencies] diff --git a/readme-ai.md b/readme-ai.md new file mode 100644 index 00000000..d6e9caff --- /dev/null +++ b/readme-ai.md @@ -0,0 +1,354 @@ +
+

+ +
readme-ai

+

โ—ฆ Here is an 80-character slogan for the readme-ai project on GitHub:"Automatically generate readable READMEs so you can focus on code!

+

โ—ฆ Developed with the software and tools below.

+ +

+GNU%20Bash +tqdm +SVG +precommit +OpenAI +Python + +AIOHTTP +Docker +GitHub%20Actions +Pytest +Markdown +JSON +

+GitHub license +git-last-commit +GitHub commit activity +GitHub top language +
+ +--- + +## ๐Ÿ“– Table of Contents +- [๐Ÿ“– Table of Contents](#-table-of-contents) +- [๐Ÿ“ Overview](#-overview) +- [๐Ÿ“ฆ Features](#-features) +- [๐Ÿ“‚ Repository Structure](#-repository-structure) +- [โš™๏ธ Modules](#modules) +- [๐Ÿš€ Getting Started](#-getting-started) + - [๐Ÿ”ง Installation](#-installation) + - [๐Ÿค– Running readme-ai](#-running-readme-ai) + - [๐Ÿงช Tests](#-tests) +- [๐Ÿ›ฃ Roadmap](#-roadmap) +- [๐Ÿค Contributing](#-contributing) +- [๐Ÿ“„ License](#-license) +- [๐Ÿ‘ Acknowledgments](#-acknowledgments) + +--- + + +## ๐Ÿ“ Overview + +Here is a 3 sentence overview of the readme-ai project:The readme-ai project is an open-source tool that automates the generation of README files for GitHub repositories through natural language interactions. By analyzing a codebase and using AI assistants, it is able to summarize projects, dependencies, usage instructions and more to produce comprehensive yet succinct README documentation. This helps developers quickly onboard to new projects and understand how to get started with compiling, testing and using the code with little manual effort. + +--- + +## ๐Ÿ“ฆ Features + + Here is a Markdown table analyzing the key features of the Readme AI codebase: + +| | Feature | Description | +|-|-|-| +| โš™๏ธ | **Architecture** | The system is designed with a modular architecture, separating code into logical components (md_builder, cli) to generate Markdown files programmatically. | +| ๐Ÿ“„ | **Documentation** | Docstrings and comments describe classes, functions and arguments clearly. Usage and development guides help new users and contributors get started quickly. | +| ๐Ÿ”— | **Dependencies** | External dependencies include Python libraries for Markdown parsing (mdformat), argument parsing (click) and testing (pytest). This allows the system to focus on its core functionality. | +| ๐Ÿงฉ | **Modularity** | Code is organized into distinct modules for the Markdown builder, CLI interface and tests. Individual components can be developed and tested independently. | +| ๐Ÿงช | **Testing** | Automated unit tests use Pytest and cover key functions to prevent regressions and ensure the system works as intended. Testing strategies facilitate continuous integration. | +| โšก๏ธ | **Performance** | As a CLI tool to generate Markdown files from templates, the system has good performance for its use cases without unnecessary complexity. Resource usage is optimized through its modular design. | +| ๐Ÿ” | **Security** | As an open source tool without authentication or sensitive data, the focus is on secure development practices like keeping dependencies up-to-date and following best practices. | +| ๐Ÿ”€ | **Version Control**| Git is used for version control, including a clear commit history and README providing guidance for contributing to the project. | +| ๐Ÿ”Œ | **Integrations** | The CLI interface allows customizing Markdown generation through configuration files or programmatic calls, enabling diverse integrations based on user needs. | +| ๐Ÿ“ถ | **Scalability** | The modular design allows the system to easily accommodate additional features and growth over time without compromising organization or performance. + +--- + + +## ๐Ÿ“‚ Repository Structure + +```sh +โ””โ”€โ”€ readme-ai/ + โ”œโ”€โ”€ .dockerignore + โ”œโ”€โ”€ .github/ + โ”‚ โ”œโ”€โ”€ release-drafter.yml + โ”‚ โ””โ”€โ”€ workflows/ + โ”œโ”€โ”€ .gitignore + โ”œโ”€โ”€ .pre-commit-config.yaml + โ”œโ”€โ”€ CHANGELOG.md + โ”œโ”€โ”€ CODE_OF_CONDUCT.md + โ”œโ”€โ”€ CONTRIBUTING.md + โ”œโ”€โ”€ Dockerfile + โ”œโ”€โ”€ LICENSE + โ”œโ”€โ”€ Makefile + โ”œโ”€โ”€ README.md + โ”œโ”€โ”€ docs/ + โ”‚ โ”œโ”€โ”€ README-fr.md + โ”‚ โ””โ”€โ”€ README-zh-CN.md + โ”œโ”€โ”€ examples/ + โ”‚ โ”œโ”€โ”€ imgs/ + โ”‚ โ”œโ”€โ”€ readme-energy-forecasting.md + โ”‚ โ”œโ”€โ”€ readme-fastapi-redis.md + โ”‚ โ”œโ”€โ”€ readme-go.md + โ”‚ โ”œโ”€โ”€ readme-java.md + โ”‚ โ”œโ”€โ”€ readme-javascript.md + โ”‚ โ”œโ”€โ”€ readme-kotlin.md + โ”‚ โ”œโ”€โ”€ readme-lanarky.md + โ”‚ โ”œโ”€โ”€ readme-mlops.md + โ”‚ โ”œโ”€โ”€ readme-pyflink.md + โ”‚ โ”œโ”€โ”€ readme-python.md + โ”‚ โ”œโ”€โ”€ readme-rust-c.md + โ”‚ โ””โ”€โ”€ readme-typescript.md + โ”œโ”€โ”€ poetry.lock + โ”œโ”€โ”€ pyproject.toml + โ”œโ”€โ”€ readmeai/ + โ”‚ โ”œโ”€โ”€ __init__.py + โ”‚ โ”œโ”€โ”€ cli/ + โ”‚ โ”œโ”€โ”€ core/ + โ”‚ โ”œโ”€โ”€ data/ + โ”‚ โ”œโ”€โ”€ main.py + โ”‚ โ”œโ”€โ”€ md_builder/ + โ”‚ โ”œโ”€โ”€ settings/ + โ”‚ โ””โ”€โ”€ utils/ + โ”œโ”€โ”€ requirements.txt + โ”œโ”€โ”€ scripts/ + โ”‚ โ”œโ”€โ”€ build_image.sh + โ”‚ โ”œโ”€โ”€ build_pypi.sh + โ”‚ โ”œโ”€โ”€ clean.sh + โ”‚ โ”œโ”€โ”€ run.sh + โ”‚ โ”œโ”€โ”€ run_batch.sh + โ”‚ โ””โ”€โ”€ test.sh + โ”œโ”€โ”€ setup/ + โ”‚ โ”œโ”€โ”€ environment.yaml + โ”‚ โ””โ”€โ”€ setup.sh + โ””โ”€โ”€ tests/ + โ”œโ”€โ”€ __init__.py + โ”œโ”€โ”€ conftest.py + โ”œโ”€โ”€ test_builder.py + โ”œโ”€โ”€ test_conf.py + โ”œโ”€โ”€ test_factory.py + โ”œโ”€โ”€ test_logger.py + โ”œโ”€โ”€ test_main.py + โ”œโ”€โ”€ test_model.py + โ”œโ”€โ”€ test_parse.py + โ”œโ”€โ”€ test_preprocess.py + โ””โ”€โ”€ test_utils.py +``` + + +--- + +## โš™๏ธ Modules + +
Root + +| File | Summary | +| --- | --- | +| [requirements.txt](https://github.com/eli64s/readme-ai/blob/main/requirements.txt) | Package dependencies for:-Code testing (pytest, responses, pytest-cov)-Linting (black, isort, flake8)-Formatting (black)-CLI building (click)-API client (httpx, openai)-Caching (cachetools)-YAML and TOML (pyyaml, toml)-Data validation (pydantic)-Git integration (gitpython)-Table printing (tabulate)-Retrying functions (tenacity)-HTTP/2 (h2)-Pre-commit hooks (pre-commit)-REST API mocking (ruff)-TikTok API (tiktoken) | +| [Dockerfile](https://github.com/eli64s/readme-ai/blob/main/Dockerfile) | This Dockerfile sets up a Python development environment with Readme AI CLI pre-installed. It defines a non-root user, sets that user as the default, installs dependencies, and configures the image to run the Readme AI CLI command on container start. | +| [Makefile](https://github.com/eli64s/readme-ai/blob/main/Makefile) | This Makefile contains commands to automate development tasks, including setting up a virtual environment for the codebase using either Conda or venv, formatting code style with tools like pylint and black, cleaning temporary files, and fixing untracked git changes. | +| [pyproject.toml](https://github.com/eli64s/readme-ai/blob/main/pyproject.toml) | This file defines configuration for the README.ai CLI tool: it specifies dependencies, build requirements/scripts, testing/linting, and coverage specifications. Poetry manages the package, dependencies are listed, build uses Masonry, scripts define the CLI, tests/linting on save via pre-commit, and coverage excludes certain files/folders. | + +
+ +
Setup + +| File | Summary | +| --- | --- | +| [setup.sh](https://github.com/eli64s/readme-ai/blob/main/setup/setup.sh) | This script sets up a Python conda environment for a project, checking and installing dependencies, then creating and activating the'readmeai' environment to configure the PATH and install additional Python packages. | +| [environment.yaml](https://github.com/eli64s/readme-ai/blob/main/setup/environment.yaml) | Defines core packages for a Python environment-Python 3.9, pip, and installation via pip. Allows reproducibility and shareability of the environment. | + +
+ +
Scripts + +| File | Summary | +| --- | --- | +| [run_batch.sh](https://github.com/eli64s/readme-ai/blob/main/scripts/run_batch.sh) | This bash script iterates through an array of GitHub repository URLs, extracts the repository name from each URL, and uses the ReadmeAI Python module to generate areadme file for that repo, naming it based on the extracted name. | +| [build_image.sh](https://github.com/eli64s/readme-ai/blob/main/scripts/build_image.sh) | This shell script automates building and pushing a Docker image. It sets variables for image name and tag, builds the image using BuildKit, and pushes it to a repository, tagging with the provided name and version. | +| [build_pypi.sh](https://github.com/eli64s/readme-ai/blob/main/scripts/build_pypi.sh) | This script builds a Python package, cleans previous builds, creates a new build, and uploads it to PyPI using Twine with the necessary credentials. | +| [run.sh](https://github.com/eli64s/readme-ai/blob/main/scripts/run.sh) | This shell script activates a Conda env, then uses the ReadmeAI Python library to generate documentation from a GitHub repo. It retrieves the repo at the given URL, and writes an output README file. | +| [clean.sh](https://github.com/eli64s/readme-ai/blob/main/scripts/clean.sh) | This script removes temporary, cached and backup files to clean a Python project directory. It finds and deletes artifacts like.py[co] files, empty directories like __pycache__ as well as build artifacts, logs and other miscellaneous files. | +| [test.sh](https://github.com/eli64s/readme-ai/blob/main/scripts/test.sh) | This Bash script runs Python tests with coverage reporting, then cleans up redundant files. It activates a Conda environment, sets source/omit dirs for coverage, runs Pytest with coverage, produces a coverage report, then removes __pycache__, cache, coverage and local test files. | + +
+ +
.github + +| File | Summary | +| --- | --- | +| [release-drafter.yml](https://github.com/eli64s/readme-ai/blob/main/.github/release-drafter.yml) | This release drafter file automates the creation of GitHub release notes. It defines templates for the release name, tag, categories of changes, individual changes, resolving the semantic version number, and the overall release notes template. This provides a structured, repeatable process for documenting new features, bug fixes, and other changes between releases in a format aligned with semantic versioning and the Keep a Changelog standard. | + +
+ +
Workflows + +| File | Summary | +| --- | --- | +| [release-drafter.yml](https://github.com/eli64s/readme-ai/blob/main/.github/workflows/release-drafter.yml) | This YAML workflow file automates the release process by drafting release notes as pull requests are merged. It watches default and custom branches for pushes/PR events, reads release template files, and publishes release notes/tags using the GitHub API token on PR integration. | +| [publish_package.yml](https://github.com/eli64s/readme-ai/blob/main/.github/workflows/publish_package.yml) | This GitHub Action publishes a Python package to PyPI on main branch pushes or releases. It installs dependencies, builds the package, and uploads the built artifacts to PyPI using twine with the secret API token env vars. | +| [build_image.yml](https://github.com/eli64s/readme-ai/blob/main/.github/workflows/build_image.yml) | This workflow configures GitHub actions to build and push a Docker image upon code commits to main branch or release creation. It sets up QEMU and Docker Buildx for multi-architecture builds, logs into Docker Hub, then builds and pushes the image with specified tags across Linux platforms. | + +
+ +
Readmeai + +| File | Summary | +| --- | --- | +| [main.py](https://github.com/eli64s/readme-ai/blob/main/readmeai/main.py) | This Python application generates README files through natural language interactions. It clones a Git repository, analyzes file structure and dependencies, then uses a large language model to write descriptive text for the README based on developer-provided prompts. The formatted Markdown is assembled and output to a file. | + +
+ +
Settings + +| File | Summary | +| --- | --- | +| [ignore_files.toml](https://github.com/eli64s/readme-ai/blob/main/readmeai/settings/ignore_files.toml) | This file defines a set of file paths and extensions to ignore when parsing a repository's contents, to exclude automatically generated, temporary, and test/cache files like.git,.tox, and __pycache__. It improves parsing performance and relevance. | +| [language_names.toml](https://github.com/eli64s/readme-ai/blob/main/readmeai/settings/language_names.toml) | This file provides a mapping of common file extensions to their associated programming language names. This allows identification of a file's language based on its extension for proper syntax highlighting and other automated functions. | +| [config.toml](https://github.com/eli64s/readme-ai/blob/main/readmeai/settings/config.toml) | This configuration file contains the settings for readmeai, an AI assistant for creating README files on GitHub. It defines the OpenAI API credentials for query completion, as well as paths for file I/O. Prompt templates are provided to generate Markdown content summarizing code, projects features, getting started instructions, and more. The structured prompts andMarkdown template code enable the assistant to automatically generate comprehensive yet succinct README documentation. | +| [dependency_files.toml](https://github.com/eli64s/readme-ai/blob/main/readmeai/settings/dependency_files.toml) | This configuration file defines a list of common dependency file names mapped to different programming languages. It provides a list of standard filenames that may indicate dependencies managed or built for a project, to help identify the libraries and tools required to compile, test and run the code. | +| [language_setup.toml](https://github.com/eli64s/readme-ai/blob/main/readmeai/settings/language_setup.toml) | This file outlines build and run instructions for various programming languages, including commands to compile/interpret code, execute the main program, and run unit tests where applicable. It provides a standardized starting point for local development and testing across different languages. | + +
+ +
Core + +| File | Summary | +| --- | --- | +| [config.py](https://github.com/eli64s/readme-ai/blob/main/readmeai/core/config.py) | This Python code defines Pydantic models and helpers for loading configuration from TOM files in the readme-ai project. Key-value files specify various app settings like API keys, output paths, documentation templates. Models validate values and allow accessing configs as objects. Loading and merging of multiple config files handled to provide flexible configuration. | +| [preprocess.py](https://github.com/eli64s/readme-ai/blob/main/readmeai/core/preprocess.py) | This code handles preprocessing functions for README generation. It analyzes code repositories, identifies files and languages, extracts dependencies, and tokenizes file contents. Key steps include generating file information, mapping extensions to languages, retrieving dependency contents, and processing the data into a standardized format with tokens and language details to serve as structured input for postprocessing and report generation. | +| [logger.py](https://github.com/eli64s/readme-ai/blob/main/readmeai/core/logger.py) | This Python file defines a custom Logger class that provides color logging functionality. It uses the singleton pattern to ensure only one logger instance exists per name. Logger methods configure color formatting and call the corresponding logging methods while passing messages to the underlying logging module. | +| [factory.py](https://github.com/eli64s/readme-ai/blob/main/readmeai/core/factory.py) | This factory class provides a unified API for reading from and writing to different file formats. It supports JSON, Markdown, TOML, TXT and YAML files, handling the appropriate parser/formatter for each. Files are cached for efficient reading. Formatted content is written via selected methods based on file extension. Errors are raised for unsupported formats or I/O failures. | +| [model.py](https://github.com/eli64s/readme-ai/blob/main/readmeai/core/model.py) | This code handles interactions with OpenAI's API to generate natural language summaries of source code files. It initializes an HTTP client, retries requests on failure, validates responses and manages rate limiting. Given code snippets, it parallelizes API requests to summarize each one, handles errors, caches responses and returns results while abstracting away complexities of the API. | +| [parser.py](https://github.com/eli64s/readme-ai/blob/main/readmeai/core/parser.py) | This module contains functions to parse various dependency and package files to extract core metadata like dependencies, projects/libraries, and services. Each file type has a dedicated parsing method handling the different file formats including JSON, YAML, TOML and plain text. The parsed data is returned as lists for further processing. | + +
+ +
Utils + +| File | Summary | +| --- | --- | +| [tokens.py](https://github.com/eli64s/readme-ai/blob/main/readmeai/utils/tokens.py) | This module provides token-related utility functions for text generation. It can adjust the max tokens based on prompt validity, count tokens in text, and truncate text to a set number of tokens. This allows the system to carefully analyze input text and apply token limits for improved precision during natural language generation. | +| [utils.py](https://github.com/eli64s/readme-ai/blob/main/readmeai/utils/utils.py) | This file contains several utility functions used throughout the application:-is_valid_url checks if a string is a valid URL-flatten_list flattens a nested list into a single level list-format_sentence cleans text by removing whitespace and formatting sentences-remove_substring removes text between HTML tagsThese functions provide common reusable operations like input validation, data formatting and cleaning to produce consistent output. | +| [github.py](https://github.com/eli64s/readme-ai/blob/main/readmeai/utils/github.py) | This module provides utility functions for cloning GitHub repositories to temporary directories and retrieving data from GitHub repositories, including:-clone_repo_to_temp_dir() clones a repo to a temp dir, removes.git, and validates the clone-find_git_executable() finds the Git executable path-validate_git_executable() validates the Git executable-get_github_file_link() generates a URL for a file-get_user_repository_name() parses the username and repo from a URL or local path | + +
+ +
Cli + +| File | Summary | +| --- | --- | +| [options.py](https://github.com/eli64s/readme-ai/blob/main/readmeai/cli/options.py) | This file defines option parameters for the CLI interface. It specifies click Options for API key, badge style, text encoding, API endpoint, language model, offline mode, output path, repository, temperature, language, and style to customize the README generation. | +| [commands.py](https://github.com/eli64s/readme-ai/blob/main/readmeai/cli/commands.py) | This file defines the CLI commands for readme-ai using Click. It sets up command line options for API key, badges, encoding etc and maps them to the main() function from readmeai.main to execute the core NLP generation tasks based on the provided parameters. | + +
+ +
Md_builder + +| File | Summary | +| --- | --- | +| [tree.py](https://github.com/eli64s/readme-ai/blob/main/readmeai/md_builder/tree.py) | This Python module generates a Markdown-formatted directory tree recursively by taking a root path and generating indented branches. It returns a string representing the tree structure with a maximum depth of 2 levels, where subdirectories and files are displayed with unicode box characters to visualize the hierarchy. | +| [badges.py](https://github.com/eli64s/readme-ai/blob/main/readmeai/md_builder/badges.py) | This Python module generates badges from dependency data to display in a project README. It retrieves logo icons, maps dependencies to badge SVGs, sorts by color, and formats them as Markdown images with configurable formatting of badge groupings. | +| [tables.py](https://github.com/eli64s/readme-ai/blob/main/readmeai/md_builder/tables.py) | This Python module generates Markdown tables that summarize directories and files within a codebase. It recursively maps the directory structure, extracts file paths and summaries, then organizes these into collapsible tables within Markdown. Tables are created for the root and each sub-directory, with file names and summaries formatted and linked to their GitHub paths. | +| [headers.py](https://github.com/eli64s/readme-ai/blob/main/readmeai/md_builder/headers.py) | This Python module builds the README.md file for a codebase. It inserts various sections like headers, badges, tables of contents generated from code metadata. Config settings specify formatting and content. External APIs are used to fetch additional info. Sections are constructed and joined to create the final Markdown file, which is written to disk. | +| [usage.py](https://github.com/eli64s/readme-ai/blob/main/readmeai/md_builder/usage.py) | This code analyzes a project's codebase to generate a customized "Getting Started" guide for the README. It counts languages used, identifies the most common, maps it to commands for install/run/test. Default commands are returned if errors occur, providing project-specific onboarding instructions. | + +
+ +--- + +## ๐Ÿš€ Getting Started + +***Dependencies*** + +Please ensure you have the following dependencies installed on your system: + +`- โ„น๏ธ Dependency 1` + +`- โ„น๏ธ Dependency 2` + +`- โ„น๏ธ ...` + +### ๐Ÿ”ง Installation + +1. Clone the readme-ai repository: +```sh +git clone https://github.com/eli64s/readme-ai +``` + +2. Change to the project directory: +```sh +cd readme-ai +``` + +3. Install the dependencies: +```sh +pip install -r requirements.txt +``` + +### ๐Ÿค– Running readme-ai + +```sh +python main.py +``` + +### ๐Ÿงช Tests +```sh +pytest +``` + +--- + + +## ๐Ÿ›ฃ Roadmap + +> - [X] `โ„น๏ธ Task 1: Implement X` +> - [ ] `โ„น๏ธ Task 2: Implement Y` +> - [ ] `โ„น๏ธ ...` + + +--- + +## ๐Ÿค Contributing + +Contributions are always welcome! Please follow these steps: +1. Fork the project repository. This creates a copy of the project on your account that you can modify without affecting the original project. +2. Clone the forked repository to your local machine using a Git client like Git or GitHub Desktop. +3. Create a new branch with a descriptive name (e.g., `new-feature-branch` or `bugfix-issue-123`). +```sh +git checkout -b new-feature-branch +``` +4. Make changes to the project's codebase. +5. Commit your changes to your local branch with a clear commit message that explains the changes you've made. +```sh +git commit -m 'Implemented new feature.' +``` +6. Push your changes to your forked repository on GitHub using the following command +```sh +git push origin new-feature-branch +``` +7. Create a new pull request to the original project repository. In the pull request, describe the changes you've made and why they're necessary. +The project maintainers will review your changes and provide feedback or merge them into the main branch. + +--- + +## ๐Ÿ“„ License + +This project is licensed under the `โ„น๏ธ LICENSE-TYPE` License. See the [LICENSE-Type](LICENSE) file for additional info. + +--- + +## ๐Ÿ‘ Acknowledgments + +`- โ„น๏ธ List any resources, contributors, inspiration, etc.` + +[โ†‘ Return](#Top) + +--- diff --git a/readmeai/core/model.py b/readmeai/core/model.py index 64471a17..76feba09 100644 --- a/readmeai/core/model.py +++ b/readmeai/core/model.py @@ -1,11 +1,12 @@ """OpenAI API handler, generates text for the README.md file.""" import asyncio -import time +import time, os from typing import Dict, List, Tuple import httpx import openai +from litellm import acompletion from cachetools import TTLCache from tenacity import ( RetryError, @@ -176,25 +177,16 @@ async def generate_text( """ try: async with self.rate_limit_semaphore: - response = await self.http_client.post( - self.endpoint, - headers={"Authorization": f"Bearer {openai.api_key}"}, - json={ - "messages": [ - { + api_key = os.getenv("LLM_API_KEY") or openai.api_key + messages = [{ "role": "system", "content": "You're a brilliant Tech Lead.", }, {"role": "user", "content": prompt}, - ], - "model": self.model, - "temperature": self.temperature, - "max_tokens": tokens, - }, - ) - response.raise_for_status() - data = response.json() - summary = data["choices"][0]["message"]["content"] + ] + print(f"model: {self.model}") + response = await acompletion(model=self.model, messages=messages, temperature=self.temperature, max_tokens=tokens, api_key=api_key) + summary = response["choices"][0]["message"]["content"] summary = format_sentence(summary) if index != 3 else summary self.logger.info( diff --git a/readmeai/settings/config.toml b/readmeai/settings/config.toml index 9a98fdf5..e043e497 100644 --- a/readmeai/settings/config.toml +++ b/readmeai/settings/config.toml @@ -2,7 +2,7 @@ [api] endpoint = "https://api.openai.com/v1/chat/completions" encoding = "cl100k_base" -model = "gpt-3.5-turbo" +model = "claude-instant-1" rate_limit = 5 tokens = 650 tokens_max = 3800