Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Style Guide and Pre-commit. #30

Open
soldni opened this issue Aug 22, 2023 · 2 comments
Open

Add Style Guide and Pre-commit. #30

soldni opened this issue Aug 22, 2023 · 2 comments

Comments

@soldni
Copy link
Member

soldni commented Aug 22, 2023

          I would really love a proper contributing.md document styleguide and precommit.

Originally posted by @chris-ha458 in #23 (comment)

@chris-ha458
Copy link
Contributor

Currently as an outside contributor, what the project asks of people commiting are as follows :

  1. Subitems under pyproject.toml.
    More specifically, the contents of :
    [tool.mypy]
    [tool.isort]
    [tool.autopep8]
    [tool.black]
    [tool.mypy-tests]
  2. Build tests involving the above.

One issue is that this is not directly communicated in plain language. a simple contributing.md that says to refer to the above could be helpful, and further documentation would be more helpful (and more work).
Obviously, if there are any further direction that contributors should be mindful of, those parts went over my head. It would be helpful to document that.

Another issue, which is actually separate. I often have difficulty setting all that up.
Obviously, this is less the responsibility of the developers.
If an outside contributor has their development setup well configured, they could have their IDE take care of all this.
Unfortunately, even though I am aware of all this, I am often unable to setup my IDE to this level. (Changing dev devices often, using VMs, using WSL, not having physical/root access to dev machine are some of my reasons).

In this case tools such as pre-commit can help.
This could help enforce any such requirements and expectations of the project reproducibly and easily.

@chris-ha458
Copy link
Contributor

Oops i forgot that make style is documented in the readme.md

between cargo fmt and rustfmt for rust part (I know that this is part of make style but I run this habitually as well) and make style for the python part, an automated solution is not an essential, but just a nice to have.
I wonder what the cost would be to invoke make style before any important development step such as develop or publish?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants