lisphilar / covid19-sir

CovsirPhy: Python library for COVID-19 analysis with phase-dependent SIR-derived ODE models.
https://lisphilar.github.io/covid19-sir/
Apache License 2.0
109 stars 43 forks source link

[Dev] use type hint and type checker #1258

Open lisphilar opened 1 year ago

lisphilar commented 1 year ago

Checkbox

Issues of the current workflow

Type hints are documented in docstings and un-analyzable with type checker.

Action items

Additional Context

To keep backward compatibility, from __future__ import annotations and typing_extension library may be used.

lisphilar commented 1 year ago

We may need the sphinx.ext.autodoc.typehints extension to show types in documentation. https://github.com/tox-dev/sphinx-autodoc-typehints

lisphilar commented 1 year ago

sphinx.ext.autodoc.typehints will be used in documentation workflow with #1285.

lisphilar commented 1 year ago

With "1286,

lisphilar commented 5 months ago

py.typed should be included.

https://blog.whtsky.me/tech/2021/dont-forget-py.typed-for-your-typed-python-package/