Skip to content

Commit 9575bdc

Browse files
Merge pull request #53 from Cameroon-Developer-Network/main
merging changes
2 parents 5115127 + 788d94c commit 9575bdc

27 files changed

Lines changed: 203 additions & 210 deletions

.deepsource.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version = 1
2+
3+
[[analyzers]]
4+
name = "python"
5+
6+
[analyzers.meta]
7+
runtime_version = "3.x.x"
8+
9+
[[analyzers]]
10+
name = "shell"

.github/workflows/ai-model.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ jobs:
3030
name: Validate AI Model
3131
runs-on: ubuntu-latest
3232
steps:
33-
- uses: actions/checkout@v3
33+
- uses: actions/checkout@v4
3434

3535
- name: Set up Python
36-
uses: actions/setup-python@v4
36+
uses: actions/setup-python@v5
3737
with:
3838
python-version: "3.10"
3939
cache: 'pip'
@@ -65,7 +65,7 @@ jobs:
6565
exit 0
6666
6767
- name: Upload test results
68-
uses: actions/upload-artifact@v3
68+
uses: actions/upload-artifact@v4
6969
with:
7070
name: test-results
7171
path: |

.github/workflows/ci.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
name: CI
22

33
on:
4-
push:
5-
branches: [ main, develop ]
6-
paths-ignore:
7-
- 'docs/**'
8-
- '**.md'
9-
- '.github/*.yml'
10-
pull_request:
11-
branches: [ main, develop ]
12-
paths-ignore:
13-
- 'docs/**'
14-
- '**.md'
15-
- '.github/*.yml'
164
workflow_dispatch:
175

186
env:

.github/workflows/code-quality.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -80,25 +80,6 @@ jobs:
8080
fi
8181
continue-on-error: true
8282

83-
- name: Generate quality report
84-
if: always()
85-
run: |
86-
echo "## Code Quality Report" > quality-report.md
87-
echo "### Status" >> quality-report.md
88-
echo "- Formatting: ${{ job.steps.black.outcome || 'SKIPPED' }}" >> quality-report.md
89-
echo "- Imports: ${{ job.steps.isort.outcome || 'SKIPPED' }}" >> quality-report.md
90-
echo "- Linting: ${{ job.steps.lint.outcome || 'SKIPPED' }}" >> quality-report.md
91-
echo "- Type Check: ${{ job.steps.mypy.outcome || 'SKIPPED' }}" >> quality-report.md
92-
echo "### Summary" >> quality-report.md
93-
echo "Quality checks completed with non-blocking warnings." >> quality-report.md
94-
- name: Upload quality report
95-
if: always()
96-
uses: actions/upload-artifact@v4
97-
with:
98-
name: code-quality-report
99-
path: quality-report.md
100-
retention-days: 5
101-
10283
documentation:
10384
runs-on: ubuntu-latest
10485
steps:

.github/workflows/dependencies.yml

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,6 @@
11
name: Dependency Management
22

33
on:
4-
push:
5-
paths:
6-
- 'requirements*.txt'
7-
- 'pyproject.toml'
8-
- 'poetry.lock'
9-
- 'package.json'
10-
- 'package-lock.json'
11-
- '.github/workflows/dependencies.yml'
12-
pull_request:
13-
paths:
14-
- 'requirements*.txt'
15-
- 'pyproject.toml'
16-
- 'poetry.lock'
17-
- 'package.json'
18-
- 'package-lock.json'
19-
schedule:
20-
- cron: '0 0 * * 1' # Weekly on Monday
214
workflow_dispatch:
225

