Commit Graph

70 Commits

Author SHA1 Message Date
Fengqing Liu
64005fad75 change gemini model 2026-04-30 11:46:38 +10:00
github-actions[bot]
66c0037aff fix missing script output 2025-11-08 23:04:50 +11:00
github-actions[bot]
dad0ca08c1 fix github release trigger 2025-11-08 22:52:57 +11:00
github-actions[bot]
6af5130214 let docker release workflow trigger github release directly 2025-10-29 15:00:09 +11:00
github-actions[bot]
b08581159e fetch all git history for release note generation 2025-10-29 14:47:19 +11:00
github-actions[bot]
67c67947c4 get previos version should handle future version 2025-10-29 14:43:28 +11:00
github-actions[bot]
46583eeda1 fix wrong version number 2025-10-29 14:32:08 +11:00
github-actions[bot]
7863363e42 github release don't need secrets 2025-10-29 14:26:48 +11:00
github-actions[bot]
81f474704b rework on get prev version script 2025-10-29 14:22:25 +11:00
Fengqing Liu
522312e2cc add missing release note generation 2025-10-28 15:25:47 +11:00
Fengqing Liu
e51f95bd8f fix checkout branch 2025-10-28 14:54:27 +11:00
github-actions[bot]
ead72d4dda fix: update script calls to use env variable for CURRENT_BRANCH_NAME 2025-10-27 16:55:19 +11:00
github-actions[bot]
3292a66898 chore: allow manual trigger for GitHub Release workflow 2025-10-27 16:36:54 +11:00
github-actions[bot]
5b41b297df name change 2025-10-27 16:20:52 +11:00
github-actions[bot]
d7b1e913d3 script fix 2025-10-27 16:12:27 +11:00
github-actions[bot]
5f71d49883 extracted the previous version extraction logic 2025-10-27 16:02:40 +11:00
github-actions[bot]
8477a545bf change way to get last version, create a script to revert release 2025-10-27 15:45:59 +11:00
github-actions[bot]
74c8980edc branch name use and extraction fixes, limit validation to main branch 2025-10-27 14:23:08 +11:00
github-actions[bot]
0dbad84465 no need 2025-10-27 14:09:05 +11:00
github-actions[bot]
05eb16a07b feat: enhance version validation with semver range support and test suite
- Add dual-mode version extraction supporting branch and file validation
- Implement comprehensive semver range validation (caret, tilde, wildcards)
- Extract release creation logic to dedicated script for reusability
- Add test suite with comprehensive coverage for validation scripts
- Update workflow to validate new version is greater than current
- Bump version to 1.1.0 in pyproject.toml to match version.py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 13:18:11 +11:00
github-actions[bot]
08dab4ca6b refactor: consolidate version extraction logic and update workflow validation
Extracted version extraction logic from workflows into a centralized script for better reusability and consistency. Updated validation output naming for clarity.

Changes:
- Add extract_version.sh for centralized version extraction
- Remove update_version.sh (functionality integrated into workflows)
- Update validate_semver.sh output: release_type → is_prerelease
- Refactor docker-release.yml to use extract_version.sh
- Refactor github-release.yml to use centralized scripts
- Add version duplication check in version-release.yml

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 10:56:33 +11:00
github-actions[bot]
f972a9507e refactor: streamline release workflows and extract validation to scripts
- Simplify github-release workflow by removing auto-generation and linting steps
- Extract SemVer validation from inline workflow to dedicated script
- Add production environment protection to version-release workflow
- Create reusable validation and update scripts in .github/scripts/
- Update release notes for v1.1.1

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 21:34:50 +11:00
github-actions[bot]
b42611967d refactor: separate Docker and GitHub release workflows for better modularity
Split the monolithic publish workflow into docker-release and github-release workflows to improve separation of concerns and allow independent execution. GitHub releases now trigger as a dependent workflow after successful Docker builds.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 21:08:03 +11:00
github-actions[bot]
f1468d7ff0 fix: update Ruff linter command to automatically fix issues 2025-10-26 19:39:36 +11:00
github-actions[bot]
b11ae09f7f feat: enhance release note generation script and update workflows for improved usability 2025-10-26 19:37:39 +11:00
github-actions[bot]
0f6532eb12 fix workflow error 2025-10-26 12:09:19 +11:00
github-actions[bot]
5f132d8c73 fix: ensure local package installation in validation workflow 2025-10-25 22:48:35 +11:00
github-actions[bot]
4c46a50453 feat: enhance release note generation and update workflow scripts 2025-10-25 22:29:21 +11:00
Fengqing Liu
1718a436e3 chore: add environment specification and token configuration to release workflow 2025-10-19 23:29:01 +11:00
Fengqing Liu
30e0f0a322 branch fix 2025-10-19 22:39:31 +11:00
Fengqing Liu
02ff8487bd chore: remove obsolete CI workflows and add new publish workflow 2025-10-19 21:37:05 +11:00
Fengqing Liu
b965147698 refactor: update Docker workflow for build validation and remove unnecessary steps 2025-10-19 21:06:34 +11:00
Fengqing Liu
ecd39a1c8e add SemVer release process with automated publishing
- Split workflows: CI (lint/validate) and Docker (dev builds)
- Add release.yml for versioned releases with manual trigger
- Release workflow creates release/<version> branches, updates version.py, builds Docker images with SemVer tags, and creates GitHub releases
- Docker images tagged as major.minor.patch, major.minor, major, latest for stable releases
- Pre-release versions tagged with exact version only

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-19 20:58:59 +11:00
Fengqing Liu
603d07f3d3 remove release 2025-10-19 18:31:46 +11:00
Fengqing Liu
f62ec26b5d chore: Major code quality improvements - Remove dead code, add Ruff & Mypy
This commit implements a comprehensive code quality overhaul including
dead code removal, modern linting tools, type checking, and CI/CD integration.

## Dead Code Removal

### Removed Files:
- src/utils/cache.py (137 lines) - Desktop GUI remnant with tkinter dependencies
  * No longer needed in web-only architecture
  * Conflicted with web version at src/web/managers/cache.py

### Removed Functions:
- src/auth/auth_state.py::_login() (170 lines) - Deprecated password authentication
  * OAuth device code flow is now the only login method
  * Removed legacy 2FA, CAPTCHA, and password login code
  * Updated class docstring to reflect OAuth-only authentication

### Removed Imports (12 occurrences):
- Unused TYPE_CHECKING imports (NoReturn, LoginFormManager, etc.)
- Orphaned exception imports (CaptchaRequired, LoginException)
- Unused utility imports (AwaitableValue, State, io, sys, Path)
- Removed commented-out imports and dead code references

**Total removed: 308+ lines of unused code**

## Modern Linting with Ruff

### Added ruff (v0.14.1):
- 10-100x faster than legacy linters (Flake8, pyflakes)
- Auto-fixed 56 issues across 46 files
- Import sorting with isort integration
- Modern Python idioms (pyupgrade)
- Code simplification suggestions

### Fixes Applied:
- Sorted imports alphabetically in all files
- Replaced try-except-pass with contextlib.suppress()
- Added exception chaining with 'from err'
- Renamed unused loop variables to _var
- Simplified comprehensions and ternary operators
- Removed unnecessary .keys() calls

**Result: 0 Ruff warnings (100% pass rate)**

## Type Checking with Mypy

### Added mypy (v1.18.2):
- Static type checking across 55 source files
- Reduced type errors from 25 to 5 (80% improvement)
- Configured gradual strictness for JSON/GraphQL responses

### Type Fixes:
- Fixed PyInstaller _MEIPASS attribute access
- Added type: ignore for safe variable redefinitions
- Fixed translator return type cast
- Added null checks for optional attributes
- Resolved circular import issues

### Configuration:
- Lenient initial settings for gradual adoption
- Per-module overrides for dynamic JSON responses
- Error codes shown for easy debugging

**Result: 5 non-critical errors remaining**

## CI/CD Integration

### Updated .github/workflows/ci.yml:
- Added new 'lint' job running Ruff + Mypy
- Ruff checks are required to pass
- Mypy checks run but don't block (advisory)
- Docker build now depends on lint + validate jobs

### Workflow:
```
lint (Ruff + Mypy) → validate (Language files) → docker → release
```

## Configuration

### Created pyproject.toml:
```toml
[tool.ruff]
line-length = 100
target-version = "py310"
select = ["E", "W", "F", "I", "UP", "B", "SIM", "C4"]

[tool.mypy]
python_version = "3.10"
check_untyped_defs = true
strict_equality = true
```

## Statistics

### Code Reduction:
- **Before:** 8,130 lines across 56 files
- **After:** 7,213 lines across 55 files
- **Reduction:** -917 lines (-11.3%)

### Quality Metrics:
- **Pyflakes:** 16 warnings → Ruff: 0 warnings
- **Mypy:** Not configured → 5 errors (from 25)
- **Linting speed:** 2s → 0.2s (10x faster)
- **Auto-fix rate:** 79% (46/58 issues)

