Skip to content
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
8 changes: 1 addition & 7 deletions ci/setup-environment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ if ($env:GITHUB_JOB -eq "PreBuild") {
exit 0
}

$dependencies = "-r", "$RepoName/requirements.txt", "wheel", `
"tox", "pylint", "unittest-xml-reporting", "coverage", "certifi", `
"requests", "cachetools", "chevron", "jsmin", `
"fiftyone_pipeline_cloudrequestengine", `
"fiftyone_pipeline_core", `
"fiftyone_pipeline_engines", `
"fiftyone_pipeline_engines_fiftyone"
$dependencies = "-r", "$RepoName/requirements.txt"

./python/setup-environment.ps1 -LanguageVersion $LanguageVersion -Dependencies $dependencies

Expand Down
4 changes: 0 additions & 4 deletions fiftyone_devicedetection/.pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ load-plugins=
# Pickle collected data for later comparisons.
persistent=yes

# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes

# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
Expand Down
4 changes: 0 additions & 4 deletions fiftyone_devicedetection_cloud/.pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ load-plugins=
# Pickle collected data for later comparisons.
persistent=yes

# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes

# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
Expand Down
34 changes: 11 additions & 23 deletions fiftyone_devicedetection_cloud/tests/test_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

import unittest
import os
import re
import time

from fiftyone_devicedetection_cloud.devicedetection_cloud_pipelinebuilder import DeviceDetectionCloudPipelineBuilder
Expand Down Expand Up @@ -116,18 +115,13 @@ def test_missing_property_service_element_not_found(self):

fd.process()

result = ""

try:
with self.assertRaises(Exception) as raised:
fd.get("notpresent")
except Exception as e:
result = str(e)

# The explainer URL may carry UTM query parameters; ignore them.
result = re.sub(r'\?utm_[^\s]*', '', result)

self.assertEqual(
result, "Your resource key does not include access to any properties under notpresent. For more details on resource keys, see our explainer: https://51degrees.com/documentation/_info__resource_keys.html Available element data keys are: ['device']")
result = str(raised.exception)
self.assertIn("notpresent", result)
self.assertIn("['device']", result)
self.assertIn("https://51degrees.com/documentation/_info__resource_keys.html", result)

def test_engine_init_performance(self):
"""!
Expand Down Expand Up @@ -171,20 +165,14 @@ def test_missing_property_service_not_found_anywhere(self):

fd.process()

result = ""

try:
with self.assertRaises(Exception) as raised:
fd.device.get("notpresent")
except Exception as e:
result = str(e)

self.maxDiff = None

# The explainer URL may carry UTM query parameters; ignore them.
result = re.sub(r'\?utm_[^\s]*', '', result)

self.assertEqual(
result, "Property notpresent not found in data for element device. This is because your resource key does not include access to this property. Properties that are included for this key under device are " + ', '.join(list(pipeline.get_element("device").get_properties().keys())) + ". For more details on resource keys, see our explainer: https://51degrees.com/documentation/_info__resource_keys.html")
result = str(raised.exception)
self.assertIn("notpresent", result)
self.assertIn("device", result)
self.assertIn(', '.join(pipeline.get_element("device").get_properties().keys()), result)
self.assertIn("https://51degrees.com/documentation/_info__resource_keys.html", result)

def test_cloud_request_origin(self):
"""!
Expand Down
4 changes: 0 additions & 4 deletions fiftyone_devicedetection_examples/.pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ load-plugins=
# Pickle collected data for later comparisons.
persistent=yes

# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes

# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
Expand Down
4 changes: 0 additions & 4 deletions fiftyone_devicedetection_onpremise/.pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ load-plugins=
# Pickle collected data for later comparisons.
persistent=yes

# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes

# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
Expand Down
4 changes: 0 additions & 4 deletions fiftyone_devicedetection_shared/.pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ load-plugins=
# Pickle collected data for later comparisons.
persistent=yes

# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes

# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
Expand Down
16 changes: 15 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
cython
flask
flask
wheel
tox
pylint
unittest-xml-reporting
coverage
certifi
requests
cachetools
chevron
jsmin
fiftyone_pipeline_cloudrequestengine
fiftyone_pipeline_core
fiftyone_pipeline_engines
fiftyone_pipeline_engines_fiftyone
Loading