add interop tests, but not turned on

This commit is contained in:
pacrob
2024-03-02 11:47:59 -07:00
parent ee4e9c4645
commit 121c1d0afc
3 changed files with 63 additions and 34 deletions

View File

@ -15,7 +15,8 @@
## WARNING
py-libp2p is an experimental and work-in-progress repo under heavy development. We do not yet recommend using py-libp2p in production environments.
py-libp2p is an experimental and work-in-progress repo under development. We do not yet recommend using py-libp2p in production environments.
Right now, `tests_interop` are turned off for CI, and a number of `tests` are failing.
The Python implementation of the libp2p networking stack
@ -27,50 +28,25 @@ This project is graciously sponsored by the Ethereum Foundation through [Wave 5
## Maintainers
The py-libp2p team consists of:
Currently maintained by [@pacrob](https://github.com/pacrob), looking for assistance!
The py-libp2p team previously consisted of:
[@zixuanzh](https://github.com/zixuanzh) [@alexh](https://github.com/alexh) [@stuckinaboot](https://github.com/stuckinaboot) [@robzajac](https://github.com/robzajac) [@carver](https://github.com/carver)
## Development
py-libp2p requires Python 3.7 and the best way to guarantee a clean Python 3.7 environment is with [`virtualenv`](https://virtualenv.pypa.io/en/stable/)
py-libp2p requires Python 3.8+ and the best way to guarantee a clean Python environment is with [`virtualenv`](https://virtualenv.pypa.io/en/stable/)
```sh
git clone git@github.com:libp2p/py-libp2p.git
cd py-libp2p
virtualenv -p python3.7 venv
virtualenv -p python venv
. venv/bin/activate
pip install -e .[dev]
python -m pip install -e .[dev]
```
### Testing Setup
During development, you might like to have tests run on every file save.
Show flake8 errors on file change:
```sh
# Test flake8
when-changed -v -s -r -1 libp2p/ tests/ -c "clear; flake8 libp2p tests && echo 'flake8 success' || echo 'error'"
```
Run multi-process tests in one command, but without color:
```sh
# in the project root:
pytest --numprocesses=4 --looponfail --maxfail=1
# the same thing, succinctly:
pytest -n 4 -f --maxfail=1
```
Run in one thread, with color and desktop notifications:
```sh
cd venv
ptw --onfail "notify-send -t 5000 'Test failure ⚠⚠⚠⚠⚠' 'python 3 test on py-libp2p failed'" ../tests ../libp2p
```
Note that tests/libp2p/test_libp2p.py contains an end-to-end messaging test between two libp2p hosts, which is the bulk of our proof of concept.
Note that tests/test_libp2p/test_libp2p.py contains an end-to-end messaging test between two libp2p hosts, which is the bulk of our proof of concept.
### Release setup
@ -85,7 +61,7 @@ To release a new version:
> > > > > > > template
The protobuf description in this repository was generated by `protoc` at version `3.7.1`.
The protobuf description in this repository was generated by `protoc` at version `25.3`.
## Feature Breakdown