mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
add interop tests, but not turned on
This commit is contained in:
@ -95,6 +95,22 @@ docs: &docs
|
|||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install latexmk tex-gyre texlive-fonts-extra
|
sudo apt-get install latexmk tex-gyre texlive-fonts-extra
|
||||||
|
|
||||||
|
interop: &interop
|
||||||
|
docker:
|
||||||
|
- image: common
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
name: install interop test dependencies
|
||||||
|
command: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install latexmk tex-gyre texlive-fonts-extra
|
||||||
|
wget https://dl.google.com/go/$GOBINPKG
|
||||||
|
sudo tar -C /usr/local -xzf $GOBINPKG
|
||||||
|
export GOPATH=$HOME/go
|
||||||
|
export GOROOT=/usr/local/go
|
||||||
|
export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
|
||||||
|
./tests_interop/go_pkgs/install_interop_go_pkgs.sh
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docs:
|
docs:
|
||||||
<<: *docs
|
<<: *docs
|
||||||
@ -222,6 +238,37 @@ jobs:
|
|||||||
- <<: *run-tox-step
|
- <<: *run-tox-step
|
||||||
- <<: *save-cache-step
|
- <<: *save-cache-step
|
||||||
|
|
||||||
|
py38-interop:
|
||||||
|
<<: *interop
|
||||||
|
docker:
|
||||||
|
- image: cimg/python:3.8
|
||||||
|
environment:
|
||||||
|
TOXENV: py38-interop
|
||||||
|
py39-interop:
|
||||||
|
<<: *interop
|
||||||
|
docker:
|
||||||
|
- image: cimg/python:3.9
|
||||||
|
environment:
|
||||||
|
TOXENV: py39-interop
|
||||||
|
py310-interop:
|
||||||
|
<<: *interop
|
||||||
|
docker:
|
||||||
|
- image: cimg/python:3.10
|
||||||
|
environment:
|
||||||
|
TOXENV: py310-interop
|
||||||
|
py311-interop:
|
||||||
|
<<: *interop
|
||||||
|
docker:
|
||||||
|
- image: cimg/python:3.11
|
||||||
|
environment:
|
||||||
|
TOXENV: py311-interop
|
||||||
|
py312-interop:
|
||||||
|
<<: *interop
|
||||||
|
docker:
|
||||||
|
- image: cimg/python:3.12
|
||||||
|
environment:
|
||||||
|
TOXENV: py312-interop
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
test:
|
test:
|
||||||
@ -244,3 +291,8 @@ workflows:
|
|||||||
- py312-wheel
|
- py312-wheel
|
||||||
# - py311-windows-wheel
|
# - py311-windows-wheel
|
||||||
# - py312-windows-wheel
|
# - py312-windows-wheel
|
||||||
|
# - py38-interop
|
||||||
|
# - py39-interop
|
||||||
|
# - py310-interop
|
||||||
|
# - py311-interop
|
||||||
|
# - py312-interop
|
||||||
|
|||||||
44
README.md
44
README.md
@ -15,7 +15,8 @@
|
|||||||
|
|
||||||
## WARNING
|
## 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
|
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
|
## 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)
|
[@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
|
## 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
|
```sh
|
||||||
git clone git@github.com:libp2p/py-libp2p.git
|
git clone git@github.com:libp2p/py-libp2p.git
|
||||||
cd py-libp2p
|
cd py-libp2p
|
||||||
virtualenv -p python3.7 venv
|
virtualenv -p python venv
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
pip install -e .[dev]
|
python -m pip install -e .[dev]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Testing Setup
|
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.
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
### Release setup
|
### Release setup
|
||||||
|
|
||||||
@ -85,7 +61,7 @@ To release a new version:
|
|||||||
|
|
||||||
> > > > > > > template
|
> > > > > > > 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
|
## Feature Breakdown
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user