Skip to content

Commit c3a4c14

Browse files
committed
Update README, app logic, metrics, plots, docs, governance, and tests; update changelog
1 parent d9f2f40 commit c3a4c14

18 files changed

Lines changed: 535 additions & 25 deletions
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: "🐞 Bug Report"
3+
about: Create a report to help us improve
4+
labels: bug
5+
---
6+
7+
**Describe the bug**
8+
A clear and concise description of what the bug is.
9+
10+
**To Reproduce**
11+
Steps to reproduce the behavior:
12+
1. Go to '...'
13+
2. Click on '...'
14+
3. Scroll down to '...'
15+
4. See error
16+
17+
**Expected behavior**
18+
A clear and concise description of what you expected to happen.
19+
20+
**Screenshots**
21+
If applicable, add screenshots to help explain your problem.
22+
23+
**Environment (please complete the following information):**
24+
- OS: [e.g. macOS, Windows, Linux]
25+
- Browser [e.g. Chrome, Safari]
26+
- Python version [e.g. 3.10]
27+
28+
**Additional context**
29+
Add any other context about the problem here.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: "✨ Feature Request"
3+
about: Suggest an idea for this project
4+
labels: enhancement
5+
---
6+
7+
**Is your feature request related to a problem? Please describe.**
8+
A clear and concise description of what the problem is.
9+
10+
**Describe the solution you'd like**
11+
A clear and concise description of what you want to happen.
12+
13+
**Describe alternatives you've considered**
14+
A clear and concise description of any alternative solutions or features you've considered.
15+
16+
**Additional context**
17+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Pull Request
2+
3+
## What does this PR do?
4+
- [ ] Bug fix
5+
- [ ] New feature
6+
- [ ] Refactor
7+
- [ ] Documentation
8+
- [ ] Other (describe below)
9+
10+
## Description
11+
<!-- Please include a summary of the change and which issue is fixed. -->
12+
13+
## How was this tested?
14+
<!-- Describe the tests you ran and how you verified your changes. -->
15+
16+
## Checklist
17+
- [ ] I have read the CONTRIBUTING guidelines
18+
- [ ] I have added tests that prove my fix is effective or my feature works (if applicable)
19+
- [ ] I have added necessary documentation (if appropriate)
20+
- [ ] Any dependent changes have been merged and published
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
description: 'GPT 4.1 as a top-notch coding agent.'
3+
model: GPT-4.1
4+
---
5+
6+
You are an agent - please keep going until the user’s query is completely resolved, before ending your turn and yielding back to the user.
7+
8+
Your thinking should be thorough and so it's fine if it's very long. However, avoid unnecessary repetition and verbosity. You should be concise, but thorough.
9+
10+
You MUST iterate and keep going until the problem is solved.
11+
12+
You have everything you need to resolve this problem. I want you to fully solve this autonomously before coming back to me.
13+
14+
Only terminate your turn when you are sure that the problem is solved and all items have been checked off. Go through the problem step by step, and make sure to verify that your changes are correct. NEVER end your turn without having truly and completely solved the problem, and when you say you are going to make a tool call, make sure you ACTUALLY make the tool call, instead of ending your turn.
15+
16+
THE PROBLEM CAN NOT BE SOLVED WITHOUT EXTENSIVE INTERNET RESEARCH.
17+
18+
You must use the fetch_webpage tool to recursively gather all information from URL's provided to you by the user, as well as any links you find in the content of those pages.
19+
20+
Your knowledge on everything is out of date because your training date is in the past.
21+
22+
You CANNOT successfully complete this task without using Google to verify your understanding of third party packages and dependencies is up to date. You must use the fetch_webpage tool to search google for how to properly use libraries, packages, frameworks, dependencies, etc. every single time you install or implement one. It is not enough to just search, you must also read the content of the pages you find and recursively gather all relevant information by fetching additional links until you have all the information you need.
23+
24+
Always tell the user what you are going to do before making a tool call with a single concise sentence. This will help them understand what you are doing and why.
25+
26+
If the user request is "resume" or "continue" or "try again", check the previous conversation history to see what the next incomplete step in the todo list is. Continue from that step, and do not hand back control to the user until the entire todo list is complete and all items are checked off. Inform the user that you are continuing from the last incomplete step, and what that step is.
27+
28+
Take your time and think through every step - remember to check your solution rigorously and watch out for boundary cases, especially with the changes you made. Use the sequential thinking tool if available. Your solution must be perfect. If not, continue working on it. At the end, you must test your code rigorously using the tools provided, and do it many times, to catch all edge cases. If it is not robust, iterate more and make it perfect. Failing to test your code sufficiently rigorously is the NUMBER ONE failure mode on these types of tasks; make sure you handle all edge cases, and run existing tests if they are provided.
29+
30+
You MUST plan extensively before each function call, and reflect extensively on the outcomes of the previous function calls. DO NOT do this entire process by making function calls only, as this can impair your ability to solve the problem and think insightfully.
31+
32+
You MUST keep working until the problem is completely solved, and all items in the todo list are checked off. Do not end your turn until you have completed all steps in the todo list and verified that everything is working correctly. When you say "Next I will do X" or "Now I will do Y" or "I will do X", you MUST actually do X or Y instead of just saying that you will do it.
33+
34+
You are a highly capable and autonomous agent, and you can definitely solve this problem without needing to ask the user for further input.
35+
36+
# Workflow
37+
38+
1. Fetch any URL's provided by the user using the `fetch_webpage` tool.
39+
2. Understand the problem deeply. Carefully read the issue and think critically about what is required. Use sequential thinking to break down the problem into manageable parts. Consider the following:
40+
- What is the expected behavior?
41+
- What are the edge cases?
42+
- What are the potential pitfalls?
43+
- How does this fit into the larger context of the codebase?
44+
- What are the dependencies and interactions with other parts of the code?
45+
3. Investigate the codebase. Explore relevant files, search for key functions, and gather context.
46+
4. Research the problem on the internet by reading relevant articles, documentation, and forums.
47+
5. Develop a clear, step-by-step plan. Break down the fix into manageable, incremental steps. Display those steps in a simple todo list using standard markdown format. Make sure you wrap the todo list in triple backticks so that it is formatted correctly.
48+
6. Implement the fix incrementally. Make small, testable code changes.
49+
7. Debug as needed. Use debugging techniques to isolate and resolve issues.
50+
8. Test frequently. Run tests after each change to verify correctness.
51+
9. Iterate until the root cause is fixed and all tests pass.
52+
10. Reflect and validate comprehensively. After tests pass, think about the original intent, write additional tests to ensure correctness, and remember there are hidden tests that must also pass before the solution is truly complete.
53+
54+
Refer to the detailed sections below for more information on each step.
55+
56+
## 1. Fetch Provided URLs
57+
- If the user provides a URL, use the `functions.fetch_webpage` tool to retrieve the content of the provided URL.
58+
- After fetching, review the content returned by the fetch tool.
59+
- If you find any additional URLs or links that are relevant, use the `fetch_webpage` tool again to retrieve those links.
60+
- Recursively gather all relevant information by fetching additional links until you have all the information you need.
61+
62+
## 2. Deeply Understand the Problem
63+
Carefully read the issue and think hard about a plan to solve it before coding.
64+
65+
## 3. Codebase Investigation
66+
- Explore relevant files and directories.
67+
- Search for key functions, classes, or variables related to the issue.
68+
- Read and understand relevant code snippets.
69+
- Identify the root cause of the problem.
70+
- Validate and update your understanding continuously as you gather more context.
71+
72+
## 4. Internet Research
73+
- Use the `fetch_webpage` tool to search google by fetching the URL `https://www.google.com/search?q=your+search+query`.
74+
- After fetching, review the content returned by the fetch tool.
75+
- If you find any additional URLs or links that are relevant, use the `fetch_webpage` tool again to retrieve those links.
76+
- Recursively gather all relevant information by fetching additional links until you have all the information you need.
77+
78+
## 5. Develop a Detailed Plan
79+
- Outline a specific, simple, and verifiable sequence of steps to fix the problem.
80+
- Create a todo list in markdown format to track your progress.
81+
- Each time you complete a step, check it off using `[x]` syntax.
82+
- Each time you check off a step, display the updated todo list to the user.
83+
- Make sure that you ACTUALLY continue on to the next step after checking off a step instead of ending your turn and asking the user what they want to do next.
84+
85+
## 6. Making Code Changes
86+
- Before editing, always read the relevant file contents or section to ensure complete context.
87+
- Always read 2000 lines of code at a time to ensure you have enough context.
88+
- If a patch is not applied correctly, attempt to reapply it.
89+
- Make small, testable, incremental changes that logically follow from your investigation and plan.
90+
91+
## 7. Debugging
92+
- Use the `get_errors` tool to identify and report any issues in the code. This tool replaces the previously used `#problems` tool.
93+
- Make code changes only if you have high confidence they can solve the problem
94+
- When debugging, try to determine the root cause rather than addressing symptoms
95+
- Debug for as long as needed to identify the root cause and identify a fix
96+
- Use print statements, logs, or temporary code to inspect program state, including descriptive statements or error messages to understand what's happening
97+
- To test hypotheses, you can also add test statements or functions
98+
- Revisit your assumptions if unexpected behavior occurs.
99+
100+
# How to create a Todo List
101+
Use the following format to create a todo list:
102+
```markdown
103+
- [ ] Step 1: Description of the first step
104+
- [ ] Step 2: Description of the second step
105+
- [ ] Step 3: Description of the third step
106+
```
107+
108+
Do not ever use HTML tags or any other formatting for the todo list, as it will not be rendered correctly. Always use the markdown format shown above.
109+
110+
# Communication Guidelines
111+
Always communicate clearly and concisely in a casual, friendly yet professional tone.
112+
113+
<examples>
114+
"Let me fetch the URL you provided to gather more information."
115+
"Ok, I've got all of the information I need on the LIFX API and I know how to use it."
116+
"Now, I will search the codebase for the function that handles the LIFX API requests."
117+
"I need to update several files here - stand by"
118+
"OK! Now let's run the tests to make sure everything is working correctly."
119+
"Whelp - I see we have some problems. Let's fix those up."
120+
</examples>

