-
Notifications
You must be signed in to change notification settings - Fork 61
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
Update contributing formatting part #633
Comments
hello @martinfleis , I would like to work on this issue. |
It is this one https://github.com/pysal/momepy/blob/main/docs/contributing.rst but do you know what to change? |
By the issue, I got that we had to add ruff and pre-commit there, but more insight would be very helpful. |
I think firstly we would have to create a .pre-commit-config.yaml file where we will host the below snippet: repos:
- repo: https://github.com/pre-commit/mirrors-ruff
rev: v0.0.1 # You can specify the version you want to use
hooks:
- id: ruff then we can update our Contributing file with following: Contributing
============
Setting Up Your Environment
---------------------------
To ensure a consistent code style and catch potential issues, we use `ruff` and `pre-commit` in this project.
1. Install `ruff` and `pre-commit`:
.. code-block:: bash
pip install ruff pre-commit
2. Set up `pre-commit` hooks:
.. code-block:: bash
pre-commit install
This will install the `pre-commit` hooks defined in the `.pre-commit-config.yaml` file.
3. Running `ruff` manually:
You can run `ruff` manually to check your code for style issues:
.. code-block:: bash
ruff .
4. Running `pre-commit` hooks manually:
You can also run all `pre-commit` hooks manually:
.. code-block:: bash
pre-commit run --all-files
By following these steps, you'll ensure that your code adheres to the project's style guidelines and passes all pre-commit checks before committing changes. let me know if I'm right;) |
Should I make PR about it? |
Please check the existing code base first. We do have a pre commit. The rest is roughly ok. |
We should include ruff and pre-commit there.
The text was updated successfully, but these errors were encountered: