Skip to content

Commit 62d4341

Browse files
authored
Refactor/open source cleanup (#4)
* refactor: continue open source cleanup - Move instructions from .github/ to .claude/CLAUDE.md - Add conventional commit format guidelines - Remove yolact plugin (deprecated) - Update plugin examples and requirements - Reorganize project file structure - Code improvements across UI and canvas components * refactor: update Qt version to 6.4.0 and add CI workflows - Update Qt version references from 6.8.0 to 6.4.0 across all docs - Add Qt installation instructions for Linux, macOS, and Windows - Remove unused eventFilter from MainWindow - Add GitHub Actions CI/CD workflows * fix(ci): update Qt version to 6.5.3 LTS for CI availability Qt 6.4.0 is no longer available in aqtinstall archives. Updated to Qt 6.5.3 LTS with correct architecture names: - Linux: gcc_64 - Windows: win64_msvc2019_64 - macOS: clang_64 * docs: update Qt version to 6.5.3 across documentation
1 parent ef32003 commit 62d4341

21 files changed

+944
-396
lines changed
Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,42 @@ PolySeg is a Qt6-based polygon annotation tool for creating instance segmentatio
2323
- Run formatting before commits: `clang-format -i *.cpp *.h`
2424
- Run linting: `clang-tidy *.cpp -- -I/path/to/qt/include`
2525

26+
### Commit Message Format
27+
Use conventional commit format with the following structure:
28+
29+
```
30+
<type>(<scope>): <subject>
31+
32+
<body>
33+
34+
<footer>
35+
```
36+
37+
**Types:**
38+
- `feat`: New feature
39+
- `fix`: Bug fix
40+
- `docs`: Documentation changes
41+
- `style`: Code style changes (formatting, no logic change)
42+
- `refactor`: Code refactoring (no feature or fix)
43+
- `test`: Adding or updating tests
44+
- `chore`: Build, config, or tooling changes
45+
46+
**Rules:**
47+
- Subject line: max 50 characters, imperative mood, no period
48+
- Body: wrap at 72 characters, explain what and why (not how)
49+
- Scope: optional, e.g., `canvas`, `mainwindow`, `plugins`, `ui`
50+
51+
**Examples:**
52+
```
53+
feat(canvas): add multi-polygon selection support
54+
55+
fix(plugins): resolve memory leak in AI model loading
56+
57+
docs: update build instructions for Qt 6.4
58+
59+
refactor(mainwindow): extract file dialog logic to separate method
60+
```
61+
2662
## Architecture
2763

2864
### Core Components
@@ -150,13 +186,13 @@ painter.drawLine(p1, p2);
150186
- Use `QFileInfo` for path manipulation
151187
152188
## Testing Guidelines
153-
- Build: `qmake PolySeg.pro && make`
189+
- Build: `qmake6 PolySeg.pro && make -j4`
154190
- Run: `./PolySeg`
155191
- Test multi-polygon: Draw → Enter → Draw → Enter → Save
156192
- Verify annotation format: Check .txt file has multiple lines
157193
158194
## Dependencies
159-
- Qt 6.8.0 (Core, Widgets, GUI)
195+
- Qt 6.5.3 (Core, Widgets, GUI)
160196
- C++17 compiler
161197
- Future: OpenCV (for AI features in Phase 7)
162198
@@ -243,7 +279,7 @@ Example:
243279
244280
## Technologies:
245281
246-
- Qt 6.8.0
282+
- Qt 6.5.3
247283
- C++
248284
- QPainter for 2D graphics
249285
- Qt Designer for UI
@@ -252,15 +288,15 @@ Example:
252288
253289
Project uses Qt Creator and qmake. Build from the `build` directory:
254290
```bash
255-
cd /home/lstac/SourceCode/PolySeg/build
256-
qmake ../src/PolySeg.pro
291+
cd build
292+
qmake ../PolySeg.pro
257293
make -j$(nproc)
258294
```
259295

260296
For clean build:
261297
```bash
262-
cd /home/lstac/SourceCode/PolySeg/build
298+
cd build
263299
make clean
264-
qmake ../src/PolySeg.pro
300+
qmake ../PolySeg.pro
265301
make -j$(nproc)
266302
```

.github/workflows/build.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ main, master, develop ]
6+
pull_request:
7+
branches: [ main, master, develop ]
8+
9+
jobs:
10+
build-linux:
11+
runs-on: ubuntu-24.04
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Install Qt
16+
uses: jurplel/install-qt-action@v4
17+
with:
18+
version: '6.5.3'
19+
host: 'linux'
20+
target: 'desktop'
21+
arch: 'gcc_64'
22+
cache: true
23+
24+
- name: Build
25+
run: |
26+
qmake PolySeg.pro CONFIG+=release
27+
make -j$(nproc)
28+
29+
- name: Upload artifact
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: PolySeg-linux
33+
path: PolySeg
34+
35+
build-windows:
36+
runs-on: windows-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- name: Install Qt
41+
uses: jurplel/install-qt-action@v4
42+
with:
43+
version: '6.5.3'
44+
host: 'windows'
45+
target: 'desktop'
46+
arch: 'win64_msvc2019_64'
47+
cache: true
48+
49+
- name: Setup MSVC
50+
uses: ilammy/msvc-dev-cmd@v1
51+
52+
- name: Build
53+
run: |
54+
qmake PolySeg.pro CONFIG+=release
55+
nmake
56+
57+
- name: Upload artifact
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: PolySeg-windows
61+
path: release/PolySeg.exe
62+
63+
build-macos:
64+
runs-on: macos-latest
65+
steps:
66+
- uses: actions/checkout@v4
67+
68+
- name: Install Qt
69+
uses: jurplel/install-qt-action@v4
70+
with:
71+
version: '6.5.3'
72+
host: 'mac'
73+
target: 'desktop'
74+
arch: 'clang_64'
75+
cache: true
76+
77+
- name: Build
78+
run: |
79+
qmake PolySeg.pro CONFIG+=release
80+
make -j$(sysctl -n hw.ncpu)
81+
82+
- name: Upload artifact
83+
uses: actions/upload-artifact@v4
84+
with:
85+
name: PolySeg-macos
86+
path: PolySeg.app

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The original copyright notices and licenses are provided below.
1313