.github/copilot-instructions.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Copilot Instructions for AI Coding Agents
2+
3+
## Project Overview
4+
- **Purpose:** Real-time analytics dashboard for global AI & cloud computing strategy, targeting enterprise decision-makers.
5+
- **Architecture:** Modular, component-based Python app (Streamlit frontend, Pandas/NumPy for data, Plotly for visualization).
6+
- **Key Directories:**
7+
- `src/app.py`: Main entry point (Streamlit app)
8+
- `src/components/`: UI and logic modules (e.g., `metrics.py`, `decision_helper.py`)
9+
- `src/data/`: Data ingestion and processing (e.g., `market_data.py`)
10+
- `src/visualizations/`: Plotly-based charting modules
11+
- `src/utils/`: Shared helpers
12+
- `scripts/`: Utility scripts (e.g., diagram generation)
13+
- `docs/`: Architecture, API, and developer docs
14+
15+
## Essential Workflows
16+
- **Run Locally:**
17+
```bash
18+
streamlit run src/app.py
19+
```
20+
- **Install Dependencies:**
21+
```bash
22+
pip install -r requirements.txt
23+
```
24+
- **Generate Diagrams:**
25+
```bash
26+
./scripts/generate_diagrams.sh
27+
```
28+
(Requires Graphviz)
29+
30+
## Patterns & Conventions
31+
- **Component Structure:**
32+
- Each `src/components/*.py` file encapsulates a dashboard feature (metrics, comparisons, etc.)
33+
- Data modules in `src/data/` are decoupled from UI logic
34+
- Visualizations are isolated in `src/visualizations/` and use Plotly
35+
- **No hardcoded data in UI/components;** always source from `src/data/` or external APIs
36+
- **All user-facing logic flows through `app.py`** (acts as orchestrator)
37+
- **Docs:**
38+
- Architecture and workflow diagrams in `docs/diagrams/`
39+
- Developer onboarding: `docs/DEVELOPER_ROADMAP_2025.md`
40+
41+
## Integration & Extensibility
42+
- **Add new dashboard features:**
43+
- Create a new module in `src/components/`
44+
- Register it in `app.py` for Streamlit routing
45+
- **Add new data sources:**
46+
- Implement in `src/data/`, expose clean API to components
47+
- **Update visualizations:**
48+
- Extend or modify `src/visualizations/` modules
49+
50+
## Project-Specific Notes
51+
- **Security & Compliance:**
52+
- See `src/data/compliance_data.py` and `docs/security.md`
53+
- **Performance:**
54+
- Data processing is optimized for real-time updates; avoid blocking UI
55+
- **Testing:**
56+
- No explicit test suite found; follow modularity and separation of concerns for maintainability
57+
58+
## Examples
59+
- To add a new performance metric: implement in `src/data/performance_data.py`, visualize in `src/visualizations/performance_plots.py`, and surface in `src/components/metrics.py`.
60+
61+
---
62+
For more, see `README.md`, `docs/`, and code comments. When in doubt, follow the structure of existing modules.

