Skip to content

Updating CONTRIBUTING.md #Issue - 1070#1073

Open
Garima-149 wants to merge 2 commits intofossasia:masterfrom
Garima-149:master
Open

Updating CONTRIBUTING.md #Issue - 1070#1073
Garima-149 wants to merge 2 commits intofossasia:masterfrom
Garima-149:master

Conversation

@Garima-149
Copy link

@Garima-149 Garima-149 commented Mar 20, 2026

Fixes #<1070>

Summary

This PR improves the setup documentation by addressing a common issue related to the pkg_resources module that new contributors may encounter.

Problem

While setting up the project, a ModuleNotFoundError: No module named 'pkg_resources' error can occur if the required dependency is missing or not properly configured. This can create confusion for first-time contributors.

Changes

  • Added a troubleshooting section in CONTRIBUTING.md
  • Included explanation that pkg_resources is part of the setuptools package
  • Provided clear instructions to install/upgrade setuptools
  • Added guidance to reinstall project dependencies if needed

Impact

This improves the onboarding experience for new contributors by:

  • Reducing setup friction
  • Providing clear resolution steps
  • Preventing common environment-related issues

Testing

  • Verified the fix by installing setuptools in a clean environment
  • Confirmed that the error is resolved after applying the suggested steps

Summary by Sourcery

Documentation:

  • Document troubleshooting steps for resolving pkg_resources-related ModuleNotFoundError during project setup on Windows.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 20, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates CONTRIBUTING.md with troubleshooting guidance for a common Windows setup error involving the missing pkg_resources module, while making minor formatting edits in the existing visdom troubleshooting section.

Flow diagram for resolving pkg_resources ModuleNotFoundError during setup

flowchart TD
  A[Contributor runs project setup or start command] --> B{Does ModuleNotFoundError for pkg_resources occur?}
  B -- No --> C[Continue normal setup and contribution workflow]
  B -- Yes --> D[Open CONTRIBUTING documentation troubleshooting section]
  D --> E[Identify guidance for pkg_resources error]
  E --> F[Run command: pip install --upgrade setuptools]
  F --> G[Restart environment such as terminal or IDE]
  G --> H{Do project commands still fail?}
  H -- No --> I[Setup succeeds and contributor proceeds]
  H -- Yes --> J[Reinstall project dependencies from requirements file]
  J --> K{Do project commands succeed now?}
  K -- Yes --> I[Setup succeeds and contributor proceeds]
  K -- No --> L[Seek further help by opening an issue or asking maintainers]
Loading

File-Level Changes

Change Details Files
Expand CONTRIBUTING.md troubleshooting section to cover pkg_resources / setuptools setup errors on Windows and adjust nearby formatting.
  • Clarified visdom server startup command formatting in the existing troubleshooting section.
  • Added a new troubleshooting entry describing the ModuleNotFoundError: No module named 'pkg_resources' error during setup on Windows.
  • Explained that pkg_resources is provided by the setuptools package and documented how to install or upgrade setuptools via pip.
  • Added guidance to restart the environment after installing setuptools and to reinstall project dependencies from the requirements file if issues persist.
  • Introduced a minor stray line near the restart-visdom instructions that may be a typo and should be checked (the lone 'vi' line).
CONTRIBUTING.md

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue, and left some high level feedback:

  • The updated visdom command now has extra spaces inside the backticks (python -m visdom.server); please remove the leading/trailing spaces so the inline command renders correctly.
  • There appears to be an unintended stray vi line added before the visdom server restart bullet; please remove it to avoid confusion.
  • In the new pkg_resources troubleshooting section, consider formatting the error message and commands as fenced code blocks and fixing minor wording/capitalization (e.g., Windows OS) to improve clarity and consistency.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The updated visdom command now has extra spaces inside the backticks (` python -m visdom.server `); please remove the leading/trailing spaces so the inline command renders correctly.
- There appears to be an unintended stray `vi` line added before the visdom server restart bullet; please remove it to avoid confusion.
- In the new `pkg_resources` troubleshooting section, consider formatting the error message and commands as fenced code blocks and fixing minor wording/capitalization (e.g., `Windows OS`) to improve clarity and consistency.

## Individual Comments

### Comment 1
<location path="CONTRIBUTING.md" line_range="74" />
<code_context>
 For some pip installs, this approach does not always properly link the visdom
 module. In that case, try running `python setup.py install` instead.

+**Issue: Error related to `pkg_resources` during setup in Windows Os:**
+While setting up the project, you may encounter the following error:
+ModuleNotFoundError: No module named 'pkg_resources'
</code_context>
<issue_to_address>
**issue (typo):** Capitalize "OS" in "Windows OS".

In the heading, change "Windows Os" to "Windows OS".

```suggestion
**Issue: Error related to `pkg_resources` during setup in Windows OS:**
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

1 participant