npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sweepai

v0.2.19

Published

This is a fully locally running dev tool for getting Sweep to improve your unit testing suite. It uses your local machine to execute all unit tests for security and rapid iteration.

Downloads

200

Readme

Sweep AI Unit Testing Tool

This is a fully locally running dev tool for getting Sweep to improve your unit testing suite. It uses your local machine to execute all unit tests for security and rapid iteration.

Getting Started (10 min)

Step 0: Pre-requisites (3 min)

For most users the following script should work:

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash # For NVM
npm install -g pnpm # For PNPM

But if that doesn't work, the installation for NVM can be found here and PNPM at here.

Step 1: Set up the Environment and Building (3 min)

Clone into the repo and set up the environment.

git clone https://github.com/sweepai/sweep
cd sweep/platform
nvm install
nvm use
pnpm i

This should take a couple minutes to install. In the meantime, move onto the next step.

Step 2: Get your OpenAI key (3 min)

Get an OpenAI key here and add it to your .env.local.

OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Step 3: Run the Tool (1 min)

Now you can build the tool with

pnpm build

This will take about 20s. Then you can start the tool with:

pnpm start

Using Sweep Unit Test Tool

  1. Insert the path to your local repositorrey.
    • You can run pwd to use your current working directory.
    • (Optional) Edit the branch name to checkout into a new branch for Sweep to work in (defaults to current branch).
  2. Select an existing file for Sweep to add unit tests to.
  3. Add meticulous instructions for the unit tests to add, such as the additional edge cases you would like covered.
  4. Modify the "Test Script" to write your script for running unit tests, such as python $FILE_PATH. You may use the variable $FILE_PATH to refer to the current path. Click the "Run Tests" button to test the script.
    • Hint: use the $FILE_PATH parameter to only run the unit tests in the current file to reduce noise from the unit tests from other files.
  5. Click "Generate Code" to get Sweep to generate additional unit tests.
  6. Then click "Refresh" or the check mark to restart or approve the change.