Graphs is a powerful tool that bridges the gap between Miro, a collaborative online whiteboarding platform, and NetworkX, a Python library for creating, manipulating, and studying complex networks. This project allows users to create diagrams in Miro, seamlessly import them into a Python environment for advanced mathematical analysis and visualization, and leverage AI to enhance task scheduling based on calendar synchronization.
- Miro Integration: Connect to your Miro boards, fetch diagrams, and retrieve detailed board data.
- NetworkX Conversion: Automatically convert Miro diagrams into NetworkX graph structures for analysis.
- Graph Analysis: Perform centrality calculations, community detection, and other network analyses.
- Logging: Comprehensive logging to monitor application behavior and debug issues.
- Continuous Integration: Automated testing and code quality checks with GitHub Actions.
- Pre-commit Hooks: Enforce code quality standards using
pre-commit
hooks withblack
,flake8
, andisort
.
- Python 3.9 or higher: Ensure you have Python installed. You can download it from the official website.
- Docker (optional): For containerizing the application. Install from Docker's official site.
- Git: Version control system. Download from Git's official site.
git clone https://github.com/wtznc/graphs.git
cd graphs
Create and activate a Python virtual environment:
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
Install the required Python packages:
pip install --upgrade pip
pip install -r requirements.txt
Create a .env
file based on .env.example
:
cp .env.example .env
Edit the .env
file and add your Miro API credentials:
MIRO_CLIENT_ID=your_client_id
MIRO_CLIENT_SECRET=your_client_secret
MIRO_ACCESS_TOKEN=your_access_token
BOARD_ID=your_board_id
Important: Ensure that .env
is listed in your .gitignore
to prevent sensitive information from being committed to the repository.
Execute the main application script:
python src/main.py
The application will fetch the specified Miro board, convert it into a NetworkX graph, perform analysis, and output the results:
{
"nodes": [
{"id": "1", "label": "Node 1"},
{"id": "2", "label": "Node 2"}
],
"edges": [
{"source": "1", "target": "2"}
],
"centrality": {
"1": 0.5,
"2": 0.5
},
"communities": [
["1", "2"]
]
}
To containerize the application using Docker:
-
Build the Docker Image:
docker build -t graphs:latest .
-
Run the Docker Container:
docker run --env-file .env -v $(pwd)/logs:/app/logs graphs:latest
graphs/
├── src/
│ ├── analysis/
│ │ ├── __init__.py
│ │ └── graph_analysis.py
│ ├── miro/
│ │ ├── __init__.py
│ │ ├── api_client.py
│ │ ├── auth.py
│ │ └── parser.py
│ ├── networkx_converter/
│ │ ├── __init__.py
│ │ └── converter.py
│ ├── utils/
│ │ ├── __init__.py
│ │ ├── helpers.py
│ │ └── logger.py
│ ├── config.py
│ └── main.py
├── tests/
│ ├── __init__.py
│ ├── test_client.py
│ ├── test_parser.py
│ ├── test_converter.py
│ └── test_graph_analysis.py
├── .github/
│ └── workflows/
│ └── ci.yml
├── .pre-commit-config.yaml
├── .gitignore
├── README.md
├── LICENSE
├── requirements.txt
├── setup.py
├── Dockerfile
└── .env.example
We welcome contributions from the community! To contribute, please follow these steps:
-
Fork the Repository
-
Clone Your Fork
git clone https://github.com/yourusername/graphs.git cd graphs
-
Create a New Branch
git checkout -b feature/your-feature-name
-
Make Your Changes
-
Commit Your Changes
git commit -m "Add feature: your feature description"
-
Push to Your Fork
git push origin feature/your-feature-name
-
Create a Pull Request
Please refer to our Contributing Guidelines for more details.
We use GitHub Issues to track bugs, enhancements, and feature requests. Here are some of the main issues to get you started:
- [Feature] Implement Miro API Client (#1)
- [Feature] Implement Miro Board Parser (#2)
- [Feature] Implement NetworkX Converter (#3)
- [Feature] Implement Graph Analysis Functions (#4)
- [Feature] Implement Logging and Helper Functions (#5)
- [Feature] Implement Main Application Logic (#6)
Feel free to check out these issues and contribute to the project!
If you encounter any issues or have questions, please feel free to open an issue on GitHub or contact me directly at your.email@example.com.
This project is licensed under the MIT License - see the LICENSE file for details.