normal-computing / thermox

Exact OU processes with JAX
Apache License 2.0
24 stars 3 forks source link

Review minor cleanups #6

Closed gecrooks closed 4 months ago

gecrooks commented 4 months ago

Fix typing to make mypy happy dataclass preferred over NamedTuple Rename negexpm to expnegm Add missing dev dependencies

SamDuffield commented 4 months ago

I think I prefer NamedTuple over dataclass. NamedTuples are immutable which fits better with JAX's functional style. Agree on the renaming to expnegm We should add a pre-commit with Ruff (does everything that black does and more, and faster)

SamDuffield commented 4 months ago

We need to keep the __init__.py structure lol

you can add

[tool.ruff]
ignore-init-module-imports = true

to the pyproject.toml.

Also should pre-commit be an optional dependency in dev? I think probably. Either way black should be removed from dev as ruff does its job.