Skip to content

Commit a3ff660

Browse files
committed
Fix typos, resolve infinite test loop bug, add badges to documentation, update .yml pipeline title
1 parent 616cb15 commit a3ff660

5 files changed

Lines changed: 18 additions & 13 deletions

File tree

.github/workflows/README_DEV.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ This guide helps developers set up, test, and deploy the Flex Net Sim Backend AP
5252
Run the test suite to ensure code quality:
5353

5454
```bash
55-
pytest tests/
55+
pytest --cov=backend tests/
5656
```
5757

5858
## Docker Deployment

.github/workflows/gke-cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Branch-Specific Deploy FNS API to Cloud Run
1+
name: Test FNS API and deploy to Cloud Run
22

33
on:
44
push:

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# Flex Net Sim Backend API
22

3+
[![Static Badge](https://img.shields.io/badge/version-1.1.0-blue)](https://github.com/MirkoZETA/FlexNetSim-API)
4+
![Static Badge](https://img.shields.io/badge/language-python-blue)
5+
[![Static Badge](https://img.shields.io/badge/licese-MIT-green)](https://github.com/MirkoZETA/FlexNetSim-API/blob/master/LICENSE)
6+
37
A lightweight API for running optical network simulations with [Flex Net Sim C++](https://gitlab.com/DaniloBorquez/flex-net-sim).
48

59
## Overview
610

7-
The FlexNetSim Backend API provides:
11+
The Flex Net Sim Backend API provides:
812

913
- **Hands-on demonstration** of optical network simulation capabilities
1014
- **Simplified access** to core Flex Net Sim features

backend.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# FlexNetSim Backend API
2-
# A Flask API for running FlexNetSim network simulations
1+
# Flex Net Sim Backend API
2+
# A Flask API for running Flex Net Sim network simulations
33

44
from flask import Flask, request, jsonify
55
import subprocess
@@ -152,14 +152,14 @@ def simulation_help():
152152
Provides API documentation in plain text format.
153153
154154
Returns information about available endpoints, parameters,
155-
and example usage for the FlexNetSim API.
155+
and example usage for the Flex Net Sim API.
156156
157157
Returns:
158158
Plain text response: API documentation
159159
"""
160160

161161
help_message = """\
162-
FlexNetSim API Documentation
162+
Flex Net Sim API Documentation
163163
164164
ENDPOINT: /run_simulation
165165
METHOD: POST
@@ -242,8 +242,9 @@ def simulation_help():
242242
compile_success = compile_simulation()
243243

244244
# --- Main Entry Point ---
245-
if not compile_success:
246-
logger.error("Application startup failed: Compilation error. Check logs for details.")
247-
else:
248-
logger.info("Starting FlexNetSim API server...")
249-
app.run(host="0.0.0.0")
245+
if __name__ == "__main__":
246+
if not compile_success:
247+
logger.error("Application startup failed: Compilation error. Check logs for details.")
248+
else:
249+
logger.info("Starting Flex Net Sim API server...")
250+
app.run(host="0.0.0.0")

tests/test_backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# FlexNetSim API Test Suite
1+
# Flex Net Sim API Test Suite
22
# Tests for API endpoints and functionality
33

44
from flask_testing import TestCase

0 commit comments

Comments
 (0)