Skip to content

Commit

Permalink
fix: [analysers] fix requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
cvandeplas committed May 31, 2024
1 parent eae6e70 commit 8d2ebac
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
"args": "${command:pickArgs}",
"cwd": "${workspaceFolder}/"
},
{
"name": "Python Debugger: analyse.py list analysers",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/analyse.py",
"args": "list analysers",
"cwd": "${workspaceFolder}/"
},
{
"name": "Python Debugger: logarchive.py",
"type": "debugpy",
Expand Down Expand Up @@ -44,6 +52,14 @@
"program": "${workspaceFolder}/parsing.py",
"args": "parse ps 1",
"cwd": "${workspaceFolder}/"
},
{
"name": "Python Debugger: parsing.py parse crashlogs",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/parsing.py",
"args": "parse crashlogs 1",
"cwd": "${workspaceFolder}/"
}
]
}
2 changes: 2 additions & 0 deletions analyse.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def list_analysers(folder):
modules = glob.glob(os.path.join(os.path.dirname('.'), "*.py"))
lines = []
for analyser in modules:
if analyser.endswith('__init__.py'):
continue
try:
spec = importlib.util.spec_from_file_location(analyser[:-3], analyser)
module = importlib.util.module_from_spec(spec)
Expand Down
2 changes: 1 addition & 1 deletion analysers/sysdiagnose-wifi-gelocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import gpxpy.gpx

sys.path.append('..') # noqa: E402
from sysdiagnose import config # noqa: E402
import config # noqa: E402


version_string = "sysdiagnose-demo-analyser.py v2023-04-28 Version 0.1"
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ graphviz==0.20.1
tabulate==0.9.0
biplist==1.0.3
python-dateutil==2.9.0.post0
ijson==3.2.3
gpxpy=1.6.2

0 comments on commit 8d2ebac

Please sign in to comment.