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
2 changes: 1 addition & 1 deletion .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: make mypy
- run: make ty

test:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
__pycache__

.venv
.mypy_cache
.ty_cache
.ruff_cache
.python-version

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ lint:
check_formatting:
uv run ruff format --check src/

mypy:
uv run mypy src/ --exclude "src/research"
ty:
uv run ty check src/ --exclude "src/research/**"

test:
uv run pytest tests/ -v
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ make test
Run type checking:

```bash
make mypy
make ty
```
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ make full_pipe # Cleans, generates, and analyzes
```bash
make format # Format code with ruff
make lint # Check for linting issues
make mypy # Type checking
make ty # Type checking
```

### Testing
Expand Down
12 changes: 4 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ dependencies = [
"dask>=2025.1.0",
"ipykernel>=6.29.5",
"matplotlib>=3.10.0",
"mypy>=1.15.0",
"nltk>=3.9.1",
"numpy>=2.2.2",
"optuna>=4.4.0",
"pandas>=2.2.3",
"pydantic>=2.10.6",
"ruff>=0.9.3",
"scipy>=1.15.2",
"sentence-transformers>=4.1.0",
"stubs>=1.0.0",
"ruff>=0.9.3",
"torch>=2.6.0",
"transformers>=4.48.3",
"ty>=0.0.4",
]

[project.optional-dependencies]
Expand Down Expand Up @@ -131,7 +131,6 @@ ignore = [
"UP007", # Conflicts with pydantic
"E501", # Line length
"COM812", # Conflicts with formatter
"D407", # Conflicts with mkdocs
"ANN401", # **kwargs and *args must be arbitrary type
"D100", # required docs
"D101",
Expand All @@ -154,8 +153,5 @@ ignore = [
"PLR2004", # Magic value comparisons (acceptable in tests)
]

[tool.mypy]
mypy_path = "src"
strict = true
python_version = "3.12"
plugins = ["pydantic.mypy"]
[tool.ty]

4 changes: 2 additions & 2 deletions src/models/softmax_bottleneck_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def __init__(
weight_init: WeightInit | None = None,
) -> None:
super().__init__()
self.hidden_dim = hidden_size
self.output_dim = output_size
self.hidden_dim: int = hidden_size
self.output_dim: int = output_size
self.fc_in = nn.Linear(output_size, hidden_size)
self.hidden_layers: list[nn.Linear] = []
if activation is None:
Expand Down
4 changes: 2 additions & 2 deletions src/recovery/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def __init__(
lambda_norm: float = 1.0e2,
) -> None:
super().__init__()
self.lambda_nonneg = lambda_nonneg
self.lambda_norm = lambda_norm
self.lambda_nonneg: float = lambda_nonneg
self.lambda_norm: float = lambda_norm

def forward(
self,
Expand Down
63 changes: 27 additions & 36 deletions uv.lock

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