Skip to content

Commit 85aa784

Browse files
Merge pull request #21 from Havilah-Blockchain-Studios/main
Chore: fix the changes for github pages
2 parents 1be35ec + 6029be8 commit 85aa784

7 files changed

Lines changed: 254 additions & 72 deletions

File tree

β€Ž.github/workflows/deploy-pages.ymlβ€Ž

Lines changed: 68 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,73 @@ jobs:
3636
pip install requests python-dateutil
3737
3838
- name: Generate submission data
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3941
run: |
4042
python << 'EOF'
4143
import json
4244
import os
4345
import glob
46+
import requests
4447
from pathlib import Path
4548
from datetime import datetime, timezone
4649
50+
def fetch_pr_data():
51+
"""Fetch PR data from GitHub API"""
52+
token = os.environ.get('GITHUB_TOKEN')
53+
repo = os.environ.get('GITHUB_REPOSITORY', 'PlotSenseAI/PlotSenseAI-Hackathon-Submissions')
54+
55+
headers = {'Authorization': f'token {token}'} if token else {}
56+
57+
# Fetch open PRs targeting review branch
58+
open_prs_url = f'https://api.github.com/repos/{repo}/pulls?state=open&base=review&per_page=100'
59+
merged_prs_url = f'https://api.github.com/repos/{repo}/pulls?state=closed&base=review&per_page=100'
60+
61+
pr_data = {
62+
'open_prs': [],
63+
'merged_prs': [],
64+
'total_open': 0,
65+
'total_merged': 0
66+
}
67+
68+
try:
69+
# Get open PRs
70+
response = requests.get(open_prs_url, headers=headers, timeout=10)
71+
if response.status_code == 200:
72+
open_prs = response.json()
73+
pr_data['open_prs'] = [{
74+
'number': pr['number'],
75+
'title': pr['title'],
76+
'user': pr['user']['login'],
77+
'created_at': pr['created_at'],
78+
'html_url': pr['html_url'],
79+
'state': 'open'
80+
} for pr in open_prs]
81+
pr_data['total_open'] = len(pr_data['open_prs'])
82+
83+
# Get merged PRs
84+
response = requests.get(merged_prs_url, headers=headers, timeout=10)
85+
if response.status_code == 200:
86+
closed_prs = response.json()
87+
merged_prs = [pr for pr in closed_prs if pr.get('merged_at')]
88+
pr_data['merged_prs'] = [{
89+
'number': pr['number'],
90+
'title': pr['title'],
91+
'user': pr['user']['login'],
92+
'created_at': pr['created_at'],
93+
'merged_at': pr['merged_at'],
94+
'html_url': pr['html_url'],
95+
'state': 'merged'
96+
} for pr in merged_prs]
97+
pr_data['total_merged'] = len(pr_data['merged_prs'])
98+
99+
print(f"Fetched {pr_data['total_open']} open PRs and {pr_data['total_merged']} merged PRs")
100+
101+
except Exception as e:
102+
print(f"Error fetching PR data: {e}")
103+
104+
return pr_data
105+
47106
def collect_submissions():
48107
submissions = []
49108
submission_files = []
@@ -83,7 +142,7 @@ jobs:
83142
84143
return submissions
85144
86-
def generate_metrics(submissions):
145+
def generate_metrics(submissions, pr_data):
87146
if not submissions:
88147
return {
89148
'total_submissions': 0,
@@ -92,7 +151,8 @@ jobs:
92151
'status_counts': {'validated': 0, 'pending': 0, 'failed': 0},
93152
'tech_stack_usage': {},
94153
'team_sizes': {},
95-
'submission_timeline': []
154+
'submission_timeline': [],
155+
'prs': pr_data
96156
}
97157
98158
metrics = {
@@ -102,7 +162,8 @@ jobs:
102162
'status_counts': {'validated': 0, 'pending': 0, 'failed': 0},
103163
'tech_stack_usage': {},
104164
'team_sizes': {},
105-
'submission_timeline': []
165+
'submission_timeline': [],
166+
'prs': pr_data
106167
}
107168
108169
for track in ['PlotSense ML', 'PlotSense Dev']:
@@ -131,9 +192,12 @@ jobs:
131192
132193
return metrics
133194
195+
# Fetch PR data
196+
pr_data = fetch_pr_data()
197+
134198
# Collect September 2025 submissions
135199
submissions = collect_submissions()
136-
metrics = generate_metrics(submissions)
200+
metrics = generate_metrics(submissions, pr_data)
137201
138202
# Create directory structure for September 2025 hackathon
139203
os.makedirs('docs/data/september-2025', exist_ok=True)