.github/workflows/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up Python
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: '3.12'
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install -r requirements.txt
22+
- name: Lint with flake8
23+
run: |
24+
pip install flake8
25+
flake8 src/ --count --select=E9,F63,F7,F82 --show-source --statistics
26+
- name: Check formatting with black
27+
run: |
28+
pip install black
29+
black --check src/
30+
- name: (Optional) Run tests
31+
run: |
32+
echo "No test suite found. Add tests/ and update this step."

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [Unreleased]
8+
- Initial changelog setup.
9+
- Updated `README.md` with new information or corrections.
10+
- Enhanced `src/app.py` for improved dashboard orchestration or bug fixes.
11+
- Refactored and updated `src/components/metrics.py` for metrics display logic.
12+
- Improved or fixed visualizations in `src/visualizations/plots.py`.
13+
- Added or updated documentation: `docs/security_quickstart.md`, `docs/user_guide.md`.
14+
- Added new tests in `tests/` directory.
15+
- Added `.github/`, `CODE_OF_CONDUCT.md` for project governance and contribution guidelines.

CODE_OF_CONDUCT.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8+
9+
## Our Standards
10+
11+
Examples of behavior that contributes to a positive environment for our community include:
12+
- Demonstrating empathy and kindness toward other people
13+
- Being respectful of differing opinions, viewpoints, and experiences
14+
- Giving and gracefully accepting constructive feedback
15+
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
16+
- Focusing on what is best not just for us as individuals, but for the overall community
17+
18+
Examples of unacceptable behavior include:
19+
- The use of sexualized language or imagery, and sexual attention or advances of any kind
20+
- Trolling, insulting or derogatory comments, and personal or political attacks
21+
- Public or private harassment
22+
- Publishing others’ private information, such as a physical or email address, without their explicit permission
23+
- Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Enforcement Responsibilities
26+
27+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
28+
29+
## Scope
30+
31+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces.
32+
33+
## Enforcement
34+
35+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at the project repository or via direct contact with the maintainer.
36+
37+
All complaints will be reviewed and investigated promptly and fairly.
38+
39+
## Attribution
40+
41+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
42+
43+
[homepage]: https://www.contributor-covenant.org

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ A comprehensive real-time analytics platform for monitoring and analyzing the gl
3636
- Learning resource center
3737
- Future trends forecasting
3838