### Files Modified: 48 files
- 1 deleted (src/utils/cache.py)
- 1 created (pyproject.toml)
- 46 updated (imports, types, style)

## Breaking Changes

None - all changes are internal quality improvements.
Application still runs perfectly (v16.dev).

## Migration Notes

### For Developers:
```bash
# Install new tools
pip install ruff mypy

# Run quality checks
ruff check src/          # Fast linting
mypy src/                # Type checking
ruff check src/ --fix    # Auto-fix issues
```

### For CI/CD:
- Linting now runs automatically on all commits
- Failed Ruff checks will block builds
- Mypy checks are advisory (won't block)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-19 00:02:54 +11:00
Fengqing Liu
323c2ac40d Disable automatic CI builds
- Comment out push and pull_request triggers
- Keep workflow_dispatch for manual runs only
- Prevents automatic builds on every push

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 20:04:23 +11:00
Fengqing Liu
849bf5372a docker ci only 2025-10-16 23:35:05 +11:00
Fengqing Liu
8b2c28f76d Update Docker and CI workflow for refactored project structure
- Fix CI workflow to reference src/version.py instead of version.py
- Update Python import paths for version extraction in AppImage job
- Fix Dockerfile to use requirements.txt and copy src/ directory
- Remove deprecated --web flag from Docker CMD
- Remove obsolete version: '3.8' from docker-compose.yml
- Add Docker build job to CI workflow with multi-arch support (amd64, arm64)
- Push Docker images to GitHub Container Registry (ghcr.io)
- Add OCI image labels with build metadata to Dockerfile
- Update README with pre-built Docker image instructions
- Update funding information

All changes ensure compatibility with the refactored src/ package structure
and enable automated Docker image publishing via GitHub Actions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-16 23:28:00 +11:00
DevilXD
64c1b93b5b Disable UPX downloading step in CI 2025-09-22 22:23:38 +02:00
kWAY
2737936739 Implement dark mode theme (#744)
Co-authored-by: DevilXD <4180725+DevilXD@users.noreply.github.com>
2025-08-27 17:19:32 +02:00
DevilXD
69b861d1ba Upgrade UPX version 2025-08-20 20:36:38 +02:00
guihkx
eab58cd5f2 ci/linux: provide PyInstaller package for aarch64 2025-07-27 10:58:01 +02:00
guihkx
d209e0e9e0 ci/linux: provide AppImage package for aarch64 2025-07-27 10:58:01 +02:00
guihkx
67eb7d0966 linux/appimage: remove x86_64 hardcoding from build recipe
Now the target CPU architecture should be set by the 'ARCH' environment
variable before invoking appimage-builder.

This makes it easier to build the AppImage for other CPU architectures.
2025-07-26 23:40:01 +02:00
guihkx
1fa20d3634 ci/linux: don't install python3-testresources
If I remember correctly, this was required by the tool that makes our
AppImage, which doesn't seem to require it anymore.
2025-07-26 23:40:01 +02:00
guihkx
9e9ac04b7f ci/linux: use git version of appimage-builder
appimage-builder is a tool that is not officially part of the AppImage
ecosystem, and lately its maintainer hasn't been able to keep up with
the latest AppImage ideas, most notably:

- The move to a new statically-linked runtime: Before this, all AppImages
using the old runtime, would depend on libfuse2 to be installed on the
host system just to be able to run out of the box. This wasn't much of
a problem back then, because libfuse2 was ubiquitous. However, nowadays,
some have distros don't even have it in their official repositories.
- The removal of the xz compression algorithm (used by default), and the
addition of Zstd.

Luckily, the problems above have been fixed in the git version of
appimage-builder, but a stable release is yet to be made, so we'll have
to use the git version, because other AppImage-making tools are not as
nice and convenient as appimage-builder.
2025-07-26 23:40:01 +02:00
guihkx
714558965f ci/linux: update PyInstaller builder to run on Ubuntu 22.04
The Ubuntu 20.04 runner image is expected to be removed from GitHub
Actions on April 1st, 2025.

Source: https://github.com/actions/runner-images/issues/11101
2025-03-24 07:41:34 +01:00
biast12
82654680f6 Linux: Move to Ayatana's AppIndicator
The reference AppIndicator implementation has been deprecated/abandoned in newer distros.

Co-Authored-By: Guilherme Silva <626206+guihkx@users.noreply.github.com>
2024-12-31 21:05:35 +01:00
DevilXD
80f3e1b5f9 Fix release target tag name 2024-11-11 21:22:41 +01:00
DevilXD
64959ff7a1 Recreate the development build, instead of updating the existing one with new files 2024-11-11 21:16:38 +01:00