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

Create .deepsource.toml, .whitesource, and Update WebBasedData/test_urls.py #2653

Merged
merged 12 commits into from
Aug 28, 2024
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
65 changes: 65 additions & 0 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
version = 1

[[analyzers]]
name = "python"
enabled = true

[analyzers.meta]
runtime_version = "3.x.x"

[analyzers.pylint]
enabled = true
config = """
[MESSAGES CONTROL]
disable = C0111 # Disables missing docstring warnings
"""

[[analyzers]]
name = "javascript"
enabled = true

[analyzers.meta]
plugins = [
"react",
"vue",
"angular"
]
environment = [
"nodejs",
"mocha",
"mongo",
"browser",
"jasmine",
"cypress",
"vitest",
"jquery",
"jest"
]

[[transformers]]
name = "autopep8"
enabled = false # Disables autopep8 transformer

[[transformers]]
name = "isort"
enabled = false # Disables isort transformer

[[transformers]]
name = "black"
enabled = false # Disables black transformer

[[transformers]]
name = "yapf"
enabled = false # Disables yapf transformer

[[transformers]]
name = "ruff"
enabled = false # Disables ruff transformer

[[transformers]]
name = "standardjs"
enabled = false # Disables standardjs transformer

[[transformers]]
name = "prettier"
enabled = false # Disables prettier transformer
14 changes: 14 additions & 0 deletions .whitesource
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"scanSettings": {
"baseBranches": []
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure",
"displayMode": "diff",
"useMendCheckNames": true
},
"issueSettings": {
"minSeverityLevel": "LOW",
"issueType": "DEPENDENCY"
}
}
6 changes: 3 additions & 3 deletions WebBasedData/screenshot-database-v2.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"package_count": {
"total": 11707,
"done": 5107,
"packages_with_icon": 5107,
"done": 5108,
"packages_with_icon": 5108,
"packages_with_screenshot": 584,
"total_screenshots": 1819
},
Expand Down Expand Up @@ -29221,7 +29221,7 @@
"images": []
},
"optionsplus": {
"icon": "",
"icon": "http://www.logitech.com/assets/66208/optionsplusicon.png",
"images": []
},
"optipng": {
Expand Down
4 changes: 2 additions & 2 deletions WebBasedData/test_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
print("Package failed:", package, data["icons_and_screenshots"][package]["icon"])
with open("invalid_urls.txt", "a") as f:
f.write(data["icons_and_screenshots"][package]["icon"] + "\n")
elif response.status_code != 200 and response.status_code != 403:
elif response.status_code not in (200, 403):
print(response.status_code, "failed for:", data["icons_and_screenshots"][package]["icon"])

except requests.exceptions.ConnectionError:
time.sleep(0.1)
try:
if data["icons_and_screenshots"][package]["icon"] != "":
response = requests.get(data["icons_and_screenshots"][package]["icon"])
if response.status_code == 403 or response.status_code == 404:
if response.status_code in (403, 404):
print("Package failed:", package, data["icons_and_screenshots"][package]["icon"])
elif response.status_code != 200:
response = requests.get(data["icons_and_screenshots"][package]["icon"])
Expand Down