From 38ba3fa69b7e4db46d6b5c0803661c9f370f18d2 Mon Sep 17 00:00:00 2001 From: abhishekbhakat Date: Tue, 25 Mar 2025 18:22:10 +0000 Subject: [PATCH] feat: add initial project structure with license, README, and pre-commit configuration --- .gitignore | 2 ++ .pre-commit-config.yaml | 15 +++++++++ LICENSE | 21 ++++++++++++ README.md | 0 pyproject.toml | 75 ++++++++++++++++++++++++++++++++++++++--- 5 files changed, 109 insertions(+), 4 deletions(-) create mode 100755 .pre-commit-config.yaml create mode 100755 LICENSE create mode 100644 README.md diff --git a/.gitignore b/.gitignore index bdc241e..3f1c90a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ env/ # Configuration config/config.ini +config/mcp_config.json # IDE .vscode/ @@ -18,4 +19,5 @@ config/config.ini # resources resources/ + # __pycache__/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100755 index 0000000..7a1acfe --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,15 @@ +repos: +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.1.11 + hooks: + - id: ruff + args: [--fix] + - id: ruff-format + +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files diff --git a/LICENSE b/LICENSE new file mode 100755 index 0000000..b17cff9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Abhishek Bhakat + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/pyproject.toml b/pyproject.toml index e41c645..78964a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,16 +1,83 @@ -[build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" - [project] name = "streamlit-chat-app" version = "0.1.0" +description = "Streamlit chat app with MCP" +readme = "README.md" +requires-python = ">=3.11" +authors = [ + {name = "Abhishek Bhakat", email = "abhishek.bhakat@hotmail.com"} +] dependencies = [ "streamlit", "python-dotenv", "openai", "dolphin-mcp" ] +classifiers = [ + "Development Status :: 3 - Alpha", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.11", +] +license = "MIT" +license-files = ["LICEN[CS]E*"] + +[project.urls] +GitHub = "https://git.bhakat.dev/abhishekbhakat/mcpapp" +Issues = "https://git.bhakat.dev/abhishekbhakat/mcpapp/issues" + +[project.optional-dependencies] +dev = [ + "build>=1.2.2", + "pre-commit>=4.0.1", + "pytest>=8.3.4", + "pytest-asyncio>=0.25.0", + "pytest-mock>=3.14.0", + "ruff>=0.9.2" +] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] packages = ["src"] + +[tool.ruff] +line-length = 200 +indent-width = 4 +fix = true +preview = true + +lint.select = [ + "E", # pycodestyle errors + "F", # pyflakes + "I", # isort + "W", # pycodestyle warnings + "C90", # Complexity + "C", # flake8-comprehensions + "ISC", # flake8-implicit-str-concat + "T10", # flake8-debugger + "A", # flake8-builtins + "UP", # pyupgrade +] + +lint.ignore = [ + "C416", # Unnecessary list comprehension - rewrite as a generator expression + "C408", # Unnecessary `dict` call - rewrite as a literal + "ISC001" # Single line implicit string concatenation +] + +lint.fixable = ["ALL"] +lint.unfixable = [] + +[tool.ruff.format] +quote-style = "double" +indent-style = "space" +skip-magic-trailing-comma = false + +[tool.ruff.lint.isort] +combine-as-imports = true + +[tool.ruff.lint.mccabe] +max-complexity = 12