From 773bcfbe631ac0741d10a062de575276f1d02387 Mon Sep 17 00:00:00 2001 From: Samia35-2973 Date: Wed, 2 Jul 2025 17:39:37 +0600 Subject: [PATCH] add dependencies, pre-commit, yapf, and update .gitignore --- .gitignore | 13 +++++++++ .pre-commit-config.yaml | 19 +++++++++++++ .style.yapf | 4 +++ pyproject.toml | 62 +++++++++++++++++++++++++++++++++++++++++ requirements.txt | 45 ++++++++++++++++++++++++++++++ 5 files changed, 143 insertions(+) create mode 100644 .pre-commit-config.yaml create mode 100644 .style.yapf create mode 100644 pyproject.toml create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore index 6e9fc4c..44e1790 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,16 @@ eggs/ .installed.cfg *.egg MANIFEST + + +# Environment +.env + + +# Testing +.pytest_cache/ + + +# Project specific +lightning_logs/ +.gradio/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..6997396 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,19 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-json + - id: check-toml + - id: check-added-large-files + +- repo: https://github.com/google/yapf + rev: v0.40.1 + hooks: + - id: yapf + language: python + additional_dependencies: [toml] + args: ['-i', '--style', '.style.yapf'] + files: ^(src/|tests/|scripts/).*\.py$ diff --git a/.style.yapf b/.style.yapf new file mode 100644 index 0000000..f42def5 --- /dev/null +++ b/.style.yapf @@ -0,0 +1,4 @@ +[style] +# YAPF uses the chromium style +based_on_style = google +COLUMN_LIMIT=90 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..a715aa2 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,62 @@ +[project] +name = "deepforest_agent" +version = "0.1.0" +description = "AI Agent for DeepForest object detection" +authors = [ + {name = "Your Name", email = "you@example.com"} +] +requires-python = ">=3.12" +readme = "README.md" +dependencies = [ + # Core dependencies + "torch>=2.0.0", + "torchvision>=0.15.0", + "google-generativeai", + "pydantic-settings", + "pydantic", + + # Computer Vision + "opencv-python>=4.8.0", + "Pillow>=10.0.0", + "numpy>=1.24.0", + "matplotlib>=3.7.0", + "seaborn>=0.12.0", + "plotly>=5.15.0", + + # DeepForest + "deepforest", + "rasterio>=1.3.0", + "geopandas>=0.14.0", + "albumentations<2.0", + + # Data processing + "pandas>=2.0.0", + "pyyaml>=6.0", + + # Web interface + "gradio>=4.0.0", + "fastapi>=0.104.0", + "requests>=2.31.0", + + # Utilities + "python-dotenv>=1.0.0", + "shapely>=2.0.0", + "scikit-image>=0.21.0", + "tqdm>=4.65.0", + + # Additional + "openai", + "gradio_image_annotation" +] + +[project.optional-dependencies] +dev = [ + "pre-commit", + "pytest", + "pytest-profiling", + "yapf" +] + +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..86c86fd --- /dev/null +++ b/requirements.txt @@ -0,0 +1,45 @@ +# Core dependencies +torch>=2.0.0 +torchvision>=0.15.0 +google-generativeai +pydantic-settings +pydantic + +# Computer Vision +opencv-python>=4.8.0 +Pillow>=10.0.0 +numpy>=1.24.0 +matplotlib>=3.7.0 +seaborn>=0.12.0 +plotly>=5.15.0 + +# DeepForest +deepforest +rasterio>=1.3.0 +geopandas>=0.14.0 +albumentations<2.0 + +# Data processing +pandas>=2.0.0 +pyyaml>=6.0 + +# Web interface +gradio>=4.0.0 +fastapi>=0.104.0 +requests>=2.31.0 + +# Utilities +python-dotenv>=1.0.0 +shapely>=2.0.0 +scikit-image>=0.21.0 +tqdm>=4.65.0 + +# Additional +openai +gradio_image_annotation + +# Dev tools +pre-commit +pytest +pytest-profiling +yapf