vsoch / watchme

Reproducible watchers for research
https://vsoch.github.io/watchme/
Mozilla Public License 2.0
851 stars 32 forks source link

Missing required dependency? #23

Closed andreysmelter closed 5 years ago

andreysmelter commented 5 years ago

Dear @vsoch

Below is the example from Getting Started Documentation - initializing default urls type watcher and adding monitoring GitHub url task.

Expected Behavior

Running this in a clean virtual environment with only watchme and its dependencies installed

watchme add watcher task-singularity-release url@https://github.com/sylabs/singularity/releases $ watchme run watcher Process the task-singularity-release

Actual Behavior

Import error due to missing requests library dependency.

...
  File "/python3.5/site-packages/watchme/watchers/urls/__init__.py", line 50, in export_func
    from .tasks import get_task as func
  File "/python3.5/site-packages/watchme/watchers/urls/tasks.py", line 13, in <module>
    from .helpers import (
  File "/python3.5/site-packages/watchme/watchers/urls/helpers.py", line 13, in <module>
    import requests
ImportError: No module named 'requests'

Steps to Reproduce

$ watchme run watcher

Context

Possible Fix

Add requests as a required dependency under version.py file since the type = urls watcher is a default watcher, e.g.:

INSTALL_REQUIRES = (
    ('python-crontab', {"min_version": "2.3.6"}),
    ('configparser', {"min_version": "3.5.3"}),
    ('requests', {"min_version": "2.21.0"})
)
vsoch commented 5 years ago

Will fix this right away!

vsoch commented 5 years ago

Here you go @andreysmelter https://github.com/vsoch/watchme/pull/24 I can wait for more review to update the PR if there are any other issues, we can release 0.0.15 with all the changes requested. (ha, requested :) )

andreysmelter commented 5 years ago

Thanks!

I think requirements.txt file also needs to be updated as it only has python-crontab in it.

vsoch commented 5 years ago

All set, completely forgot about that guy.