1414
================================================================================
1515

16-
Qt Framework (v6.8.0)
16+
Qt Framework (v6.5.3)
1717
Copyright (C) The Qt Company Ltd.
1818
Licensed under GNU Lesser General Public License v3 (LGPL v3)
1919

PolySeg.pro

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,31 @@ INCLUDEPATH += src
1414
SOURCES += \
1515
src/main.cpp \
1616
src/mainwindow.cpp \
17+
src/modelcomparisondialog.cpp \
1718
src/polygoncanvas.cpp \
1819
src/projectconfig.cpp \
1920
src/settingstabbase.cpp \
2021
src/projectsettingstab.cpp \
2122
src/aimodelsettingstab.cpp \
2223
src/importexportsettingstab.cpp \
2324
src/settingsdialog.cpp \
24-
src/modelcomparisondialog.cpp \
25-
src/shortcutseditor.cpp
25+
src/shortcuteditdialog.cpp \
26+
src/shortcutssettingstab.cpp \
27+
src/aipluginmanager.cpp
2628

2729
HEADERS += \
2830
src/mainwindow.h \
31+
src/modelcomparisondialog.h \
2932
src/polygoncanvas.h \
3033
src/projectconfig.h \
3134
src/settingstabbase.h \
3235
src/projectsettingstab.h \
3336
src/aimodelsettingstab.h \
3437
src/importexportsettingstab.h \
3538
src/settingsdialog.h \
36-
src/modelcomparisondialog.h \
37-
src/shortcutseditor.h
39+
src/shortcuteditdialog.h \
40+
src/shortcutssettingstab.h \
41+
src/aipluginmanager.h
3842

3943
FORMS += \
4044
src/mainwindow.ui

0 commit comments

Comments
 (0)