This project provides tools to automatically generate end-to-end (E2E) interface diagrams based on JSON data. It fetches data, processes it, and creates a diagrammatic representation of interfaces using Draw.io.
- Overview
- Features
- Requirements
- Setup
- Usage
- Directory Structure
- Testing
- Deployment
- Contributing
- License
This project aims to automate the generation of interface diagrams. It includes AWS Lambda functions that process JSON data, convert it to a diagram URL, and then optionally save the URL to an Excel file stored in an S3 bucket.
- JSON Parsing: Converts JSON data into a structured Python object.
- Diagram Generation: Creates a Draw.io diagram URL based on the processed data.
- Excel File Management: Updates an Excel file with interface diagram URLs.
- AWS Lambda Support: Includes Lambda handlers for seamless integration with AWS.
- Python 3.8
- AWS CLI (for deployment)
- openpyxl (for Excel operations)
- boto3 (for AWS S3 operations)
-
Clone the repository:
git clone https://github.com/meirarc/InterfaceDiagram.git
-
Navigate to the project root:
cd InterfaceDiagram
-
Install the required packages:
pip install -r requirements.txt
To generate an interface diagram:
- Place your JSON files in the 'in' folder of your S3 bucket.
- Run the Lambda handler corresponding to your requirements.
src/main
: Contains the main application code, including Lambda handlers and utilities for JSON parsing, encoding, and Excel file management.src/test
: Contains test files and test data.scripts
: Contains utility scripts, such as the one for generating the ZIP file for deployment.
- To generate a test JSON object from a CSV, run:
python .\scripts\generate_json_object.py
- To run the unittest scripts:
python -m unittest discover -s src/tests -p 'test_*.py’
- To run the Pylint scripts
python3 -m pylint .\src\main
-
Modify the Git Hub action
python_ci_cd.yml
to automatically deploy the project on your AWS account using the cloud formation stack to provision the resources -
Update the secrets AWS credentials on the Git Action configuration
If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.
This project is licensed under the MIT License - see the LICENSE.md
file for details.