Skip to content

Commit

Permalink
🔧 Use poetry to update requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
jemrobinson committed Oct 12, 2022
1 parent 484a975 commit 43c5fd4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup SSH keys
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/update_requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,21 @@ jobs:
update_requirements:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install poetry
run: pip install poetry
- name: Update packages
run: pipx install poetry
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install required packages
run: |
poetry update
poetry install --no-root
- name: Update requirements
run: echo "# AUTOMATICALLY GENERATED. DO NOT EDIT.\n$(pip freeze)" > requirements.txt
- name: Update requirements file
run: |
echo "# AUTOMATICALLY GENERATED. DO NOT EDIT." > requirements.txt
poetry export --without-hashes --format=requirements.txt | cut -d ' ' -f 1 >> requirements.txt
- name: Check for changes
run: git diff --exit-code
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
**/__pycache__
module*/*.pyc

# Poetry
poetry.lock

# Autogenerated
index.md
_config.yml
Expand Down

0 comments on commit 43c5fd4

Please sign in to comment.