@@ -10,6 +10,9 @@ The project is organized into the following directories:
1010
1111```
1212ANN/
13+ ├── .github/
14+ │ └── workflows/
15+ │ └── ci.yml # GitHub Actions CI/CD pipeline
1316├── data/ # Data files
1417│ ├── Churn_Modelling.csv # Training dataset
1518│ └── realtime_example.csv # Example format for real-time predictions
2326│ └── prediction.ipynb # Notebook for making predictions
2427├── src/ # Source code
2528│ └── app.py # Streamlit web application
29+ ├── tests/ # Test files
30+ │ ├── __init__.py
31+ │ └── test_app.py # Unit tests for the application
32+ ├── .flake8 # Flake8 linting configuration
33+ ├── .gitignore # Git ignore rules
34+ ├── Makefile # Make commands for development
35+ ├── pytest.ini # Pytest configuration
36+ ├── pyproject.toml # Python project configuration
2637├── requirements.txt # Python dependencies
38+ ├── requirements-dev.txt # Development dependencies
2739└── README.md # This file
2840```
2941
@@ -185,13 +197,86 @@ pip install -r requirements.txt
185197
186198## Dependencies
187199
188- - ** tensorflow** (2.15.0): Deep learning framework
200+ ### Production Dependencies
201+ - ** tensorflow** (>=2.20.0): Deep learning framework
189202- ** pandas** (>=2.0.0): Data manipulation
190203- ** numpy** (>=1.24.0): Numerical computing
191204- ** scikit-learn** (>=1.3.0): Machine learning utilities
192- - ** streamlit** (1.40.0): Web application framework
205+ - ** streamlit** (>= 1.40.0): Web application framework
193206- ** matplotlib** (>=3.7.0): Plotting library
194- - ** tensorboard** (>=2.15.0): TensorFlow visualization
207+ - ** tensorboard** (>=2.20.0): TensorFlow visualization
208+
209+ ### Development Dependencies
210+ - ** pytest** (>=7.4.0): Testing framework
211+ - ** pytest-cov** (>=4.1.0): Coverage reporting
212+ - ** flake8** (>=6.1.0): Linting
213+ - ** black** (>=23.11.0): Code formatting
214+ - ** safety** (>=2.3.0): Security scanning
215+
216+ ## CI/CD Pipeline
217+
218+ This project includes a GitHub Actions CI/CD pipeline that automatically:
219+
220+ - ** Lints code** using flake8
221+ - ** Checks code formatting** using Black
222+ - ** Runs tests** using pytest with coverage reporting
223+ - ** Verifies imports** and model file existence
224+ - ** Tests on multiple Python versions** (3.10, 3.11, 3.12)
225+ - ** Performs security scans** on dependencies
226+
227+ ### Running CI Checks Locally
228+
229+ You can run the same checks locally using the Makefile:
230+
231+ ``` bash
232+ # Install development dependencies
233+ make install-dev
234+
235+ # Run all CI checks
236+ make ci
237+
238+ # Or run individual checks
239+ make test # Run tests
240+ make lint # Run linters
241+ make format # Format code
242+ make format-check # Check formatting without modifying
243+ ```
244+
245+ ### GitHub Actions Workflow
246+
247+ The CI pipeline runs automatically on:
248+ - Push to ` main ` or ` develop ` branches
249+ - Pull requests to ` main ` or ` develop ` branches
250+
251+ View the workflow file at ` .github/workflows/ci.yml `
252+
253+ ## Development
254+
255+ ### Running Tests
256+
257+ ``` bash
258+ # Install development dependencies
259+ pip install -r requirements-dev.txt
260+
261+ # Run tests
262+ pytest tests/ -v
263+
264+ # Run tests with coverage
265+ pytest tests/ -v --cov=src --cov-report=html
266+ ```
267+
268+ ### Code Quality
269+
270+ ``` bash
271+ # Format code
272+ black src/ tests/
273+
274+ # Check formatting
275+ black --check src/ tests/
276+
277+ # Lint code
278+ flake8 src/
279+ ```
195280
196281## License
197282
0 commit comments