236
jobs:
@@ -65,29 +48,4 @@ jobs:
6548
else
6649
echo "Safety check skipped - tool or requirements not available"
6750
fi
68-
continue-on-error: true
69-
70-
- name: Generate dependency report
71-
if: always()
72-
run: |
73-
echo "## Dependency Report" > dependency-report.md
74-
echo "### Python Dependencies" >> dependency-report.md
75-
if [ -f "requirements.txt" ]; then
76-
echo "Found requirements.txt:" >> dependency-report.md
77-
echo "\`\`\`" >> dependency-report.md
78-
cat requirements.txt >> dependency-report.md
79-
echo "\`\`\`" >> dependency-report.md
80-
else
81-
echo "No requirements.txt found." >> dependency-report.md
82-
fi
83-
echo "### Status" >> dependency-report.md
84-
echo "- Requirements Check: ${{ job.steps.validate.outcome || 'SKIPPED' }}" >> dependency-report.md
85-
echo "- Security Check: ${{ job.steps.safety.outcome || 'SKIPPED' }}" >> dependency-report.md
86-
87-
- name: Upload dependency report
88-
if: always()
89-
uses: actions/upload-artifact@v3
90-
with:
91-
name: dependency-report
92-
path: dependency-report.md
93-
retention-days: 5
51+
continue-on-error: true

.github/workflows/deploy-monitor.yml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,4 @@ jobs:
6767
run: |
6868
echo "Running performance checks in ${{ inputs.environment }}..."
6969
# Placeholder for performance checks
70-
exit 0
71-
72-
- name: Generate Report
73-
run: |
74-
echo "## Deployment and Monitoring Report" > deploy-report.md
75-
echo "Environment: ${{ inputs.environment }}" >> deploy-report.md
76-
echo "Action: ${{ inputs.action }}" >> deploy-report.md
77-
echo "Status: Completed" >> deploy-report.md
78-
echo "Timestamp: $(date)" >> deploy-report.md
79-
80-
- name: Upload Report
81-
uses: actions/upload-artifact@v3
82-
with:
83-
name: deployment-report
84-
path: deploy-report.md
85-
retention-days: 5
70+
exit 0

.github/workflows/docs.yml

Lines changed: 19 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -14,93 +14,38 @@ on:
1414
- 'mkdocs.yml'
1515
workflow_dispatch:
1616

17+
permissions:
18+
contents: write
19+
1720
jobs:
1821
docs:
19-
name: Build Documentation
22+
name: Build and Deploy Documentation
2023
runs-on: ubuntu-latest
2124
steps:
2225
- uses: actions/checkout@v3
26+
with:
27+
fetch-depth: 0
2328

2429
- name: Set up Python
2530
uses: actions/setup-python@v4
2631
with:
2732
python-version: "3.10"
28-
cache: 'pip'
29-
30-
- name: Install dependencies
31-
run: |
32-
python -m pip install --upgrade pip
33-
pip install mkdocs-material mkdocs-material-extensions pymdown-extensions || pip install mkdocs
34-
35-
- name: Create default mkdocs config
36-
run: |
37-
if [ ! -f "mkdocs.yml" ]; then
38-
echo "Creating default mkdocs.yml"
39-
{
40-
echo "site_name: Amega AI"
41-
echo "theme:"
42-
echo " name: material"
43-
echo "nav:"
44-
echo " - Home: index.md"
45-
echo " - About: about.md"
46-
} > mkdocs.yml
47-
fi
4833

49-
- name: Ensure docs structure
34+
- name: Install MkDocs and theme
5035
run: |
51-
mkdir -p docs
52-
if [ ! -f "docs/index.md" ]; then
53-
echo "# Welcome to Amega AI" > docs/index.md
54-
echo "Documentation is under construction." >> docs/index.md
55-
fi
56-
if [ ! -f "docs/about.md" ]; then
57-
echo "# About Amega AI" > docs/about.md
58-
echo "More information coming soon." >> docs/about.md
59-
fi
60-
61-
- name: Validate mkdocs config
62-
run: |
63-
if command -v mkdocs &> /dev/null; then
64-
mkdocs build --strict || mkdocs build
65-
else
66-
echo "mkdocs not available, creating basic HTML"
67-
mkdir -p site
68-
cp -r docs/* site/
69-
fi
70-
continue-on-error: true
36+
pip install mkdocs-material==9.6.14 \
37+
mkdocs-material-extensions==1.3.1 \
38+
pymdown-extensions==10.15
7139
7240
- name: Build documentation
73-
if: success() || failure()
74-
run: |
75-
if command -v mkdocs &> /dev/null; then
76-
mkdocs build || echo "Build failed, using basic structure"
77-
if [ $? -ne 0 ]; then
78-
mkdir -p site
79-
cp -r docs/* site/
80-
fi
81-
else
82-
mkdir -p site
83-
cp -r docs/* site/
84-
fi
41+
run: mkdocs build --strict
8542

86-
- name: Generate build report
87-
if: always()
43+
- name: Deploy to GitHub Pages
44+
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8847
run: |
89-
echo "## Documentation Build Report" > docs-report.md
90-
echo "### Status" >> docs-report.md
91-
echo "- Config: $([ -f mkdocs.yml ] && echo 'FOUND' || echo 'CREATED')" >> docs-report.md
92-
echo "- Build: ${{ job.steps.build.outcome || 'BASIC' }}" >> docs-report.md
93-
echo "### Files" >> docs-report.md
94-
echo "\`\`\`" >> docs-report.md
95-
ls -R site/ >> docs-report.md
96-
echo "\`\`\`" >> docs-report.md
97-
98-
- name: Upload documentation
99-
if: always()
100-
uses: actions/upload-artifact@v4
101-
with:
102-
name: documentation
103-
path: |
104-
site/
105-
docs-report.md
106-
retention-days: 5
48+
git config --global user.name "github-actions[bot]"
49+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
50+
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}
51+
mkdocs gh-deploy --force

.github/workflows/gpt-check.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,21 @@ jobs:
88
review:
99
runs-on: ubuntu-latest
1010
name: Code Review GPT
11+
permissions:
12+
contents: read
13+
pull-requests: write
1114
steps:
12-
13-
- name: Checkout code
14-
uses: actions/checkout@v3
15-
16-
- name: Run PullRequestGPT
17-
uses: pullrequestgpt/actions/pr-gpt-review@v3
18-
1915
- uses: actions/checkout@v3
2016
with:
2117
fetch-depth: 0
2218

2319
- name: Code Review GPT
2420
uses: mattzcarey/code-review-gpt@main
25-
2621
with:
2722
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2823
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
2924
MODEL: "gpt-3.5-turbo"
3025
LANGUAGE: "en"
26+
REVIEW_COMMENT_PREFIX: "🤖 AI Review:"
27+
REVIEW_STYLE: "code-improvement"
28+
VERBOSE: true

.github/workflows/issue-pr.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ jobs:
4848
} catch (e) {
4949
console.log('Error processing issue:', e.message);
5050
}
51-
5251
- name: Check PR Title
5352
if: github.event_name == 'pull_request'
5453
uses: actions/github-script@v6
@@ -74,26 +73,3 @@ jobs:
7473
} catch (e) {
7574
console.log('Error checking PR title:', e.message);
7675
}
77-
78-
- name: Generate Report
79-
if: always()
80-
run: |
81-
echo "## Triage Report" > triage-report.md
82-
echo "Event: ${{ github.event_name }}" >> triage-report.md
83-
echo "Action: ${{ github.event.action }}" >> triage-report.md
84-
if [ "${{ github.event_name }}" = "issues" ]; then
85-
echo "Issue: #${{ github.event.issue.number }}" >> triage-report.md
86-
echo "Title: ${{ github.event.issue.title }}" >> triage-report.md
87-
elif [ "${{ github.event_name }}" = "pull_request" ]; then
88-
echo "PR: #${{ github.event.pull_request.number }}" >> triage-report.md
89-
echo "Title: ${{ github.event.pull_request.title }}" >> triage-report.md
90-
fi
91-
echo "Status: Completed" >> triage-report.md
92-
93-
- name: Upload Report
94-
if: always()
95-
uses: actions/upload-artifact@v4
96-
with:
97-
name: triage-report
98-
path: triage-report.md
99-
retention-days: 5

.github/workflows/performance.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ jobs:
8585
runs-on: ubuntu-latest
8686
needs: performance
8787
steps:
88-
- uses: actions/checkout@v3
88+
- uses: actions/checkout@v4
8989

9090
- name: Set up Python
91-
uses: actions/setup-python@v4
91+
uses: actions/setup-python@v5
9292
with:
9393
python-version: '3.10'
9494

0 commit comments

Comments
 (0)