Skip to content

Commit 188d84f

Browse files
committed
Resolve merge conflict
2 parents 31b5b59 + ffd438a commit 188d84f

57 files changed

Lines changed: 1691 additions & 144 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/aur-publish.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Publish to AUR - pictopy-bin
2+
3+
on:
4+
# schedule:
5+
# - cron: '0 0 * * *'
6+
workflow_dispatch:
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
update_version:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
need_update: ${{ steps.check_version.outputs.need_update }}
15+
latest_version: ${{ steps.check_version.outputs.latest_version }}
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Git
22+
run: |
23+
git config --global user.name "${GITHUB_ACTOR}"
24+
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
25+
26+
- name: Check if update is needed
27+
id: check_version
28+
run: |
29+
cd publishing
30+
31+
LATEST_VERSION=$(curl -fsSL https://api.github.com/repos/AOSSIE-Org/PictoPy/releases/latest \
32+
| grep -oP '(?<="tag_name": "v)[^"]+')
33+
echo "Latest version: $LATEST_VERSION"
34+
35+
CURRENT_VERSION=$(grep -oP '(?<=pkgver=)[0-9.]+' PKGBUILD)
36+
echo "Current version: $CURRENT_VERSION"
37+
38+
if [ "$LATEST_VERSION" != "$CURRENT_VERSION" ]; then
39+
echo "need_update=true" >> "$GITHUB_OUTPUT"
40+
else
41+
echo "need_update=false" >> "$GITHUB_OUTPUT"
42+
fi
43+
44+
echo "latest_version=$LATEST_VERSION" >> "$GITHUB_OUTPUT"
45+
46+
- name: Compute sha256 of new deb
47+
if: steps.check_version.outputs.need_update == 'true'
48+
id: sha
49+
run: |
50+
VERSION=${{ steps.check_version.outputs.latest_version }}
51+
DEB_URL="https://github.com/AOSSIE-Org/PictoPy/releases/download/v${VERSION}/PictoPy_${VERSION}_amd64.deb"
52+
SHA=$(curl -fsSL "$DEB_URL" | sha256sum | cut -d' ' -f1)
53+
echo "sha=$SHA" >> "$GITHUB_OUTPUT"
54+
55+
- name: Update PKGBUILD
56+
if: steps.check_version.outputs.need_update == 'true'
57+
run: |
58+
VERSION=${{ steps.check_version.outputs.latest_version }}
59+
SHA=${{ steps.sha.outputs.sha }}
60+
61+
cd publishing
62+
sed -i "s/^pkgver=.*/pkgver=$VERSION/" PKGBUILD
63+
sed -i "s/^pkgrel=.*/pkgrel=1/" PKGBUILD
64+
sed -i "s/sha256sums=.*/sha256sums=('$SHA')/" PKGBUILD
65+
66+
git add PKGBUILD
67+
git commit -m "upgpkg: pictopy-bin $VERSION"
68+
git push
69+
70+
- name: Upload artifacts for publish job
71+
if: steps.check_version.outputs.need_update == 'true'
72+
uses: actions/upload-artifact@v4
73+
with:
74+
name: PKGBUILD
75+
path: |
76+
publishing/PKGBUILD
77+
publishing/pictopy-bin.install
78+
79+
publish_aur:
80+
runs-on: ubuntu-latest
81+
needs: update_version
82+
if: needs.update_version.outputs.need_update == 'true'
83+
84+
steps:
85+
- name: Download artifacts
86+
uses: actions/download-artifact@v4
87+
with:
88+
name: PKGBUILD
89+
90+
- name: Publish to AUR
91+
uses: KSXGitHub/github-actions-deploy-aur@v4.1.3
92+
with:
93+
pkgname: pictopy-bin
94+
pkgbuild: ./PKGBUILD
95+
commit_username: ${{ secrets.AUR_USERNAME }}
96+
commit_email: ${{ secrets.AUR_EMAIL }}
97+
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
98+
commit_message: v${{ needs.update_version.outputs.latest_version }}
99+
ssh_keyscan_types: rsa,ecdsa,ed25519
100+
updpkgsums: false
101+
allow_empty_commits: false

.github/workflows/auto-issue-comment.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ on:
66