β€Ž.github/workflows/validate-submission.ymlβ€Ž

Lines changed: 72 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
pip install jsonschema requests
3232
3333
- name: Validate submission
34+
id: validate
3435
run: |
3536
python << 'EOF'
3637
import json
@@ -136,19 +137,76 @@ jobs:
136137
else:
137138
validation_results.append("INFO: **Contribution PRs** - Not required for ML track")
138139
139-
# Build report
140+
# Build detailed report
140141
report = "## Submission Validation Results\n\n"
141-
report += f"**File:** `{json_file.name}`\n\n"
142+
report += f"**Submission File:** `{json_file.name}`\n\n"
142143
143-
if missing_fields:
144+
# Determine overall status
145+
failed_checks = [r for r in results + validation_results if "FAIL" in r]
146+
passed_checks = [r for r in results + validation_results if "PASS" in r]
147+
info_checks = [r for r in results + validation_results if "INFO" in r]
148+
149+
if missing_fields or any("FAIL" in r for r in validation_results):
144150
report += "### VALIDATION FAILED\n\n"
145-
elif any("FAIL" in r for r in validation_results):
146-
report += "### PARTIAL VALIDATION\n\n"
151+
report += f"**Status:** {len(failed_checks)} check(s) failed, {len(passed_checks)} check(s) passed\n\n"
152+
report += "---\n\n"
147153
else:
148154
report += "### VALIDATION PASSED\n\n"
149-
150-
report += "**Required Fields Check:**\n" + "\n".join(f"- {r}" for r in results) + "\n\n"
151-
report += "**Additional Validations:**\n" + "\n".join(f"- {r}" for r in validation_results) + "\n"
155+
report += f"**Status:** All {len(passed_checks)} checks passed successfully!\n\n"
156+
report += "---\n\n"
157+
158+
# Show failed checks first if any
159+
if failed_checks:
160+
report += "### Failed Checks (Action Required)\n\n"
161+
report += "**Please fix the following issues:**\n\n"
162+
for i, check in enumerate(failed_checks, 1):
163+
clean_check = check.replace("FAIL: ", "")
164+
report += f"{i}. {clean_check}\n"
165+
report += "\n---\n\n"
166+
167+
# Show all required fields check
168+
report += "### Required Fields\n\n"
169+
for result in results:
170+
if "PASS" in result:
171+
clean_result = result.replace("PASS: ", "")
172+
report += f"- [PASS] {clean_result}\n"
173+
elif "FAIL" in result:
174+
clean_result = result.replace("FAIL: ", "")
175+
report += f"- [FAIL] {clean_result}\n"
176+
report += "\n"
177+
178+
# Show additional validations
179+
report += "### Additional Validations\n\n"
180+
for result in validation_results:
181+
if "PASS" in result:
182+
clean_result = result.replace("PASS: ", "")
183+
report += f"- [PASS] {clean_result}\n"
184+
elif "FAIL" in result:
185+
clean_result = result.replace("FAIL: ", "")
186+
report += f"- [FAIL] {clean_result}\n"
187+
elif "INFO" in result:
188+
clean_result = result.replace("INFO: ", "")
189+
report += f"- [INFO] {clean_result}\n"
190+
report += "\n"
191+
192+
# Add helpful instructions if there are failures
193+
if failed_checks:
194+
report += "---\n\n"
195+
report += "### How to Fix\n\n"
196+
report += "1. Review the **Failed Checks** section above\n"
197+
report += "2. Update your submission JSON file with the required information\n"
198+
report += "3. Commit and push your changes to re-trigger validation\n"
199+
report += "4. Ensure your repository URL follows the format: `plotsenseai-hackathon-PSH2025-XXX`\n"
200+
report += "5. For Dev track submissions, include valid PR links to the PlotSense repository\n\n"
201+
202+
# Summary
203+
report += "---\n\n"
204+
report += "### Validation Summary\n\n"
205+
report += f"- **Total Checks:** {len(results) + len(validation_results)}\n"
206+
report += f"- **Passed:** {len(passed_checks)}\n"
207+
report += f"- **Failed:** {len(failed_checks)}\n"
208+
if info_checks:
209+
report += f"- **Info:** {len(info_checks)}\n"
152210
153211
return report
154212
@@ -157,11 +215,15 @@ jobs:
157215
with open('validation_results.txt', 'w') as f:
158216
f.write(validation_report)
159217
218+
# Write to GitHub Actions summary
219+
with open(os.environ.get('GITHUB_STEP_SUMMARY', 'summary.md'), 'w') as f:
220+
f.write(validation_report)
221+
160222
if "VALIDATION FAILED" in validation_report or "PARTIAL VALIDATION" in validation_report:
161-
print("Validation failed - check results")
223+
print("::error::Validation failed - check results for details")
162224
sys.exit(1)
163225
else:
164-
print("Validation passed!")
226+
print("::notice::Validation passed successfully!")
165227
EOF
166228
167229
- name: Comment on PR

