diff --git a/.circleci/config.yml b/.circleci/config.yml index af41e526..b5a0d13c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -95,6 +95,22 @@ docs: &docs sudo apt-get update 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: docs: <<: *docs @@ -222,6 +238,37 @@ jobs: - <<: *run-tox-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: version: 2 test: @@ -244,3 +291,8 @@ workflows: - py312-wheel # - py311-windows-wheel # - py312-windows-wheel + # - py38-interop + # - py39-interop + # - py310-interop + # - py311-interop + # - py312-interop diff --git a/README.md b/README.md index 31c9669d..d343c7d6 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/tox.ini b/tox.ini index 2847f71e..401cbff4 100644 --- a/tox.ini +++ b/tox.ini @@ -5,6 +5,7 @@ envlist= py{38,39,310,311,312}-wheel windows-wheel docs + py{38,39,310,311,312}-interop [flake8] exclude=venv*,.tox,docs,build,*_pb2*.py