77
jobs:
88
comment:
9+
if: |
10+
github.event.issue.author_association != 'OWNER' &&
11+
github.event.issue.author_association != 'MEMBER' &&
12+
github.event.issue.author_association != 'COLLABORATOR'
913
runs-on: ubuntu-latest
14+
1015
steps:
1116
- name: Add comment to issue
1217
uses: actions/github-script@v7

.github/workflows/build-and-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,9 @@ jobs:
357357
358358
- uses: tauri-apps/tauri-action@v0
359359
env:
360-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
361-
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY}}
362-
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
360+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
361+
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY}}
362+
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
363363
with:
364364
projectPath: ./frontend
365365
tagName: ${{ github.event.release.tag_name || github.event.inputs.tag }}

.github/workflows/duplicate_issue_detector.yaml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
body: issue.body || ""
4646
},
4747
others: upstreamIssues
48-
.filter(i => !i.pull_request)
48+
.filter(i => !i.pull_request && i.number !== issue.number)
4949
.map(i => ({
5050
number: i.number,
5151
title: i.title,
@@ -66,6 +66,7 @@ jobs:
6666
6767
THRESHOLD = 0.82
6868
MAX_RESULTS = 3
69+
print(f"Threshold = {THRESHOLD}")
6970
7071
with open("issues.json") as f:
7172
data = json.load(f)
@@ -77,6 +78,8 @@ jobs:
7778
7879
current_text = text(data["current"])
7980
others = data["others"]
81+
print(f"Current issue: #{data['current']['number']}")
82+
print(f"Candidate issues: {len(others)}")
8083
8184
if not others:
8285
with open("matches.json", "w") as f:
@@ -94,15 +97,22 @@ jobs:
9497
sims = cosine_similarity([current_vec], other_vecs)[0]
9598
9699
matches = []
100+
97101
for issue, score in zip(others, sims):
98-
if score >= THRESHOLD:
99-
matches.append({
100-
"number": issue["number"],
101-
"title": issue["title"],
102-
"url": issue["url"],
103-
"state": issue["state"],
104-
"score": round(float(score) * 100, 1)
105-
})
102+
print(
103+
f"Issue #{issue['number']} | "
104+
f"Score={score:.4f} | "
105+
f"Title={issue['title']}"
106+
)
107+
108+
if score >= THRESHOLD:
109+
matches.append({
110+
"number": issue["number"],
111+
"title": issue["title"],
112+
"url": issue["url"],
113+
"state": issue["state"],
114+
"score": round(float(score) * 100, 1)
115+
})
106116
107117
matches = sorted(matches, key=lambda x: x["score"], reverse=True)[:MAX_RESULTS]
108118

.github/workflows/pr-check-build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ on:
33
pull_request:
44
paths:
55
- "frontend/**"
6+
7+
68

79
jobs:
810
tauri-build-check:

.github/workflows/pr-check-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ on:
44
pull_request:
55
branches:
66
- main
7-
7+
8+
89
jobs:
910
linting:
1011
runs-on: ubuntu-latest
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Close stale merge-conflicted PRs
2+
3+
on:
4+
schedule:
5+
- cron: "17 2 * * *"
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
issues: write
11+
pull-requests: write
12+
13+
jobs:
14+
stale-merge-conflicts:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Warn and close inactive merge-conflicted PRs
19+
uses: actions/stale@v10
20+
with:
21+
repo-token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
# Do not process issues.
24+
days-before-issue-stale: -1
25+
days-before-issue-close: -1
26+
27+
# Only process PRs that still have unresolved merge conflicts.
28+
only-pr-labels: "PR has merge conflicts"
29+
30+
# Warn after 30 inactive days, then close after 5 more inactive days.
31+
days-before-pr-stale: 30
32+
days-before-pr-close: 5
33+
34+
# Use a separate stale label so the original merge-conflict label keeps its meaning.
35+
stale-pr-label: "stale merge conflict"
36+
close-pr-label: "closed stale merge conflict"
37+
38+
# If the contributor comments or updates the PR, remove stale state and restart the timer.
39+
remove-pr-stale-when-updated: true
40+
41+
# Help process larger backlogs across daily runs.
42+
operations-per-run: 100
43+
44+
stale-pr-message: |
45+
⚠️ **This PR still has unresolved merge conflicts and has been inactive for the past 30 days.**
46+
47+
The `PR has merge conflicts` label is still applied, and there has been no recent activity on this PR.
48+
49+
Please resolve the merge conflicts or leave a comment if you are still actively working on it.
50+
51+
If there is no further activity within the next 5 days, this PR may be automatically closed to help keep the PR backlog manageable.
52+
53+
close-pr-message: |
54+
🔒 **Closing this PR due to unresolved merge conflicts and prolonged inactivity.**
55+
56+
This PR still had unresolved merge conflicts, and there was no activity within 5 days of the stale warning being posted.
57+
58+
You may reopen this PR or submit a new one after resolving the merge conflicts.

README.md

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,55 @@
33
<div name="readme-top"></div>
44

55
<p align="center">
6-
<img src="docs/assets/banner.png" alt="PictoPy Banner" width="100%"/>
6+
<img src="docs/assets/readme-assets/banner.png" alt="PictoPy Banner" width="100%"/>
77
</p>
88

99
<!-- Organization/Project Social Handles -->
1010
<p align="center">
11-
<!-- Telegram -->
12-
<a href="https://t.me/StabilityNexus">
13-
<img src="https://img.shields.io/badge/Telegram-black?style=flat&logo=telegram&logoColor=white&logoSize=auto&color=24A1DE" alt="Telegram Badge"/></a>
11+
<!-- Discord -->
12+
<a href="https://discord.gg/hjUhu33uAn">
13+
<img src="https://img.shields.io/discord/1022871757289422898?style=flat&logo=discord&logoColor=white&logoSize=auto&label=Discord&labelColor=5865F2&color=57F287" alt="Discord Badge"/></a>
1414
&nbsp;&nbsp;
1515
<!-- X (formerly Twitter) -->
1616
<a href="https://x.com/aossie_org">
1717
<img src="https://img.shields.io/twitter/follow/aossie_org" alt="X (formerly Twitter) Badge"/></a>
1818
&nbsp;&nbsp;
19-
<!-- Discord -->
20-
<a href="https://discord.gg/hjUhu33uAn">
21-
<img src="https://img.shields.io/discord/1022871757289422898?style=flat&logo=discord&logoColor=white&logoSize=auto&label=Discord&labelColor=5865F2&color=57F287" alt="Discord Badge"/></a>
19+
<!-- LinkedIn -->
20+
<a href="https://www.linkedin.com/company/aossie/">
21+
<img src="https://img.shields.io/badge/LinkedIn-black?style=flat&logo=LinkedIn&logoColor=white&logoSize=auto&color=0A66C2" alt="LinkedIn Badge"></a>
2222
&nbsp;&nbsp;
2323
<!-- Medium -->
2424
<a href="https://news.stability.nexus/">
2525
<img src="https://img.shields.io/badge/Medium-black?style=flat&logo=medium&logoColor=black&logoSize=auto&color=white" alt="Medium Badge"></a>
2626
&nbsp;&nbsp;
27-
<!-- LinkedIn -->
28-
<a href="https://www.linkedin.com/company/aossie/">
29-
<img src="https://img.shields.io/badge/LinkedIn-black?style=flat&logo=LinkedIn&logoColor=white&logoSize=auto&color=0A66C2" alt="LinkedIn Badge"></a>
27+
<!-- Telegram -->
28+
<a href="https://t.me/StabilityNexus">
29+
<img src="https://img.shields.io/badge/Telegram-black?style=flat&logo=telegram&logoColor=white&logoSize=auto&color=24A1DE" alt="Telegram Badge"/></a>
3030
&nbsp;&nbsp;
3131
<!-- Youtube -->
3232
<a href="https://www.youtube.com/@AOSSIE-Org">
3333
<img src="https://img.shields.io/youtube/channel/subscribers/UCKVVLbawY7Gej_3o2WKsoiA?style=flat&logo=youtube&logoColor=white%20&logoSize=auto&labelColor=FF0000&color=FF0000" alt="Youtube Badge"></a>
3434
</p>
3535

36+
<p align="center">
37+
<strong>Download:</strong>
38+
<a href="https://github.com/AOSSIE-Org/PictoPy/releases/latest/download/PictoPy_1.1.0_x64-setup.exe" >
39+
<img src="docs/assets/readme-assets/btn-windows.svg" alt="Windows download button" style="height:34px;width:auto;" />
40+
</a>
41+
&nbsp;&nbsp;
42+
<a href="https://github.com/AOSSIE-Org/PictoPy/releases/latest/download/PictoPy_aarch64.app.tar.gz">
43+
<img src="docs/assets/readme-assets/btn-macos.svg" alt="macOS download button" style="height:34px;width:auto;" />
44+
</a>
45+
&nbsp;&nbsp;
46+
<a href="https://github.com/AOSSIE-Org/PictoPy/releases/latest/download/PictoPy_1.1.0_amd64.deb">
47+
<img src="docs/assets/readme-assets/btn-debian.svg" alt="Debian download button" style="height:34px;width:auto;" />
48+
</a>
49+
&nbsp;&nbsp;
50+
<a href="https://github.com/AOSSIE-Org/PictoPy/releases/latest">
51+
<img src="docs/assets/readme-assets/btn-github.svg" alt="GitHub Releases button" style="height:34px;width:auto;" />
52+
</a>
53+
</p>
54+
3655
# PictoPy
3756

3857
**PictoPy is an open-source, privacy-first AI photo management application built for the desktop - featuring on-device face recognition, object detection, and smart search, with zero data leaving your machine.**
@@ -63,7 +82,7 @@ Find out more at [https://pictopy.aossie.org/](https://pictopy.aossie.org/).
6382

6483
<p align="center">
6584
<a href="https://youtu.be/RWp-9xT9jow?si=c1vNO5cDgI4GYM6y">
66-
<img src="docs/assets/demo.png" alt="PictoPy Demonstration">
85+
<img src="docs/assets/readme-assets/demo.png" alt="PictoPy Demonstration">
6786
</a>
6887
</p>
6988

@@ -89,11 +108,8 @@ Find out more at [https://pictopy.aossie.org/](https://pictopy.aossie.org/).
89108
## High Level Architecture
90109

91110
<div align="center">
92-
<picture>
93-
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/architectual-design-dark.svg">
94-
<source media="(prefers-color-scheme: light)" srcset="docs/assets/architectual-design-light.svg">
95-
<img src="docs/assets/architectual-design-light.svg" alt="PictoPy architecture diagram">
96-
</picture>
111+
<img src="docs/assets/readme-assets/architectual-design-light.svg#gh-light-mode-only" alt="PictoPy architecture diagram"/>
112+
<img src="docs/assets/readme-assets/architectual-design-dark.svg#gh-dark-mode-only" alt="PictoPy architecture diagram"/>
97113
</div>
98114

99115
## Want to Contribute?
@@ -114,7 +130,7 @@ See the [LICENSE](LICENSE) file for details.
114130

115131
## Thanks To All Contributors
116132

117-
Thanks a lot for spending your time helping TODO grow. Keep rocking 🥂
133+
Thanks a lot for spending your time helping PictoPy grow. Keep rocking 🥂
118134

119135
[![Contributors](https://contrib.rocks/image?repo=AOSSIE-Org/PictoPy)](https://github.com/AOSSIE-Org/PictoPy/graphs/contributors)
120136

backend/app/database/folders.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,11 +395,11 @@ def db_get_folder_ids_by_paths(
395395

396396

397397
def db_get_all_folder_details() -> (
398-
List[Tuple[str, str, Optional[str], int, bool, Optional[bool]]]
398+
List[Tuple[str, str, Optional[str], int, bool, Optional[bool], int]]
399399
):
400400
"""
401401
Get all folder details including folder_id, folder_path, parent_folder_id,
402-
last_modified_time, AI_Tagging, and taggingCompleted.
402+
last_modified_time, AI_Tagging, taggingCompleted, and image_count.
403403
Returns list of tuples with all folder information.
404404
"""
405405
conn = sqlite3.connect(DATABASE_PATH)
@@ -408,9 +408,18 @@ def db_get_all_folder_details() -> (
408408
try:
409409
cursor.execute(
410410
"""
411-
SELECT folder_id, folder_path, parent_folder_id, last_modified_time, AI_Tagging, taggingCompleted
412-
FROM folders
413-
ORDER BY folder_path
411+
SELECT
412+
f.folder_id,
413+
f.folder_path,
414+
f.parent_folder_id,
415+
f.last_modified_time,
416+
f.AI_Tagging,
417+
f.taggingCompleted,
418+
COUNT(i.id) as image_count
419+
FROM folders f
420+
LEFT JOIN images i ON f.folder_id = i.folder_id
421+
GROUP BY f.folder_id
422+
ORDER BY f.folder_path
414423
"""
415424
)
416425
return cursor.fetchall()

0 commit comments

Comments
 (0)