Skip to content

Conversation

@bharatagarwal
Copy link

Hello! Love this library.

I'm preparing for DS&Algorithm interviews and am using this to help me visualize graphs.

I wanted to import this package and use it in my repository. There's another library that's taken up the graphscii namespace on pip: https://github.com/etano/graphscii.

However, once the repo has a pyproject.toml file, I can add it like so in my requirements.txt.

git+https://github.com/bharatagarwal/graphscii.git

Note: It would change to git+https://github.com/raybbian/graphscii.git if you merge this.

@bharatagarwal
Copy link
Author

Publishing to PyPI

I think it's worth publishing this to pip. Here are the steps if you're interested. I can raise another PR if you'd like any help.

Update pyproject.toml

Add the following metadata to your pyproject.toml:

[project]
authors = [
    {name = "...", email = "..."}
]
license = {text = "..."}
homepage = "..."
repository = "..."
classifiers = [
    "Programming Language :: Python :: 3",
    "..CHOOSE..",
    "Operating System :: OS Independent",
]

Create a LICENSE file

Add a LICENSE file to your repository (e.g., MIT License).

Publishing Steps

  1. Check package name availability:

  2. Build the package:

    python -m build
  3. Test upload to TestPyPI:

    python -m twine upload --repository testpypi dist/*
  4. Test installation from TestPyPI:

    pip install --index-url https://test.pypi.org/simple/ graphscii
  5. Upload to PyPI:

    python -m twine upload dist/*

Version Management

Update the version number in pyproject.toml for each release:

[project]
version = "0.1.1"  # Increment for new releases

Installation from GitHub (Current)

Users can install directly from GitHub:

pip install git+https://github.com/raybbian/graphscii.git

Installation from PyPI (After Publishing)

Once published, users can install with:

pip install npx-graphscii # or whatever name you choose.

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