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

Fix networkx requirement #52

Merged
merged 1 commit into from
Dec 28, 2021
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
4 changes: 2 additions & 2 deletions anomalib/data/mvtec.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,11 @@ def _download(self) -> None:

logger.info("Downloading MVTec Dataset")
with DownloadProgressBar(unit="B", unit_scale=True, miniters=1, desc=dataset_name) as progress_bar:
urlretrieve(
urlretrieve( # nosec
url=f"ftp://guest:GU.205dldo@ftp.softronics.ch/mvtec_anomaly_detection/{dataset_name}",
filename=self.filename,
reporthook=progress_bar.update_to,
)
) # nosec

self._extract()
self._clean()
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defusedxml==0.7.1
kornia==0.5.6
lxml==4.6.5
matplotlib==3.4.3
networkx==2.5.1
networkx~=2.5
nncf==2.0.0
numpy~=1.19.5
omegaconf==2.1.1
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/detection.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Helpers for detection tests."""
import os
import xml.etree.cElementTree as ET
import xml.etree.cElementTree as ET # nosec
from glob import glob
from typing import List, Tuple

Expand Down
2 changes: 1 addition & 1 deletion tests/models/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def category() -> str:
"zipper",
]

category = random.choice(categories)
category = random.choice(categories) # nosec
return category


Expand Down
2 changes: 1 addition & 1 deletion tests/utils/test_download_progress_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_output_on_download(capfd):
with tempfile.TemporaryDirectory() as dir_loc:
destination = os.path.join(dir_loc, "jelly.jpg")
with DownloadProgressBar(unit="B", unit_scale=True, miniters=1, desc=url.split("/")[-1]) as p_bar:
urlretrieve(url, filename=destination, reporthook=p_bar.update_to)
urlretrieve(url, filename=destination, reporthook=p_bar.update_to) # nosec # noqa

assert os.path.exists(destination), "Failed retrieving the file"
_, err = capfd.readouterr()
Expand Down