8000 Update contributing formatting part · Issue #633 · pysal/momepy · GitHub
[go: up one dir, main page]

Skip to content

Update contributing formatting part #633

Open

Description

@martinfleis

We should include ruff and pre-commit there.

Activity

  1. speco29 commented on Feb 11, 2025

    @speco29

    We should include ruff and pre-commit there.

    hello @martinfleis , I would like to work on this issue.
    Can you tell me what file are you talking about here specifically?

  2. martinfleis commented on Feb 11, 2025

    @martinfleis
    MemberAuthor

    It is this one https://github.com/pysal/momepy/blob/main/docs/contributing.rst but do you know what to change?

  3. speco29 commented on Feb 11, 2025

    @speco29

    By the issue, I got that we had to add ruff and pre-commit there, but more insight would be very helpful.

  4. speco29 commented on Feb 12, 2025

    @speco29

    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;)

  5. speco29 commented on Feb 15, 2025

    @speco29

    Should I make PR about it?

  6. martinfleis commented on Feb 15, 2025

    @martinfleis
    MemberAuthor

    I think firstly we would have to create a .pre-commit-config.yaml

    Please check the existing code base first. We do have a pre commit.

    The rest is roughly ok.

  7. added a commit that references this issue on Feb 15, 2025
    8ab4275
  8. abhayrajjais01 commented on Jan 20, 2026

    @abhayrajjais01

    @martinfleis can you please give a little brief about what you really want to change in this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0