Skip to content
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
505a24c
flet init
MH0386 May 1, 2025
01f0d4a
flet init
MH0386 May 1, 2025
e82445a
flet init
MH0386 May 1, 2025
c7c1cc7
flet init
MH0386 May 1, 2025
ac6c17a
flet init
MH0386 May 1, 2025
b49167b
flet init
MH0386 May 1, 2025
6fa8afc
flet init
MH0386 May 1, 2025
62021e5
flet init
MH0386 May 1, 2025
4121495
chore: update dependencies and improve project configuration
MH0386 May 2, 2025
9c468f3
Remove unused files and update main page title
MH0386 May 2, 2025
c3692f4
Update Docs
actions-user May 2, 2025
23ec1db
Refactor main.py and home.py for improved routing and layout
MH0386 May 2, 2025
2c40bbe
Merge branch 'flet' of https://github.com/MH0386/MH0386.github.io int…
MH0386 May 2, 2025
a91aa3f
Switches to Ruff and Ty for linting
MH0386 May 26, 2025
6bb0ff0
Adds necessary permissions and installs project
MH0386 May 26, 2025
2114be3
Restricts doc sync to main branch
MH0386 May 26, 2025
72ce01d
Adds Flutter dependency caching
MH0386 May 26, 2025
30a83e6
Adds GitHub Pages deployment workflow
MH0386 May 26, 2025
d41c6df
Updates web deployment to use Flet Publish
MH0386 May 26, 2025
a7bee1b
Removes Flutter dependency caching
MH0386 May 26, 2025
c5d0f5a
Refactors docs synchronization workflow
MH0386 May 26, 2025
a6bf237
Configures linters and formatters
MH0386 May 26, 2025
44c4822
Configures trunk and improves linting
MH0386 May 26, 2025
381f8d4
Removes IntelliJ IDEA project files
MH0386 May 26, 2025
49f060e
Adds code quality badges
MH0386 May 26, 2025
0e7e35b
Configures pyright settings
MH0386 May 26, 2025
7d92348
Disables attribute access issue reporting
MH0386 May 26, 2025
32af600
Merge branch 'main' into flet
MH0386 May 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
version = 1
version=1

[[analyzers]]
name = "rust"
dependency_file_paths=["pyproject.toml"]
name="python"

[analyzers.meta]
msrv = "stable"
additional_builtins=["_", "pretty_output"]
runtime_version="3.x.x"
type_checker="mypy"

[[analyzers]]
name = "secrets"
name="docker"

[[analyzers]]
name="secrets"

[[transformers]]
name = "rustfmt"
name="ruff"
4 changes: 0 additions & 4 deletions .flox/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions .flox/env.json

This file was deleted.

145 changes: 0 additions & 145 deletions .flox/env/manifest.lock

This file was deleted.

76 changes: 0 additions & 76 deletions .flox/env/manifest.toml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/dependabot.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/code_analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Trunk Code Quality
on:
push:
pull_request:
permissions: read-all
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
trunk:
name: Trunk Code Quality
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
id: uv
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
activate-environment: true
- name: Install the project
run: uv sync --frozen
- name: Trunk Code Quality
uses: trunk-io/trunk-action@v1
with:
check-mode: all
arguments: --github-annotate-new-only=false
40 changes: 40 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Deploy to GitHub Pages
on:
workflow_dispatch:
push:
permissions:
contents: write
pages: write
id-token: write
jobs:
build_web:
name: Build Web
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: UV
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
activate-environment: true
- name: Install the project
run: uv sync --frozen
- name: Build
run: flet publish
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: dist/
Comment on lines +22 to +29
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add error handling and build validation.

Consider adding validation steps to ensure the build succeeds and produces expected artifacts.

Apply this diff to add build validation:

      - name: Build
        run: flet publish
+      - name: Validate build output
+        run: |
+          if [ ! -d "dist" ]; then
+            echo "Error: dist directory not found after build"
+            exit 1
+          fi
+          if [ -z "$(ls -A dist)" ]; then
+            echo "Error: dist directory is empty"
+            exit 1
+          fi
+          echo "Build validation successful"
      - name: Upload artifact
        uses: actions/upload-pages-artifact@v3
        with:
          path: dist/
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Install the project
run: uv sync --frozen
- name: Build
run: flet publish
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: dist/
- name: Install the project
run: uv sync --frozen
- name: Build
run: flet publish
- name: Validate build output
run: |
if [ ! -d "dist" ]; then
echo "Error: dist directory not found after build"
exit 1
fi
if [ -z "$(ls -A dist)" ]; then
echo "Error: dist directory is empty"
exit 1
fi
echo "Build validation successful"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: dist/
🤖 Prompt for AI Agents
In .github/workflows/deploy.yml around lines 22 to 29, the current workflow
lacks error handling and validation after the build step. Modify the workflow to
check the success of the build command and verify that the expected artifacts
exist before proceeding to upload. Add conditional checks or commands that fail
the workflow if the build fails or if the artifact directory is missing or
empty, ensuring the deployment only continues on successful builds.

deploy_web:
name: Deploy Web
runs-on: ubuntu-latest
needs: build_web
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Loading
Loading