Skip to content

Commit

Permalink
fix conflict and keep non-alphabetical order following @anargyri advice
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgfierro committed Jun 2, 2021
2 parents 4f32505 + e18c138 commit 0aad35d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ ml-20m/
*.model
*.mml
nohup.out
*.svg
*.html
*.js
*.css
*.tff
*.woff
*.woff2
*.eot

##### kdd 2020 tutorial data folder
examples/07_tutorials/KDD2020-tutorial/data_folder/
Expand All @@ -164,4 +172,4 @@ examples/07_tutorials/KDD2020-tutorial/data_folder/
*.sh

tests/**/resources/
reports/
reports/
13 changes: 10 additions & 3 deletions reco_utils/dataset/download_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,17 @@
from contextlib import contextmanager
from tempfile import TemporaryDirectory
from tqdm import tqdm
import backoff


log = logging.getLogger(__name__)


@backoff.on_exception(
backoff.expo,
(requests.exceptions.HTTPError, requests.exceptions.ChunkedEncodingError),
max_tries=5,
)
def maybe_download(url, filename=None, work_directory=".", expected_bytes=None):
"""Download a file if it is not already downloaded.
Expand All @@ -21,7 +28,7 @@ def maybe_download(url, filename=None, work_directory=".", expected_bytes=None):
work_directory (str): Working directory.
url (str): URL of the file to download.
expected_bytes (int): Expected file size in bytes.
Returns:
str: File path of the file downloaded.
"""
Expand Down Expand Up @@ -57,8 +64,8 @@ def maybe_download(url, filename=None, work_directory=".", expected_bytes=None):

@contextmanager
def download_path(path=None):
"""Return a path to download data. If `path=None`, then it yields a temporal path that is eventually deleted,
otherwise the real path of the input.
"""Return a path to download data. If `path=None`, then it yields a temporal path that is eventually deleted,
otherwise the real path of the input.
Args:
path (str): Path to download data.
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"scikit-surprise>=0.19.1,<=1.1.1",
"cmake>=3.18.4.post1",
"xlearn==0.40a1",

This comment has been minimized.

Copy link
@anargyri

anargyri Jun 2, 2021

Collaborator

xlearn and cmake need to be in extras_require. As in 89637b1#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7

"backoff>=1.8.0",
]

# shared dependencies
Expand Down

0 comments on commit 0aad35d

Please sign in to comment.