Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install dependencies for tests based on package install #951

Merged
merged 2 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/test-linux-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
limited-dependencies: ['','TRUE']
os: [ubuntu-latest] # add in windows-latest to add windows testing
include:
- os: ubuntu-latest
Expand All @@ -39,7 +40,11 @@ jobs:
${{ runner.os }}-pip-

- name: Install dependencies
run: python -m pip install -r requirements.txt
env:
PARSONS_LIMITED_DEPENDENCIES: ${{ matrix.limited-dependencies }}
run: |
python -m pip install .[all]
python -m pip install -r requirements-dev.txt

- name: Run tests
run: pytest -rf test/
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/tests-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ env:

jobs:
build:
strategy:
matrix:
limited-dependencies: ['','TRUE']
runs-on: macos-latest

steps:
Expand All @@ -31,7 +34,11 @@ jobs:
mac-pip-

- name: Install dependencies
run: python -m pip install -r requirements.txt
env:
PARSONS_LIMITED_DEPENDENCIES: ${{ matrix.limited-dependencies }}
run: |
python -m pip install .[all]
python -m pip install -r requirements-dev.txt

- name: Run tests
run: TESTING=1 pytest -rf test/
Expand Down
8 changes: 8 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Testing Requirements
requests-mock==1.5.2
flake8==4.0.1
black==22.12.0
testfixtures==6.18.5
pytest==7.1.1
pytest-datadir==1.3.0
pytest-mock>=3.0.0
9 changes: 0 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,6 @@ SQLAlchemy==1.3.23
requests_oauthlib==1.3.0
bs4==0.0.1

# Testing Requirements
requests-mock==1.5.2
flake8==4.0.1
black==22.12.0
testfixtures==6.18.5
pytest==7.1.1
pytest-datadir==1.3.0
pytest-mock>=3.0.0

# Stuff for TMC scripts
# TODO Remove when we have a TMC-specific Docker image
selenium==3.141.0
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ def main():
"simplejson",
]
extras_require = {
"airtable": ["airtable-python-wrapper"],
"airtable": ["airtable-python-wrapper==0.13.0"],
"alchemer": ["surveygizmo"],
"azure": ["azure-storage-blob"],
"box": ["boxsdk"],
"braintree": ["braintree"],
"catalist": ["paramiko"],
"civis": ["civis"],
"facebook": ["joblib", "facebook-business"],
"geocode": ["censusgeocode"],
"geocode": ["censusgeocode", "urllib3==1.26.18"],
"github": ["PyGitHub"],
"google": [
"apiclient",
Expand All @@ -37,6 +37,7 @@ def main():
"mysql": ["mysql-connector-python", "SQLAlchemy"],
"newmode": ["newmode"],
"ngpvan": ["suds-py3"],
"mobilecommons": ["bs4"],
"postgres": ["psycopg2-binary", "SQLAlchemy"],
"redshift": ["boto3", "psycopg2-binary", "SQLAlchemy"],
"s3": ["boto3"],
Expand Down