Skip to content

Commit

Permalink
migrate to poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
freddyheppell committed Jul 2, 2024
1 parent 4dac00a commit 397739e
Show file tree
Hide file tree
Showing 9 changed files with 1,109 additions and 587 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Lint

on:
push:
branches: ["main"]
branches: ["main", "dev"]
pull_request:
branches: ["main"]
branches: ["main", "dev"]

permissions:
contents: read
Expand All @@ -19,14 +19,14 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: "3.8"
cache: "pipenv"
- name: Install Pipenv
run: python -m pip install --upgrade pipenv wheel
cache: "poetry"
- name: Install Poetry
run: pipx install poetry==1.8.3
- name: Install Python dependencies
run: pipenv install --deploy --dev
run: poetry install --no-interaction --no-root
- name: Install Project
run: poetry install --no-interaction
- name: Lint with Black
run: pipenv run black --check .
run: poetry run black --check .
- name: Lint with Flake8
run: pipenv run flake8 .
- name: Tests
run: pipenv run pytest
run: poetry run flake8 .
16 changes: 9 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Test

on:
push:
branches: ["main"]
branches: ["main", "dev"]
pull_request:
branches: ["main"]
branches: ["main", "dev"]

permissions:
contents: read
Expand All @@ -19,13 +19,15 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: "3.8"
cache: "pipenv"
cache: "poetry"
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Pipenv
run: python -m pip install --upgrade pipenv wheel
- name: Install Poetry
run: pipx install poetry==1.8.3
- name: Install Python dependencies
run: pipenv install --deploy --dev
run: poetry install --no-interaction --no-root
- name: Install Project
run: poetry install --no-interaction
- name: Run tests
run: pipenv run pytest
run: poetry run pytest
29 changes: 0 additions & 29 deletions Pipfile

This file was deleted.

514 changes: 0 additions & 514 deletions Pipfile.lock

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ If you use this tool in published work, please cite [our EMNLP paper](https://ac
## Installing

1. Download and extract the project
2. Create a virtual environment (with `venv`, `Pipenv` or a similar tool)
3. Run `python setup.py` to install the package and dependencies
2. Create a Python 3.8 virtual environment (with `venv`, `Pipenv` or a similar tool)
3. Run `pip install .` to install the package and dependencies
4. Check it has installed with `wpextract --help`

### Installing Development Environment
Expand Down
Loading

0 comments on commit 397739e

Please sign in to comment.