Skip to content

Commit

Permalink
Move optional dependencies into extra[monitoring] for backwards compa…
Browse files Browse the repository at this point in the history
…tibility
  • Loading branch information
VMRuiz committed Aug 31, 2023
1 parent 0d76ff6 commit ba587b5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 15 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install tox codecov
- name: Run tests
- name: Run all test
run: tox -e ${{ matrix.tox || 'py' }}
- name: Run base tests
run: tox -e base
- name: Run docs and formatting tests
if: ${{ matrix.python-version == 3.11 }}
run: |
Expand Down
28 changes: 14 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from setuptools import find_packages, setup


setup(
name="spidermon",
version="1.19.0",
Expand All @@ -15,23 +14,24 @@
zip_safe=False,
include_package_data=True,
install_requires=[
"boto",
"boto3",
"itemadapter",
"Jinja2",
"jsonschema[format]>=3.2.0",
"premailer",
"python-slugify",
"Requests",
"scrapinghub",
"scrapinghub-entrypoint-scrapy",
"scrapy",
"sentry_sdk",
"slack_sdk",
"Twisted",
],
extras_require={
"monitoring": [],
# Specific monitors and tools to support notifications and reports
"monitoring": [
"Jinja2",
"boto",
"boto3",
"itemadapter",
"premailer",
"requests",
"scrapinghub",
"scrapinghub-entrypoint-scrapy",
"scrapy",
"sentry_sdk",
"slack_sdk",
]
},
classifiers=[
"Development Status :: 5 - Production/Stable",
Expand Down
9 changes: 9 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,17 @@ deps =
pytest
pytest-cov
pytest-mock
extras =
monitoring
commands = pytest -s --cov=spidermon --cov-report= {posargs:tests}

[testenv:base]
deps =
{[testenv]deps}
scrapy
Jinja2
commands = pytest -s --ignore=./tests/contrib --ignore=./tests/utils/test_zyte.py --cov=spidermon --cov-report= {posargs:tests}

[testenv:min]
basepython = python3.8
deps =
Expand Down

0 comments on commit ba587b5

Please sign in to comment.