Skip to content

Commit

Permalink
Refactor requirements installation
Browse files Browse the repository at this point in the history
  • Loading branch information
dgilman committed Feb 21, 2023
1 parent fd5c8c8 commit 2360405
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 12 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.10' ]
python-version: [ '3.11' ]
name: Lint
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: install-format
run: make black-install
python-version: '3.11'
- name: install lint deps
run: make format-install
- name: install docs deps
run: make format-docs
- name: format-check
run: make format-check
- name: docs
Expand All @@ -26,7 +28,7 @@ jobs:
needs: lint
strategy:
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10']
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11']
name: Python ${{ matrix.python-version }} test run
steps:
- uses: actions/checkout@v3
Expand All @@ -35,8 +37,8 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: install
run: make travis-install
- name: install deps
run: make test-install
- name: install age
run: wget https://github.com/FiloSottile/age/releases/download/v1.0.0/age-v1.0.0-linux-amd64.tar.gz && tar xf age-v1.0.0-linux-amd64.tar.gz
- name: decrypt keys
Expand Down
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
travis-install:
pip install -r requirements_dev.txt
test-install:
pip install -r requirements_test.txt
cp tests/.env.example tests/.env

black-install:
pip install -r requirements_dev.txt
format-install:
pip install -r requirements_format.txt

docs-install:
pip install -r docs/requirements.txt

version-tag:
git describe --tags > version_tag
Expand Down
2 changes: 2 additions & 0 deletions pip-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ set -euo pipefail

pip-compile --resolver=backtracking -U requirements.in --output-file requirements.txt
pip-compile --resolver=backtracking -U requirements.in requirements_dev.in docs/requirements.in --output-file requirements_dev.txt
pip-compile --resolver=backtracking -U requirements.in requirements_test.in --output-file requirements_test.txt
pip-compile --resolver=backtracking -U requirements_format.in --output-file requirements_format.txt
pip-compile --resolver=backtracking -U docs/requirements.in --output-file docs/requirements.txt
2 changes: 2 additions & 0 deletions requirements_format.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
black
isort
22 changes: 22 additions & 0 deletions requirements_format.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --output-file=requirements_format.txt --resolver=backtracking requirements_format.in
#
black==23.1.0
# via -r requirements_format.in
click==8.1.3
# via black
isort==5.12.0
# via -r requirements_format.in
mypy-extensions==1.0.0
# via black
packaging==23.0
# via black
pathspec==0.11.0
# via black
platformdirs==3.0.0
# via black
tomli==2.0.1
# via black
1 change: 1 addition & 0 deletions requirements_test.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oauth2client
55 changes: 55 additions & 0 deletions requirements_test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --output-file=requirements_test.txt --resolver=backtracking requirements.in requirements_test.in
#
cachetools==5.3.0
# via google-auth
certifi==2022.12.7
# via requests
charset-normalizer==3.0.1
# via requests
google-auth==2.16.1
# via
# google-auth-oauthlib
# gspread
google-auth-oauthlib==1.0.0
# via gspread
gspread==5.7.2
# via -r requirements.in
httplib2==0.21.0
# via oauth2client
idna==3.4
# via requests
oauth2client==4.1.3
# via -r requirements_test.in
oauthlib==3.2.2
# via requests-oauthlib
pyasn1==0.4.8
# via
# oauth2client
# pyasn1-modules
# rsa
pyasn1-modules==0.2.8
# via
# google-auth
# oauth2client
pyparsing==3.0.9
# via httplib2
requests==2.28.2
# via
# -r requirements.in
# requests-oauthlib
requests-oauthlib==1.3.1
# via google-auth-oauthlib
rsa==4.9
# via
# google-auth
# oauth2client
six==1.16.0
# via
# google-auth
# oauth2client
urllib3==1.26.14
# via requests

0 comments on commit 2360405

Please sign in to comment.