β€ŽDEV_TRACK_GUIDE.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ Create or update your team's submission file:
142142
### Submission Steps
143143

144144
1. **Create Your Contribution PR**: Submit your PR to PlotSenseAI/PlotSense
145-
2. **Document Your Submission**: Create a JSON file in `submissions/september-2025/dev/your-team-name.json`
146-
3. **Submit Your Entry**: Create a PR to this repository with your submission file
145+
2. **Document Your Submission**: Create a JSON file in `submissions/plotsense-2025-dev/your-team-name.json`
146+
3. **Submit Your Entry**: Create a PR to the official [PlotSenseAI-Hackathon-Submissions](https://github.com/PlotSenseAI/PlotSenseAI-Hackathon-Submissions) repository with your submission file
147147

148148
## Quality Guidelines
149149

β€ŽREADME.mdβ€Ž

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# πŸš€ PlotSenseAI OpenSource Hackathon Submissions
2+
# PlotSenseAI OpenSource Hackathon Submissions
33

44
![Submission Validation](https://github.com/PlotSenseAI/PlotSenseAI-Hackathon-Submissions/workflows/Validate%20Submission/badge.svg)
55

@@ -9,19 +9,19 @@ Welcome to the official submission repository for the **PlotSenseAI Hackathon**
99
Access the live dashboard of submissions and their statuses here:
1010
[![Hackathon Dashboard](https://img.shields.io/badge/Dashboard-View%20Submissions-blue?logo=github)](https://plotsenseai.github.io/PlotSenseAI-Hackathon-Submissions/)
1111

12-
## πŸ† Prize Pool Breakdown
12+
## Prize Pool Breakdown
1313

14-
πŸ’° **Total Prize Pool: Β£600**
14+
**Total Prize Pool: Β£600**
1515

16-
### πŸ… Track 1 β€” PlotSense ML (Β£200)
16+
### Track 1 β€” PlotSense ML (Β£200)
1717
Use PlotSenseAI as your primary tool for exploratory data analysis (EDA) in a machine learning project.
1818

19-
### πŸ… Track 2 β€” PlotSense Dev (Β£400)
19+
### Track 2 β€” PlotSense Dev (Β£400)
2020
Develop modules that add advanced analytical capabilities to PlotSenseAI's core functionality.
2121

22-
πŸ“– **For detailed guidelines on Dev Track contributions, see [DEV_TRACK_GUIDE.md](DEV_TRACK_GUIDE.md)**
22+
**For detailed guidelines on Dev Track contributions, see [DEV_TRACK_GUIDE.md](DEV_TRACK_GUIDE.md)**
2323

24-
## πŸ“‹ Submission Process
24+
## Submission Process
2525

2626
### Step 1: Fill the Submission Form
2727
- Complete the [Google Form](https://forms.gle/pdBzSpuJ9iV3Tkhy8 "Open the submission form") with:
@@ -44,8 +44,11 @@ Create a **public GitHub repository** with:
4444

4545
### Step 3: Submit to This Repository
4646

47-
#### 🍴 Fork & Create Submission
48-
1. **Fork** this repository to your GitHub account
47+
> **Important:** Submit your entry to the official PlotSense Hackathon Submissions repository:
48+
> **https://github.com/PlotSenseAI/PlotSenseAI-Hackathon-Submissions/**
49+
50+
#### Fork & Create Submission
51+
1. **Fork** the [PlotSenseAI-Hackathon-Submissions](https://github.com/PlotSenseAI/PlotSenseAI-Hackathon-Submissions) repository to your GitHub account
4952
2. **Choose your track** and navigate to the appropriate directory:
5053
- **PlotSense ML Track**: `submissions/plotsense-2025-ml/`
5154
- **PlotSense Dev Track**: `submissions/plotsense-2025-dev/`
@@ -100,7 +103,7 @@ Create a **public GitHub repository** with:
100103
}
101104
```
102105

103-
#### πŸ“€ Submit Pull Request
106+
#### Submit Pull Request
104107
1. **Commit** your JSON file to your fork
105108
2. **Open a Pull Request** to the `review` branch
106109
3. **PR Title:** `Submission: [YOUR-ID] - [Project Name]`
@@ -121,13 +124,13 @@ Create a **public GitHub repository** with:
121124
Post in the `#submissions` Discord channel with:
122125
- GitHub repo link
123126

124-
## πŸ”€ Branch Structure
127+
## Branch Structure
125128

126129
- **`main`** β†’ Official docs and approved submissions
127130
- **`review`** β†’ Submit PRs here for review
128131
- **`archive/plotsense-2025`** β†’ Post-hackathon archive
129132

130-
## βœ… Requirements Checklist
133+
## Requirements Checklist
131134

132135
Before submitting, ensure you have:
133136
- [ ] Filled out the Google Form and received your User ID
@@ -141,26 +144,26 @@ Before submitting, ensure you have:
141144
- [ ] Followed PlotSenseAI and Havilah Academy on X/Twitter, LinkedIn, and YouTube
142145
- [ ] Posted in Discord #submissions channel
143146

144-
## 🎯 Important Notes
147+
## Important Notes
145148

146149
- **One submission per team** - Only one JSON file per team
147150
- **Valid contact email required** - We'll use it for updates
148151
- **Complete all requirements** - Incomplete submissions may not be considered
149152
- **Public repositories only** - Ensure your project repo is public
150153

151-
## πŸ€– Automated Validation
154+
## Automated Validation
152155

153156
When you submit your PR, our automated system will:
154-
- βœ… **Validate your JSON format** - Check all required fields are present
155-
- βœ… **Verify User ID format** - Ensure it matches PSH2025-XXX pattern
156-
- βœ… **Check repository URL** - Confirm it's a GitHub URL with your User ID
157-
- βœ… **Validate social media** - Ensure both Twitter/X and LinkedIn links are provided
158-
- βœ… **Verify email format** - Check your contact email is valid
159-
- βœ… **Review team structure** - Validate team member information
157+
- **Validate your JSON format** - Check all required fields are present
158+
- **Verify User ID format** - Ensure it matches PSH2025-XXX pattern
159+
- **Check repository URL** - Confirm it's a GitHub URL with your User ID
160+
- **Validate social media** - Ensure both Twitter/X and LinkedIn links are provided
161+
- **Verify email format** - Check your contact email is valid
162+
- **Review team structure** - Validate team member information
160163

161164
The bot will comment on your PR with validation results. **Fix any issues** and push changes to re-trigger validation.
162165

163-
## πŸ† Post-Hackathon
166+
## Post-Hackathon
164167

165168
After the hackathon, all approved submissions will be:
166169
- Showcased on the PlotSenseAI website
@@ -172,6 +175,6 @@ After the hackathon, all approved submissions will be:
172175

173176
**Questions?** Reach out in the Discord server.
174177

175-
Happy hacking! πŸš€
178+
Happy hacking!
176179

177180

0 commit comments

Comments
Β (0)