Skip to content

Update Python development instructions in README.md #15424

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

Merged
merged 3 commits into from
Mar 17, 2025

Conversation

cgoldberg
Copy link
Contributor

@cgoldberg cgoldberg commented Mar 14, 2025

User description

Motivation and Context

This PR updates the main README.md with improved instructions for developing with Python.

Previously, it was very incomplete and included an instruction to run ./go py:update, which doesn't exist. Now it has instructions for setting up a local development environment and running linting tools.

Fixes #15369

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

PR Type

Documentation


Description

  • Updated Python development instructions in README.md.

  • Added detailed linting instructions for Python code.

  • Included steps for local installation and virtual environments.

  • Replaced outdated commands with accurate alternatives.


Changes walkthrough 📝

Relevant files
Documentation
README.md
Enhanced Python development and linting instructions.       

README.md

  • Added detailed linting instructions for Python development.
  • Updated local installation steps and dependencies setup.
  • Replaced outdated ./go py:update command with accurate alternatives.
  • Included guidance on virtual environments for package installation.
  • +34/-3   

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No major issues detected

    Copy link
    Contributor

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @cgoldberg cgoldberg merged commit dbf3dae into SeleniumHQ:trunk Mar 17, 2025
    7 of 9 checks passed
    @cgoldberg cgoldberg deleted the update-py-dev-readme branch March 17, 2025 01:23
    @titusfortner
    Copy link
    Member

    One thing with this is that we want people to be able to lint Python without needing to install Python locally.

    We should be able to do something like:

    py_binary(
        name = "format",
        srcs = ["format.py"],
        deps = [
            requirement("black"),
            requirement("isort"),
            requirement("flake8"),
            requirement("docformatter"),
            requirement("tox"),
        ],
    )
    

    and then just create a python file that uses subprocess.check_call instead of needing to be a shell script

    @cgoldberg
    Copy link
    Contributor Author

    One thing with this is that we want people to be able to lint Python without needing to install Python locally

    heh? :) You kinda lost me.

    Do you mean creating a format.py script that calls all the linting tools? Wouldn't you still need Python installed to run that? What's the advantage of that over running everything with tox like it does now?

    The only problem with the current setup is you need to install tox to run the linting... so that should be added as a build requirement and also to requirements.py.

    sandeepsuryaprasad pushed a commit to sandeepsuryaprasad/selenium that referenced this pull request Mar 23, 2025
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    [🐛 Bug]: Instructions for setting up a local development environment for Python need updating
    2 participants