Skip to content

Commit d3d2eda

Browse files
authored
Terminal User Interface (TUI) Extension for CCF-Deadlines && Refactor for CLI Extension (#1444)
1 parent 86708b1 commit d3d2eda

50 files changed

Lines changed: 8861 additions & 400 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/merge_check.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,41 @@ on:
33
pull_request:
44
branches: [main]
55
jobs:
6+
test:
7+
name: Run Tests
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
- name: Set up Python
13+
uses: actions/setup-python@v5
14+
with:
15+
python-version: '3.10'
16+
- name: Install CLI dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install -e "extensions/cli/[dev]"
20+
- name: Install TUI dependencies
21+
run: |
22+
pip install -e "extensions/tui/[dev]"
23+
- name: Run CLI tests
24+
run: |
25+
cd extensions/cli
26+
python -m pytest tests/ -v
27+
- name: Run TUI tests
28+
run: |
29+
cd extensions/tui
30+
python -m pytest tests/ -v
31+
- name: Install scripts dependencies
32+
run: |
33+
python -m pip install PyYAML jsonschema pytest
34+
- name: Run scripts tests
35+
run: |
36+
python -m pytest scripts/tests/ -v
637
build:
38+
name: Build Frontend
739
runs-on: ubuntu-latest
40+
needs: test
841
steps:
942
- name: Checkout
1043
uses: actions/checkout@v2.3.4

.github/workflows/tests.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Tests
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
7+
jobs:
8+
test-cli:
9+
name: Test CLI Extension
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
- name: Set up Python
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: '3.10'
18+
- name: Install CLI dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install -e "extensions/cli/[dev]"
22+
- name: Run CLI tests
23+
run: |
24+
cd extensions/cli
25+
python -m pytest tests/ -v
26+
test-tui:
27+
name: Test TUI Extension
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
- name: Set up Python
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: '3.10'
36+
- name: Install CLI dependencies (TUI depends on CLI)
37+
run: |
38+
python -m pip install --upgrade pip
39+
pip install -e extensions/cli/
40+
- name: Install TUI dependencies
41+
run: |
42+
pip install -e "extensions/tui/[dev]"
43+
- name: Run TUI tests
44+
run: |
45+
cd extensions/tui
46+
python -m pytest tests/ -v
47+
test-python-scripts:
48+
name: Test Python Scripts
49+
runs-on: ubuntu-latest
50+
steps:
51+
- name: Checkout
52+
uses: actions/checkout@v4
53+
- name: Set up Python
54+
uses: actions/setup-python@v5
55+
with:
56+
python-version: '3.10'
57+
- name: Install dependencies
58+
run: |
59+
python -m pip install --upgrade pip
60+
python -m pip install PyYAML jsonschema pytest
61+
- name: Run scripts tests
62+
run: |
63+
python -m pytest scripts/tests/ -v

.readme_assets/ccf_ddl_tui.png

400 KB
Loading

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,22 @@ English | [简体中文](https://translate.google.com/translate?sl=auto&tl=zh&u=
2626
### Extensions
2727
<table>
2828
<tr>
29+
<td align="center"><b><a href="https://github.com/ccfddl/ccf-deadlines/tree/main/extensions/tui">TUI Terminal</a><br></b></td>
2930
<td align="center"><b><a href="https://github.com/ccfddl/ccf-deadlines/tree/main/extensions/cli">PyCli Tool</a><br></b></td>
3031
<td align="center"><b><a href="https://www.raycast.com/ViGeng/ccfddl?via=ViGeng">Raycast Extension</a><br></b></td>
31-
<td align="center"><b><a href="https://github.com/superpung/swiftbar-ccfddl/">SwiftBar Plugin</a><br></b></td>
3232
</tr>
3333
<tr>
34+
<td align="center"><img src=".readme_assets/ccf_ddl_tui.png" width="280px"/></td>
3435
<td align="center"><img src=".readme_assets/screenshot_pycli.png" width="280px"/></td>
3536
<td align="center"><img src=".readme_assets/screenshot_raycast.png" width="280px"/></td>
36-
<td align="center"><img src="https://raw.githubusercontent.com/superpung/swiftbar-ccfddl/refs/heads/main/docs/preview.png" width="280px"/></td>
3737
</tr>
3838
<tr>
39+
<td align="center"><b><a href="https://github.com/superpung/swiftbar-ccfddl/">SwiftBar Plugin</a><br></b></td>
3940
<td align="center"><b><a href="https://github.com/ccfddl/ccf-deadlines/tree/main/extensions/ical">iCal Subscription</a><br></b></td>
4041
<td align="center"><b><a href="https://github.com/ccfddl/ccf-deadlines/tree/main/extensions/chrome">Chrome Extension</a><br></b></td>
4142
</tr>
4243
<tr>
44+
<td align="center"><img src="https://raw.githubusercontent.com/superpung/swiftbar-ccfddl/refs/heads/main/docs/preview.png" width="280px"/></td>
4345
<td align="center"><img src=".readme_assets/screenshot_iCal.jpg" width="280px"/></td>
4446
<td align="center"><img src=".readme_assets/screenshot_ccf-ddl-tracker.png" width="280px"/></td>
4547
</tr>

extensions/cli/ccfddl/__init__.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
"""CCFDDL CLI - Conference Deadline Tracker."""
2+
3+
__version__ = "0.2.0"
4+
__author__ = "0x4f5da2"
5+
6+
from ccfddl.utils import load_mapping, get_timezone, reverse_index, format_duration, parse_datetime_with_tz
7+
from ccfddl.models import (
8+
Conference,
9+
ConferenceYear,
10+
Timeline,
11+
Rank,
12+
Category,
13+
CATEGORIES,
14+
VALID_SUBS,
15+
get_category_by_sub,
16+
get_all_subs,
17+
is_valid_sub,
18+
)
19+
from ccfddl.cache import CacheManager, get_default_cache
20+
21+
__all__ = [
22+
"__version__",
23+
"__author__",
24+
"load_mapping",
25+
"get_timezone",
26+
"reverse_index",
27+
"format_duration",
28+
"parse_datetime_with_tz",
29+
"Conference",
30+
"ConferenceYear",
31+
"Timeline",
32+
"Rank",
33+
"Category",
34+
"CATEGORIES",
35+
"VALID_SUBS",
36+
"get_category_by_sub",
37+
"get_all_subs",
38+
"is_valid_sub",
39+
"CacheManager",
40+
"get_default_cache",
41+
]

0 commit comments

Comments
 (0)