Skip to content
Open
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
17 changes: 10 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
ci:
autoupdate_schedule: quarterly

default_stages: [pre-commit]

default_install_hook_types: [pre-commit, commit-msg]

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.13
rev: v0.14.4
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-case-conflict
- id: check-symlinks
Expand All @@ -40,3 +35,11 @@ repos:
# MD041: first line in a file should be a top-level heading
# MD034: bare URL used
args: [--disable, MD013, MD033, MD041, MD034, '--']

- repo: local
hooks:
- id: ty
name: ty check
entry: ty check
language: python
additional_dependencies: [ty, torch, ase, mace-torch]
2 changes: 1 addition & 1 deletion examples/scripts/7_Others/7.4_Velocity_AutoCorrelation.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def main() -> None:

num_steps = 15000 # NOTE: short run
for step in range(num_steps):
state = ts.nve_step(state=state, model=lj_model, dt=dt) # type: ignore[call-arg]
state = ts.nve_step(state=state, model=lj_model, dt=dt)
reporter.report(state, step)

reporter.close()
Expand Down
4 changes: 2 additions & 2 deletions examples/tutorials/low_level_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@
model=MaceUrls.mace_mpa_medium,
return_raw_model=True,
default_dtype=str(dtype).removeprefix("torch."),
device=device,
device=str(device),
)

# wrap the mace_mp model in the MaceModel class
model = MaceModel(
model=loaded_model,
model=loaded_model, # type: ignore[arg-type]
device=device,
compute_forces=True,
compute_stress=True,
Expand Down
26 changes: 12 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ fairchem = ["fairchem-core>=2.7"]
docs = [
"autodoc_pydantic==2.2.0",
"furo==2024.8.6",
"ipython==8.34.0",
"ipykernel==6.30.1",
"ipython==8.34.0",
"jsonschema[format]",
"jupyterlab==4.3.4",
"jupyter-core==5.8.1",
"jupyterlab==4.3.4",
"jupytext==1.16.7",
"myst_parser==4.0.0",
"nbsphinx>=0.9.7",
Expand Down Expand Up @@ -145,27 +145,27 @@ conflicts = [
],
[
{ extra = "fairchem" },
{ extra = "mace" },
{ extra = "graphpes" },
],
[
{ extra = "graphpes" },
{ extra = "mattersim" },
{ extra = "fairchem" },
{ extra = "mace" },
],
[
{ extra = "graphpes" },
{ extra = "sevenn" },
{ extra = "fairchem" },
{ extra = "mace" },
],
[
{ extra = "graphpes" },
{ extra = "fairchem" },
{ extra = "mattersim" },
],
[
{ extra = "graphpes" },
{ extra = "nequip" },
],
[
{ extra = "fairchem" },
{ extra = "mace" },
{ extra = "graphpes" },
{ extra = "sevenn" },
],
[
{ extra = "mace" },
Expand All @@ -182,15 +182,13 @@ conflicts = [
]

[dependency-groups]
dev = ["prek>=0.2.0", "ty>=0.0.1a20"]
dev = ["prek>=0.2.13", "ty>=0.0.1a25"]

[tool.ty.rules]
# TODO: Unable to work with **kwargs: https://github.com/astral-sh/ty/issues/247
missing-argument = "ignore"
unused-ignore-comment = "warn"

[[tool.ty.overrides]]
include = ["tests/models/**/*.py", "torch_sim/models/**/*.py"]

# TODO would be nice to only ignore unresolved model imports but fail on all other packages
[tool.ty.overrides.rules]
unresolved-import = "ignore"
Loading