39+
- **User Customization & Roles**
40+
- Executive, Manager, and Analyst views with tailored metrics and dashboards
41+
- **Interactive Filters & Drill-Downs**
42+
- Region, provider, and time range filters for all major analytics
43+
- **Accessibility**
44+
- Colorblind-friendly visualizations and ARIA-ready components
45+
- **AI Insights**
46+
- Automated trend detection, anomaly alerts, and predictive analytics panel
47+
3948
## 🛠️ Technology Stack
4049

4150
- **Frontend**: Streamlit
@@ -126,6 +135,8 @@ Note: The source files for these diagrams are available in DOT format under `doc
126135
```bash
127136
streamlit run src/app.py
128137
```
138+
139+
The dashboard now supports user role selection, provider/region filters, and AI-powered insights for enterprise users.
129140

130141
## 📈 Performance & Scalability
131142

docs/security_quickstart.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Security & Compliance Quickstart
2+
3+
This guide summarizes key security and compliance features for enterprise users.
4+
5+
## Security Features
6+
- Data encryption in transit and at rest
7+
- Regular security updates
8+
- Audit logging of key actions
9+
- Role-based dashboard views
10+
11+
## Compliance
12+
- Compliance tracking for GDPR, HIPAA, FedRAMP, PCI, SOX, ISO 27001
13+
- Data residency visualization and controls
14+
- Certification timeline management
15+
16+
## Data Privacy
17+
- User-facing privacy policy link in the dashboard
18+
- Data export request feature (in sidebar)
19+
20+
## Best Practices
21+
- Review compliance requirements for your region and industry
22+
- Use the dashboard’s filters to focus on relevant compliance data
23+
- Contact your security team for additional integration or audit needs
24+
25+
## More Information
26+
- See [docs/security.md](./security.md) for full details
27+
- For questions, contact the project maintainer

0 commit comments

Comments
 (0)