-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject_info.py
More file actions
72 lines (62 loc) · 2.98 KB
/
Copy pathproject_info.py
File metadata and controls
72 lines (62 loc) · 2.98 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
"""
Project structure overview and usage instructions
"""
import os
def show_project_structure():
"""Display the project structure and usage instructions"""
print("Excel to Database Processing Project")
print("=" * 50)
print("\n📁 Project Structure:")
structure = """
carga_banco/
├── 📄 main.py # Main application entry point
├── ⚙️ config.py # Configuration settings
├── 🗃️ models.py # Database models (Area, Question, Item, Action)
├── 🔗 database.py # Database connection and setup
├── 📊 excel_reader.py # Excel file reading functionality
├── 🔄 data_processor.py # Data processing and database operations
├── 📋 requirements.txt # Python dependencies
├── 🔧 .env.example # Environment variables template
├── 🧪 create_sample_excel.py # Script to create sample Excel file
├── ✅ test_application.py # Test script to verify functionality
├── 📖 README.md # Project documentation
└── 📁 data/
├── 📊 input.xlsx # Your Excel file (create with create_sample_excel.py)
└── 📝 sample_data.txt # Sample data in text format
"""
print(structure)
print("\n🚀 Quick Start:")
print("1. Install dependencies: pip install -r requirements.txt")
print("2. Create sample Excel file: python create_sample_excel.py")
print("3. Test the application: python test_application.py")
print("4. Run main application: python main.py")
print("\n📊 Excel File Structure:")
print("Your Excel file should have these Portuguese columns:")
columns = [
("Area", "Area name"),
("Questao", "Question description"),
("Questao Abreviada", "Question title"),
("Item Verificacao", "Item description"),
("Item Verificacao Abreviada", "Item title"),
("Questao Auxiliar", "Action description")
]
for col, desc in columns:
print(f" • {col:<25} - {desc}")
print("\n🔄 Data Hierarchy:")
print("Area → Question → Item → Action")
print("Each level is linked to the previous level")
print("\n🗃️ Database Tables:")
print("The application creates four related tables in PostgreSQL:")
tables = [
("tb_area", "Stores area information with UUID primary key"),
("tb_questao_base", "Stores questions linked to areas"),
("tb_item_base", "Stores items linked to questions"),
("tb_acao_base", "Stores actions linked to items")
]
for table, desc in tables:
print(f" • {table:<20} - {desc}")
print("\n🔗 Database Connection:")
print("Default PostgreSQL connection: postgresql://postgres:password@localhost:5432/excel_data")
print("Update DATABASE_URL in .env file with your PostgreSQL credentials")
if __name__ == "__main__":
show_project_structure()