This guideline is very much a WIP
Contributions to pytorch-optimizer
for code, documentation, and tests are always welcome!
Currently, black
and ruff
are used to format & lint the code. Here are the lint options
Or you just simply run make format
and make check
on the project root.
You can create the environment with make init
or just install the pip packages to your computer.
A few differences from the default black
(or another style guide) are
- line-length is 119 characters.
- single quote is preferred instead of a double quote.
But, maybe, if you feel or think that it's too much or takes much time, then feel free to ask the maintainer to fix the lint stuff!
Docstring style is reST
(which is not Google and Numpydoc styles), and documentation will be built & deployed automatically via readthedocs
. You can find an example from here.
You can run a test by make test
on the project root!
If you have any questions about contribution, please ask in the Issues, Discussions, or just in PR :)
Thank you!