-
Notifications
You must be signed in to change notification settings - Fork 111
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
Update Documentation: Correct Example for Running ping #489
Comments
I've just released a version The instructions on how to run a demo are kind of clunky, so I've started PR #490 to make the interface nicer and the docs more explicit. I'd rather just have instructions using If you'd like to add to that PR, you're welcome. |
@pacrob : Congrats on the 0.2.1 release — it’s great to see the ping example included! This is a fantastic addition and will really help developers understand and test basic functionality more easily. 🎉 I appreciate the effort you’re putting into PR #490 to streamline the interface and improve the documentation. Making the demo instructions clearer and more intuitive is a big win, and simplifying it to a clean I totally understand the challenge of keeping a consistent release schedule — it’s a tough balancing act. Regardless, your work to improve the process and minimize these issues is greatly appreciated. I’d be happy to take a look at PR #490 and contribute where I can. Let me know if there are any specific areas you'd like help with, whether it’s refining instructions, adding examples, or testing out the changes. Thanks for your great work on py-libp2p — it’s exciting to see the project evolving and becoming more accessible! 🚀 |
Summary
The
ping
example in thepy-libp2p
documentation (please visit https://py-libp2p.readthedocs.io/en/latest/examples.ping.html ) does not work whenlibp2p
is installed via PyPI usingpython -m pip install libp2p
. This is because the PyPI version does not include theping
functionality. To replicate the issue, installlibp2p
via PyPI and attempt to run theping
example; it will result in an error.Steps to Replicate:
libp2p
via PyPI:ping
example:ping
functionality is missing in the PyPI version.Current workflow to run ping example successfully
Install
libp2p
directly from the GitHub repository to get the latest version, which includesping
:Expected behavior
When following the instructions in the documentation, running the
ping
example should work without issues. Specifically:libp2p
via the documented command:ping
example with:The
ping
example should successfully execute, allowing nodes to ping each other and display the expected output, such as the successful exchange of ping messages between nodes.Actual behavior
When installing
libp2p
via PyPI using the command:and then running the
ping
example with:the command fails because the
ping
functionality is not included in the PyPI version oflibp2p
. This results in an error, such as:This error occurs because the version of
libp2p
available on PyPI does not contain theping
feature, which is only available in the latest version on GitHub.Relevant log output
ModuleNotFoundError: No module named 'libp2p.ping'
Possible Solution
The issue arises because the version of
libp2p
available on PyPI is outdated and does not include theping
functionality. To resolve this, the following steps are recommended:Update the Documentation:
Change the installation instructions in the
ping
example documentation to recommend installinglibp2p
directly from the GitHub repository, which contains the latest code:This ensures users get the latest version, which includes the
ping
functionality.Publish an Updated Version to PyPI:
Push the latest version of
libp2p
to PyPI so that theping
functionality is available when users install via:Add a Note to the Documentation:
Include a note explaining that the PyPI version might not always contain the latest features and suggest installing from GitHub for the most up-to-date functionality.
Environment
No response
Would you like to work on fixing this bug ?
Yes
The text was updated successfully, but these errors were encountered: