lumenfetch 2.0.0__tar.gz → 2.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lumenfetch-2.1.0/.github/workflows/publish.yml +60 -0
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/.github/workflows/tests.yml +2 -2
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/.gitignore +1 -0
- lumenfetch-2.0.0/CONTRIBUTING.md → lumenfetch-2.1.0/CONTRIBUTING.id.md +10 -5
- lumenfetch-2.1.0/CONTRIBUTING.md +74 -0
- lumenfetch-2.1.0/PKG-INFO +515 -0
- lumenfetch-2.1.0/README.id.md +486 -0
- lumenfetch-2.1.0/README.md +482 -0
- lumenfetch-2.1.0/core/cli.py +111 -0
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/core/constants.py +8 -8
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/core/detector.py +20 -19
- lumenfetch-2.1.0/core/doctor.py +187 -0
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/core/downloader.py +118 -56
- lumenfetch-2.1.0/core/errors.py +114 -0
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/core/ffmpeg.py +8 -8
- lumenfetch-2.1.0/core/i18n.py +393 -0
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/core/log.py +8 -8
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/core/options.py +71 -73
- lumenfetch-2.1.0/core/update_checker.py +89 -0
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/core/utils.py +139 -129
- lumenfetch-2.1.0/lumenfetch.spec +38 -0
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/main.py +101 -139
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/pyproject.toml +1 -1
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/requirements-dev.txt +1 -0
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/tests/conftest.py +9 -0
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/tests/test_detector.py +1 -1
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/tests/test_downloader.py +80 -0
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/tests/test_features.py +147 -3
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/tests/test_main.py +1 -0
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/tests/test_options.py +2 -2
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/tests/test_utils.py +6 -3
- lumenfetch-2.0.0/PKG-INFO +0 -387
- lumenfetch-2.0.0/README.md +0 -354
- lumenfetch-2.0.0/core/errors.py +0 -118
- lumenfetch-2.0.0/core/update_checker.py +0 -63
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/LICENSE +0 -0
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/core/__init__.py +0 -0
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/downloads/.gitkeep +0 -0
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/requirements.txt +0 -0
- {lumenfetch-2.0.0 → lumenfetch-2.1.0}/tests/__init__.py +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
id-token: write
|
|
9
|
+
contents: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build-exe:
|
|
13
|
+
runs-on: windows-latest
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout repo
|
|
16
|
+
uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Setup Python
|
|
19
|
+
uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.12"
|
|
22
|
+
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: |
|
|
25
|
+
pip install -r requirements.txt
|
|
26
|
+
pip install pyinstaller
|
|
27
|
+
|
|
28
|
+
- name: Build Windows exe
|
|
29
|
+
run: pyinstaller --onefile --console --name lumenfetch main.py
|
|
30
|
+
|
|
31
|
+
- name: Smoke test exe
|
|
32
|
+
run: ./dist/lumenfetch.exe --version
|
|
33
|
+
|
|
34
|
+
- name: Attach exe to release
|
|
35
|
+
uses: softprops/action-gh-release@v2
|
|
36
|
+
with:
|
|
37
|
+
files: dist/lumenfetch.exe
|
|
38
|
+
|
|
39
|
+
publish-pypi:
|
|
40
|
+
needs: build-exe
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
environment: pypi
|
|
43
|
+
permissions:
|
|
44
|
+
id-token: write
|
|
45
|
+
steps:
|
|
46
|
+
- name: Checkout repo
|
|
47
|
+
uses: actions/checkout@v4
|
|
48
|
+
|
|
49
|
+
- name: Setup Python
|
|
50
|
+
uses: actions/setup-python@v5
|
|
51
|
+
with:
|
|
52
|
+
python-version: "3.12"
|
|
53
|
+
|
|
54
|
+
- name: Build package
|
|
55
|
+
run: |
|
|
56
|
+
pip install build
|
|
57
|
+
python -m build
|
|
58
|
+
|
|
59
|
+
- name: Publish to PyPI (trusted publishing, no token needed)
|
|
60
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -28,8 +28,8 @@ jobs:
|
|
|
28
28
|
- name: Install dependencies
|
|
29
29
|
run: pip install -r requirements-dev.txt
|
|
30
30
|
|
|
31
|
-
- name: Run tests
|
|
32
|
-
run: pytest tests/ -
|
|
31
|
+
- name: Run tests (coverage gate 80%)
|
|
32
|
+
run: pytest tests/ -q --cov=core --cov-fail-under=80
|
|
33
33
|
|
|
34
34
|
- name: Lint with ruff
|
|
35
35
|
run: ruff check .
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Makasih udah mau bantu kembangin Lumenfetch. Panduan ini biar kontribusi kamu gampang diproses.
|
|
4
4
|
|
|
5
|
+
[English](CONTRIBUTING.md) | **Bahasa Indonesia**
|
|
6
|
+
|
|
5
7
|
## 🛠 Setup Development
|
|
6
8
|
|
|
7
9
|
1. Fork & clone repo ini
|
|
@@ -19,13 +21,16 @@ Lumenfetch sengaja dipisah per tanggung jawab, tolong dijaga konsistensinya kala
|
|
|
19
21
|
|------|-----------------|-------------|
|
|
20
22
|
| `core/constants.py` | Nilai shared (versi, format, batas) | Logic bisnis |
|
|
21
23
|
| `core/errors.py` | Klasifikasi error + pesan ramah terpusat | Logic download/deteksi |
|
|
24
|
+
| `core/i18n.py` | Katalog string UI (EN default, ID opsional) | Logic bisnis |
|
|
25
|
+
| `core/cli.py` | Parsing argumen + bangun pilihan non-interaktif | Logic bisnis |
|
|
26
|
+
| `core/doctor.py` | Diagnosa setup (ffmpeg, dep, cookies, jaringan) | Download/deteksi |
|
|
22
27
|
| `core/ffmpeg.py` | Deteksi ffmpeg sistem dulu, bundled fallback | Download/deteksi |
|
|
23
28
|
| `core/log.py` | Logging file terpusat | Tampilan rich/menu |
|
|
24
29
|
| `core/detector.py` | Deteksi info video YouTube via yt-dlp | Mendownload apa pun |
|
|
25
30
|
| `core/downloader.py` | Proses download, progress hook, retry | Menampilkan menu/prompt |
|
|
26
31
|
| `core/options.py` | Semua interaksi & tampilan menu (rich) | Logic download |
|
|
27
|
-
| `core/utils.py` | Helper murni: sanitasi, format, config
|
|
28
|
-
| `main.py` | Menyatukan semua modul lewat
|
|
32
|
+
| `core/utils.py` | Helper murni: sanitasi, format, config user | Bergantung ke CLI atau jaringan |
|
|
33
|
+
| `main.py` | Menyatukan semua modul lewat CLI + loop utama | Logic bisnis baru |
|
|
29
34
|
|
|
30
35
|
Kalau nambah fitur, coba taruh di modul yang paling sesuai dulu sebelum bikin file baru.
|
|
31
36
|
|
|
@@ -50,18 +55,18 @@ Pakai prefix singkat biar history gampang dibaca:
|
|
|
50
55
|
- `refactor:` — perubahan struktur kode tanpa mengubah perilaku
|
|
51
56
|
- `test:` — nambah/ubah test
|
|
52
57
|
|
|
53
|
-
Contoh: `fix: handle
|
|
58
|
+
Contoh: `fix: handle playlist YouTube satu video`
|
|
54
59
|
|
|
55
60
|
## 🐛 Lapor Bug / Request Fitur
|
|
56
61
|
|
|
57
62
|
Buka [Issues](../../issues) baru, sertakan:
|
|
58
|
-
-
|
|
63
|
+
- Link yang bermasalah (kalau ada, hapus info pribadi)
|
|
59
64
|
- Pesan error yang muncul di terminal
|
|
60
65
|
- Langkah buat reproduce masalahnya
|
|
61
66
|
|
|
62
67
|
## 🤝 Pull Request
|
|
63
68
|
|
|
64
|
-
1. Buat branch baru dari `main`, kasih nama yang jelas (misal `fix/
|
|
69
|
+
1. Buat branch baru dari `main`, kasih nama yang jelas (misal `fix/playlist-satu-video`)
|
|
65
70
|
2. Pastikan `pytest` dan `ruff check .` lulus
|
|
66
71
|
3. Jelasin di deskripsi PR apa yang diubah dan kenapa
|
|
67
72
|
4. Tunggu review — mungkin ada request perubahan kecil sebelum di-merge
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Contributing to Lumenfetch
|
|
2
|
+
|
|
3
|
+
Thanks for helping develop Lumenfetch. This guide keeps contributions easy to review.
|
|
4
|
+
|
|
5
|
+
**Bahasa Indonesia** | [English](CONTRIBUTING.md)
|
|
6
|
+
|
|
7
|
+
> Indonesian version: [`CONTRIBUTING.id.md`](CONTRIBUTING.id.md)
|
|
8
|
+
|
|
9
|
+
## 🛠 Development Setup
|
|
10
|
+
|
|
11
|
+
1. Fork & clone this repo
|
|
12
|
+
2. Install dependencies (including testing & lint tools):
|
|
13
|
+
```bash
|
|
14
|
+
pip install -r requirements-dev.txt
|
|
15
|
+
```
|
|
16
|
+
3. Make sure `ffmpeg` is installed on your system (see Requirements in the README)
|
|
17
|
+
|
|
18
|
+
## 🗂 Module Structure & Principles
|
|
19
|
+
|
|
20
|
+
Lumenfetch is split by responsibility - please keep it consistent when adding/changing code:
|
|
21
|
+
|
|
22
|
+
| File | Responsibility | Must not |
|
|
23
|
+
|------|----------------|----------|
|
|
24
|
+
| `core/constants.py` | Shared values (version, formats, limits) | Business logic |
|
|
25
|
+
| `core/errors.py` | Central error classification + friendly messages | Download/detect logic |
|
|
26
|
+
| `core/i18n.py` | UI string catalog (EN default, ID optional) | Business logic |
|
|
27
|
+
| `core/cli.py` | Argument parsing + non-interactive choice building | Business logic |
|
|
28
|
+
| `core/doctor.py` | Setup diagnosis (ffmpeg, deps, cookies, network) | Download/detect |
|
|
29
|
+
| `core/ffmpeg.py` | System ffmpeg first, bundled fallback | Download/detect |
|
|
30
|
+
| `core/log.py` | Central file logging | Rich display/menus |
|
|
31
|
+
| `core/detector.py` | YouTube video info detection via yt-dlp | Download anything |
|
|
32
|
+
| `core/downloader.py` | Download process, progress hook, retry | Show menus/prompts |
|
|
33
|
+
| `core/options.py` | All interaction & menus (rich) | Download logic |
|
|
34
|
+
| `core/utils.py` | Pure helpers: sanitizing, formatting, user config | Depend on CLI or network |
|
|
35
|
+
| `main.py` | Ties everything together via CLI + main loop | New business logic |
|
|
36
|
+
|
|
37
|
+
When adding a feature, put it in the most fitting module first before creating a new file.
|
|
38
|
+
|
|
39
|
+
## ✅ Before Opening a Pull Request
|
|
40
|
+
|
|
41
|
+
Run this in the project root:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pytest tests/ -v
|
|
45
|
+
ruff check .
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Make sure all tests pass and there are no new lint warnings. GitHub Actions also runs these automatically on every PR.
|
|
49
|
+
|
|
50
|
+
## 📝 Commit Messages
|
|
51
|
+
|
|
52
|
+
Use short prefixes so history stays readable:
|
|
53
|
+
|
|
54
|
+
- `feat:` — new feature
|
|
55
|
+
- `fix:` — bug fix
|
|
56
|
+
- `docs:` — documentation changes (README, CONTRIBUTING, etc.)
|
|
57
|
+
- `refactor:` — code structure changes without behavior change
|
|
58
|
+
- `test:` — add/change tests
|
|
59
|
+
|
|
60
|
+
Example: `fix: handle single-video YouTube playlist`
|
|
61
|
+
|
|
62
|
+
## 🐛 Bug Reports / Feature Requests
|
|
63
|
+
|
|
64
|
+
Open a new [Issue](../../issues) and include:
|
|
65
|
+
- The problematic link (if any, remove personal info)
|
|
66
|
+
- The error message shown in the terminal
|
|
67
|
+
- Steps to reproduce the problem
|
|
68
|
+
|
|
69
|
+
## 🤝 Pull Requests
|
|
70
|
+
|
|
71
|
+
1. Create a new branch from `main` with a clear name (e.g. `fix/playlist-single-video`)
|
|
72
|
+
2. Make sure `pytest` and `ruff check .` pass
|
|
73
|
+
3. Explain in the PR description what changed and why
|
|
74
|
+
4. Wait for review - there may be small change requests before merging
|