Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
46 changes: 20 additions & 26 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,19 @@ jobs:
- name: Checkout source
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v5
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: "3.13"
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
run: uv sync

- name: Build binary
run: |
echo "__version__ = \"$REF_NAME\"" > app/version.py
pyinstaller --onefile main.py --name $FILENAME
uv run pyinstaller --onefile main.py --name $FILENAME

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
Expand Down Expand Up @@ -234,12 +232,12 @@ jobs:
-v $PWD:/pkg \
archlinux:base-devel \
bash -c "
pacman -Sy --noconfirm python python-pip openssl git &&
pacman -Sy --noconfirm curl openssl git &&
curl -LsSf https://astral.sh/uv/install.sh | sh &&
export PATH=\"/root/.local/bin:\$PATH\" &&
cd /pkg &&
python -m venv venv &&
source venv/bin/activate &&
pip install -r requirements.txt &&
pyinstaller --onefile main.py --name $FILENAME --distpath /pkg/dist
uv sync &&
uv run pyinstaller --onefile main.py --name $FILENAME --distpath /pkg/dist
"

# Fix file ownership after Docker run
Expand Down Expand Up @@ -369,16 +367,14 @@ jobs:
- name: Checkout source
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v5
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: "3.13"
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
run: uv sync

- name: Build binary
shell: pwsh
Expand All @@ -387,7 +383,7 @@ jobs:
run: |
$version_content = '__version__ = "{0}"' -f $env:REF_NAME
$version_content | Out-File -FilePath app/version.py -Encoding utf8
pyinstaller --onefile --name gitmastery main.py
uv run pyinstaller --onefile --name gitmastery main.py

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
Expand Down Expand Up @@ -442,21 +438,19 @@ jobs:
- name: Checkout source
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v5
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: "3.13"
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
run: uv sync

- name: Build binary
run: |
echo "__version__ = \"$REF_NAME\"" > app/version.py
pyinstaller --onefile --name "gitmastery-$ARCHITECTURE" main.py
uv run pyinstaller --onefile --name "gitmastery-$ARCHITECTURE" main.py

- name: Generate SHA256 (amd64)
if: matrix.arch == 'amd64'
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,18 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
run: uv sync

- name: Build binary
run: |
pyinstaller --onefile main.py --name gitmastery
uv run pyinstaller --onefile main.py --name gitmastery

- name: Set binary path (Unix)
if: runner.os != 'Windows'
Expand All @@ -72,4 +70,4 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GH_PAT }}
run: |
python -m pytest tests/e2e/ -v
uv run pytest tests/e2e/ -v
14 changes: 6 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
run: uv sync

- name: Build binary
run: |
pyinstaller --onefile main.py --name gitmastery
uv run pyinstaller --onefile main.py --name gitmastery

- name: Set binary path (Unix)
if: runner.os != 'Windows'
Expand All @@ -66,4 +64,4 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GH_PAT }}
run: |
python -m pytest tests/e2e/ -v
uv run pytest tests/e2e/ -v
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
11 changes: 4 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You are an expert software developer handling this repo.
- app/: CLI entry, commands, utils, configs, logging, hooks, __init__.py, cli.py, version.py
- docs/: user documentation and platform-specific guides
- main.py: entrypoint to start the CLI
- requirements.txt: Python dependencies
- pyproject.toml: Python dependencies

**Important files and folders**:
- main.py - entrypoint; sets up logging then starts the CLI
Expand All @@ -35,14 +35,11 @@ You are an expert software developer handling this repo.
- docs/ - user documentation and platform guides

## Tools you can use
**Run**:
- `python main.py`
**Run**:
- `uv run python main.py`

**Install deps**:
- `python -m venv venv`
- Windows with Git-Bash: `source venv/Scripts/activate`
- macOS: `source venv/bin/activate`
- `pip install -r requirements.txt`
- `uv sync`

**Information Display**:
- Use `info()` for normal user-facing status
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,10 @@ If you wish to contribute to the packaging support, file a PR!

## Local development

To develop the app locally, create a virtualenv and download the requirements to start.
To develop the app locally, install dependencies and set up pre-commit hooks:

```bash
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uv sync
lefthook install # set up pre-commit hooks
```

Expand Down
6 changes: 3 additions & 3 deletions lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ pre-commit:
commands:
ruff-lint:
glob: "*.py"
run: ruff check --fix {staged_files}
run: uv run ruff check --fix {staged_files}
stage_fixed: true

ruff-format:
glob: "*.py"
run: ruff format {staged_files}
run: uv run ruff format {staged_files}
stage_fixed: true

mypy:
glob: "*.py"
run: mypy .
run: uv run mypy .
38 changes: 38 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[project]
name = "gitmastery"
version = "0.1.0"
requires-python = ">=3.13"
dependencies = [
"click==8.3.1",
"difflib-parser==2.1.1",
"git-autograder==6.6.0",
"gitpython==3.1.46",
"librt==0.8.1",
"pygments==2.19.2",
"pytermgui==7.7.4",
"pytz==2026.1.post1",
"pyyaml==6.0.3",
"repo-smith==2.6.1",
"requests==2.32.5",
"typing_extensions==4.15.0",
"wcwidth==0.6.0",
]

[dependency-groups]
dev = [
"lefthook==2.1.4",
"mypy==1.19.1",
"mypy_extensions==1.1.0",
"pyinstaller==6.19.0",
"pyinstaller-hooks-contrib==2026.3",
"pytest==9.0.2",
"pytest-order==1.3.0",
"ruff==0.14.10",
"setuptools==82.0.1",
"types-pytz==2026.1.1.20260304",
"types-pyyaml==6.0.12.20250915",
"types-requests==2.32.4.20260107",
]

[tool.uv]
package = false
17 changes: 9 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
altgraph==0.17.5
certifi==2026.2.25
charset-normalizer==3.4.5
charset-normalizer==3.4.6
click==8.3.1
difflib-parser==2.1.1
git-autograder==6.6.0
gitdb==4.0.12
GitPython==3.1.46
gitpython==3.1.46
idna==3.11
iniconfig==2.3.0
lefthook==2.1.4
librt==0.8.1
macholib==1.16.4
mypy==1.19.1
mypy_extensions==1.1.0
mypy-extensions==1.1.0
packaging==26.0
pathspec==1.0.4
pluggy==1.6.0
Pygments==2.19.2
pygments==2.19.2
pyinstaller==6.19.0
pyinstaller-hooks-contrib==2026.3
PyTermGUI==7.7.4
pytermgui==7.7.4
pytest==9.0.2
pytest-order==1.3.0
pytz==2026.1.post1
PyYAML==6.0.3
pyyaml==6.0.3
repo-smith==2.6.1
requests==2.32.5
ruff==0.14.10
setuptools==82.0.1
smmap==5.0.3
types-pytz==2026.1.1.20260304
types-PyYAML==6.0.12.20250915
types-pyyaml==6.0.12.20250915
types-requests==2.32.4.20260107
typing_extensions==4.15.0
typing-extensions==4.15.0
urllib3==2.6.3
wcwidth==0.6.0
4 changes: 2 additions & 2 deletions scripts/build_test_e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ set -e
FILENAME="gitmastery"

echo "Building gitmastery binary..."
pyinstaller --onefile main.py --name $FILENAME
uv run pyinstaller --onefile main.py --name $FILENAME

echo "Running E2E tests..."
pytest tests/e2e -v
uv run pytest tests/e2e -v

echo "All E2E tests passed!"
Loading