-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-github.sh
More file actions
373 lines (300 loc) · 8.95 KB
/
Copy pathsetup-github.sh
File metadata and controls
373 lines (300 loc) · 8.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
#!/bin/bash
# Finnie GitHub Setup Script
# Developed by Sankar Subbayya
set -e
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
echo -e "${BLUE}🚀 Finnie GitHub Setup Script${NC}"
echo -e "${BLUE}Developed by Sankar Subbayya${NC}"
echo "=================================="
# Check if git is installed
if ! command -v git &> /dev/null; then
echo -e "${RED}❌ Git not found. Please install Git first.${NC}"
exit 1
fi
# Get GitHub username
read -p "Enter your GitHub username: " GITHUB_USERNAME
if [ -z "$GITHUB_USERNAME" ]; then
echo -e "${RED}❌ GitHub username is required${NC}"
exit 1
fi
echo -e "${YELLOW}📋 Setting up repository for user: $GITHUB_USERNAME${NC}"
# Initialize git repository
if [ ! -d ".git" ]; then
echo -e "${YELLOW}🔧 Initializing git repository...${NC}"
git init
echo -e "${GREEN}✅ Git repository initialized${NC}"
else
echo -e "${GREEN}✅ Git repository already exists${NC}"
fi
# Add remote origin
echo -e "${YELLOW}🔗 Adding remote origin...${NC}"
git remote remove origin 2>/dev/null || true
git remote add origin "https://github.com/$GITHUB_USERNAME/finnie.git"
echo -e "${GREEN}✅ Remote origin added${NC}"
# Create comprehensive .gitignore if it doesn't exist
if [ ! -f ".gitignore" ]; then
echo -e "${YELLOW}📝 Creating .gitignore...${NC}"
cat > .gitignore << 'EOF'
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# Virtual environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# IDE
.vscode/
.idea/
*.swp
*.swo
*~
# OS
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Project specific
data/
logs/
*.log
.env.local
.env.production
.env.development
# Database
*.db
*.sqlite
*.sqlite3
# Vector stores
faiss_index/
chroma_db/
*.pkl
*.pickle
# Jupyter
.ipynb_checkpoints/
# pytest
.pytest_cache/
.coverage
htmlcov/
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Docker
.dockerignore
# AWS
.aws/
*.pem
*.key
# Temporary files
tmp/
temp/
EOF
echo -e "${GREEN}✅ .gitignore created${NC}"
else
echo -e "${GREEN}✅ .gitignore already exists${NC}"
fi
# Create LICENSE if it doesn't exist
if [ ! -f "LICENSE" ]; then
echo -e "${YELLOW}📄 Creating LICENSE...${NC}"
cat > LICENSE << 'EOF'
MIT License
Copyright (c) 2025 Sankar Subbayya
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.
EOF
echo -e "${GREEN}✅ LICENSE created${NC}"
else
echo -e "${GREEN}✅ LICENSE already exists${NC}"
fi
# Update README.md with GitHub badges
if [ -f "README.md" ]; then
echo -e "${YELLOW}📝 Updating README.md with GitHub badges...${NC}"
# Add badges after the title if they don't exist
if ! grep -q "github.com" README.md; then
sed -i '' '2a\
\
\
\
\
' README.md
fi
echo -e "${GREEN}✅ README.md updated${NC}"
else
echo -e "${YELLOW}📝 Creating README.md...${NC}"
cat > README.md << EOF
# 📈 Finnie - Financial AI Engine




