Skip to content

Commit

Permalink
Merge #39: Poetry
Browse files Browse the repository at this point in the history
16df4be remove requirements.txt and update the Readme with poetry (Vincenzo Palazzo)
5dfe015 gci: Teach docker to use poetry (Christian Decker)
14f17f5 gci: Remove python 3.6 support (Christian Decker)
196d8da gci: Use poetry to manage dependencies (Christian Decker)
e50b6a3 Migrate python dependencies to poetry / PEP517 (Christian Decker)

Pull request description:

  Migrates python dependency management to use poetry / PEP 517

ACKs for top commit:
  vincenzopalazzo:
    self ACK 16df4be

Tree-SHA512: bdf3a673a2dec881cb043b39c59a968eb10ed9e5754952c7d169bcd959854d5806137da954210873ca94712c74e0b7a6fb017de02867f1acd7b1c2c3c99265ae
  • Loading branch information
vincenzopalazzo committed Mar 15, 2022
2 parents d5b7efe + 16df4be commit ceeb866
Show file tree
Hide file tree
Showing 7 changed files with 1,270 additions and 60 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
Expand All @@ -19,12 +19,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest black
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -e .
pip install poetry
poetry config virtualenvs.create false
poetry install
- name: Code style check
run: |
pip install black
black . --check --diff
- name: flake8 check
run: |
Expand Down
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,9 @@ lightning network protocol, as well as test existing implementations.
To install the necessary dependences

```bash
pip3 install -r requirements.txt
```

To install lnprototest

```bash
pip3 install -e .
pip3 install poetry
poetry shell
poetry install
```

Well, now we can run the test
Expand All @@ -58,12 +54,12 @@ Here are some other useful pytest options:

### Running Against A Real Node.

The more useful way to run is to use an existing implementation. So
The more useful way to run is to use an existing implementation. So
far, c-lightning is supported. You will need:

1. `bitcoind` installed, and in your path.
2. [`lightningd`](https://github.com/ElementsProject/lightning/) compiled with
`--enable-developer`. By default the source directory should be
`--enable-developer`. By default the source directory should be
`../lightning` relative to this directory, otherwise use
`export LIGHTNING_SRC=dirname`.
3. Install any python requirements by
Expand Down
16 changes: 8 additions & 8 deletions docker/Dockerfile.clightning
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ RUN mkdir lnprototest
COPY . lnprototest

RUN cd lnprototest && \
#pip3 install --upgrade -vv setuptools && \
pip3 install -r requirements.txt && \
cd lnprototest/clightning && \
pip3 install -r requirements.txt && \
cd .. && cd .. && \
pip3 install -e . && \
pip3 install pytest
pip3 install -U pip && \
pip3 install -U poetry

RUN cd lnprototest && \
poetry config virtualenvs.create false && \
poetry install
RUN cd lnprototest && ls -lha

CMD ["./lnprototest/docker/entrypoint.sh"]
Loading

0 comments on commit ceeb866

Please sign in to comment.