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
7 changes: 4 additions & 3 deletions .github/workflows/ci-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ jobs:
uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v7
with:
version: "latest"
enable-cache: true

- name: Set up Python
uses: actions/setup-python@v6
Expand All @@ -34,8 +35,8 @@ jobs:
- name: Run Ruff linting
run: uv run ruff check .

- name: Check Black formatting
run: uv run black --check --diff .
- name: Check Ruff formatting
run: uv run ruff format --check --diff .

- name: Run Pyright type checking
run: uv run pyright
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
enable-cache: true

- name: Install dependencies
run: uv sync --locked --dev
Expand Down
7 changes: 1 addition & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ repos:
hooks:
# Run the linter.
- id: ruff-check
args: [ --fix ]
args: [--fix]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.11.0
hooks:
- id: black
language_version: python3.12
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Use [uv](https://docs.astral.sh/uv/) for repeatable environments:
```bash
$ uv run pytest # run the test suite
$ uv run ruff check . # lint
$ uv run black . # format
$ uv run ruff format . # format
$ make ci # run all checks (lint, format, typecheck, tests)
$ make fix # auto-fix formatting and lint issues
```

## Coding Style & Naming Conventions
Code targets Python 3.12+ and follows Black’s default formatting plus Ruff’s lint rules; both tools run through pre-commit. Use descriptive module-level constants and snake_case for functions, attributes, and variables. Public CLIs should expose Typer commands with concise verbs (`link`, `ls`, `gc`). Docstrings follow the Google style already used throughout `src/uvlink`. When handling paths, prefer `pathlib.Path` over `os.path` helpers.
Code targets Python 3.12+ and follows Ruff’s default formatting plus Ruff’s lint rules; both tools run through pre-commit. Use descriptive module-level constants and snake_case for functions, attributes, and variables. Public CLIs should expose Typer commands with concise verbs (`link`, `ls`, `gc`). Docstrings follow the Google style already used throughout `src/uvlink`. When handling paths, prefer `pathlib.Path` over `os.path` helpers.

## Testing Guidelines
Author tests with Pytest, naming files `test_<module>.py` and functions `test_<behavior>`. Focus on validating cross-platform behavior: cache path resolution, symlink creation/removal, and garbage-collection logic. Mock filesystem access where possible so tests run on CI without touching the real cache. Aim to cover every Typer command path, including `--dry-run`.
Expand Down
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ all: fix ci ## Run formatting fixes and all checks/tests (fix + check)


.PHONY: fix
fix: ## Auto-fix lint/format issues via Ruff and Black (will modify code!)
fix: ## Auto-fix lint/format issues via Ruff (will modify code!)
uv run pyproject-fmt pyproject.toml
uv run ruff check --fix .
uv run ruff format .
uv run black .


.PHONY: check-lint
Expand All @@ -20,8 +19,8 @@ check-lint: ## Ruff lint (check only)


.PHONY: check-fmt
check-fmt: ## Black dry-run (check only)
uv run black --check --diff .
check-fmt: ## Ruff dry-run (check only)
uv run ruff format --check --diff .


.PHONY: check-type
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Each project receives a stable hash based on its absolute path, so repeated runs

## Contributing

Issues and pull requests are welcome. Please keep docstrings and comments in the Google style already used throughout the codebase and run the included linters/formatters before submitting. A pre-commit configuration is provided that runs Ruff and Black; install it with `pre-commit install` to match formatting.
Issues and pull requests are welcome. Please keep docstrings and comments in the Google style already used throughout the codebase and run the included linters/formatters before submitting. A pre-commit configuration is provided that runs Ruff; install it with `pre-commit install` to match formatting.

Also, feel free to make comments/discussion at

Expand Down
4 changes: 2 additions & 2 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ uv run pytest
uv run ruff check .

# Format code
uv run black .
uv run ruff format .

# Run all checks (lint, format, typecheck, tests)
make ci
Expand All @@ -48,7 +48,7 @@ make fix
## Coding Style

- **Python Version**: 3.12+
- **Formatting**: Black (default settings).
- **Formatting**: Ruff (default settings).
- **Linting**: Ruff (rules in `pyproject.toml`).
- **Conventions**:
- Snake_case for functions/variables.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ scripts.uvlink = "uvlink.cli:app"

[dependency-groups]
dev = [
"black>=25.11",
"pre-commit>=4.4",
"pyproject-fmt>=2.11.1",
"pyright>=1.1.407",
Expand All @@ -42,6 +41,7 @@ dev = [
]

[tool.ruff]
line-length = 88
lint.select = [ "B", "E", "F", "I", "UP" ]

[tool.pyrefly]
Expand Down
58 changes: 0 additions & 58 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.