**Developed by Sankar Subbayya**
A comprehensive financial AI engine built with multi-agent systems, RAG (Retrieval Augmented Generation), and real-time market data integration.
## 🚀 Features
- **Multi-Agent System**: 6 specialized AI agents for different financial tasks
- **RAG System**: Hybrid retrieval with FAISS/Chroma and BM25
- **Real-time Data**: Market quotes, news, and portfolio metrics
- **Streamlit UI**: Beautiful, responsive web interface
- **Educational Focus**: Built for learning and experimentation
## 🏗️ Architecture
\`\`\`mermaid
graph TB
A[Streamlit UI] --> B[LangGraph Workflow]
B --> C[Multi-Agent System]
C --> D[RAG System]
C --> E[MCP Tools]
D --> F[Vector Store]
E --> G[Market APIs]
\`\`\`
## 🛠️ Quick Start
### Prerequisites
- Python 3.12+
- uv package manager
### Installation
\`\`\`bash
# Clone the repository
git clone https://github.com/$GITHUB_USERNAME/finnie.git
cd finnie
# Install dependencies
uv sync --all-extras
# Run the application
uv run finnie
\`\`\`
### Access the App
- Open your browser to \`http://localhost:8501\`
- Explore the Chat, Portfolio, Markets, and Learn tabs
## 📊 Technology Stack
- **Frontend**: Streamlit, Plotly
- **AI/ML**: LangGraph, OpenAI, FAISS
- **Data**: yfinance, Alpha Vantage, PostgreSQL
- **Infrastructure**: Docker, AWS-ready
- **Documentation**: MkDocs Material
## 🧪 Testing
\`\`\`bash
# Run all tests
uv run pytest
# Run with coverage
uv run pytest --cov=src
# Format code
uv run black .
# Lint code
uv run flake8 .
\`\`\`
## 📚 Documentation
\`\`\`bash
# Serve documentation locally
uv run mkdocs serve
# Build documentation
uv run mkdocs build
\`\`\`
## 🚀 Deployment
### Local Development
\`\`\`bash
uv run streamlit run app/main.py
\`\`\`
### Docker
\`\`\`bash
docker build -t finnie .
docker run -p 8501:8501 finnie
\`\`\`
### AWS Deployment
See [AWS Deployment Guide](docs/deployment/aws-deployment-guide.md) for detailed instructions.
## 🤝 Contributing
1. Fork the repository
2. Create a feature branch (\`git checkout -b feature/amazing-feature\`)
3. Commit your changes (\`git commit -m 'Add amazing feature'\`)
4. Push to the branch (\`git push origin feature/amazing-feature\`)
5. Open a Pull Request
## 📄 License
This project is part of an educational financial AI curriculum. It follows standard open-source practices and educational guidelines for learning purposes.
## 👨💻 Author
**Sankar Subbayya**
- GitHub: [@$GITHUB_USERNAME](https://github.com/$GITHUB_USERNAME)
- Email: sankar@example.com
## 🙏 Acknowledgments
- Built with modern AI/ML frameworks
- Inspired by financial education and AI research
- Uses open-source libraries and tools
---
*Finnie - Empowering Financial AI Education through Comprehensive Documentation and Robust Architecture*
EOF
echo -e "${GREEN}✅ README.md created${NC}"
fi
# Add all files to git
echo -e "${YELLOW}📦 Adding files to git...${NC}"
git add .
# Create initial commit
echo -e "${YELLOW}💾 Creating initial commit...${NC}"
git commit -m "Initial commit: Finnie Financial AI Engine
- Multi-agent system with LangGraph
- RAG implementation with FAISS/Chroma
- Streamlit UI with 4 tabs (Chat, Portfolio, Markets, Learn)
- Real-time market data integration
- Comprehensive documentation with MkDocs
- Docker and AWS deployment ready
- Developed by Sankar Subbayya"
echo -e "${GREEN}✅ Initial commit created${NC}"
# Instructions for manual steps
echo -e "${BLUE}📋 Next Steps:${NC}"
echo -e "${YELLOW}1. Create GitHub repository:${NC}"
echo -e " Go to https://github.com/new"
echo -e " Repository name: finnie"
echo -e " Description: Financial AI Engine - Multi-agent system for portfolio analysis and financial education"
echo -e " Make it Public"
echo -e " Don't initialize with README, .gitignore, or license"
echo ""
echo -e "${YELLOW}2. Push to GitHub:${NC}"
echo -e " git push -u origin main"
echo ""
echo -e "${YELLOW}3. Enable GitHub Pages:${NC}"
echo -e " Go to Settings → Pages"
echo -e " Source: GitHub Actions"
echo ""
echo -e "${YELLOW}4. Add repository topics:${NC}"
echo -e " financial-ai, streamlit, langgraph, rag, portfolio-analysis, machine-learning, python, multi-agent-system"
echo ""
echo -e "${GREEN}🎉 Your Finnie project is ready for GitHub!${NC}"
echo -e "${BLUE}Repository URL will be: https://github.com/$GITHUB_USERNAME/finnie${NC}"