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
28 changes: 28 additions & 0 deletions .github/workflows/ty.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "ty CI"

on:
push:
branches: [ "master", "development" ]
pull_request:
branches: [ "master" , "development" ]

jobs:
type_checker:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"

- name: Install uv
run: pip install uv

- name: Install Dependencies
run: uv sync --all-extras

- name: ty Type Checking
run: uv run ty check
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dependencies = [
]

[project.optional-dependencies]
dev = ["ruff>=0.14.2", "jupytext"]
dev = ["ruff>=0.14.2", "jupytext", "ty"]
docs = ["sphinx>=8.2.3", "sphinx-autoapi>=3.6.1", "sphinx-rtd-theme>=3.0.2"]
notebooks = ["ipykernel"]

Expand Down
41 changes: 41 additions & 0 deletions ty.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[src]
# Ignore files that haven't been typed yet.
# As files are typed, they can be removed from this list.
# DO NOT ADD NEW FILES TO THIS LIST, NEW FILES SHOULD BE TYPED.
exclude = [
"notebooks/demo_data_driven.ipynb",
"notebooks/demo_data_driven.py",
"notebooks/demo_fcsa.ipynb",
"notebooks/demo_fcsa.py",
"notebooks/demo_problem.ipynb",
"notebooks/demo_problem.py",
"scripts/list_directories.py",
"scripts/run_experiment.py",
"simopt/directory.py",
"simopt/experiment_base.py",
"simopt/gui/data_farming_window.py",
"simopt/gui/new_experiment_window.py",
"simopt/gui/plot_window.py",
"simopt/model.py",
"simopt/models/amusementpark.py",
"simopt/models/chessmm.py",
"simopt/models/cntnv.py",
"simopt/models/dualsourcing.py",
"simopt/models/dynamnews.py",
"simopt/models/facilitysizing.py",
"simopt/models/ironore.py",
"simopt/models/network.py",
"simopt/models/tableallocation.py",
"simopt/problem.py",
"simopt/solvers/astrodf.py",
"simopt/solvers/fcsa.py",
"simopt/utils.py",
"test/test_experiments.py",
]

# See https://docs.astral.sh/ty/reference/rules/ for Rules documentation.
# Rule options are ["error", "warn", "ignore"]
[rules]
division-by-zero = "warn" # Default is "ignore"
possibly-unresolved-reference = "warn" # Default is "ignore"
unused-ignore-comment = "warn" # Default is "ignore"