Skip to content
Snippets Groups Projects
Commit e1c486ba authored by tuhe's avatar tuhe
Browse files

Updates

parent 6a69c627
No related branches found
No related tags found
No related merge requests found
...@@ -4,4 +4,7 @@ ...@@ -4,4 +4,7 @@
<option name="languageLevel" value="ES6" /> <option name="languageLevel" value="ES6" />
</component> </component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6" project-jdk-type="Python SDK" /> <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6" project-jdk-type="Python SDK" />
<component name="PyCharmProfessionalAdvertiser">
<option name="shown" value="true" />
</component>
</project> </project>
\ No newline at end of file
...@@ -2,11 +2,16 @@ ...@@ -2,11 +2,16 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="5c346737-53d8-4e87-88c5-7be2c8e7baeb" name="Default" comment=""> <list default="true" id="5c346737-53d8-4e87-88c5-7be2c8e7baeb" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/requirements.txt" beforeDir="false" afterPath="$PROJECT_DIR$/requirements.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/setup.py" beforeDir="false" afterPath="$PROJECT_DIR$/setup.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/unitgrade.egg-info/PKG-INFO" beforeDir="false" afterPath="$PROJECT_DIR$/src/unitgrade.egg-info/PKG-INFO" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/unitgrade.egg-info/PKG-INFO" beforeDir="false" afterPath="$PROJECT_DIR$/src/unitgrade.egg-info/PKG-INFO" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/unitgrade/version.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/unitgrade/version.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/unitgrade.egg-info/SOURCES.txt" beforeDir="false" afterPath="$PROJECT_DIR$/src/unitgrade.egg-info/SOURCES.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/unitgrade.egg-info/dependency_links.txt" beforeDir="false" afterPath="$PROJECT_DIR$/src/unitgrade.egg-info/dependency_links.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/unitgrade.egg-info/requires.txt" beforeDir="false" afterPath="$PROJECT_DIR$/src/unitgrade.egg-info/requires.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/unitgrade.egg-info/top_level.txt" beforeDir="false" afterPath="$PROJECT_DIR$/src/unitgrade.egg-info/top_level.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/unitgrade/dashboard/app.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/unitgrade/dashboard/app.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/unitgrade/dashboard/app_helpers.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/unitgrade/dashboard/app_helpers.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/unitgrade/dashboard/watcher.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/unitgrade/dashboard/watcher.py" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
...@@ -363,12 +368,12 @@ ...@@ -363,12 +368,12 @@
</line-breakpoint> </line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line"> <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/src/unitgrade/framework.py</url> <url>file://$PROJECT_DIR$/src/unitgrade/framework.py</url>
<line>103</line> <line>118</line>
<option name="timeStamp" value="91" /> <option name="timeStamp" value="91" />
</line-breakpoint> </line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line"> <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/src/unitgrade/framework.py</url> <url>file://$PROJECT_DIR$/src/unitgrade/framework.py</url>
<line>100</line> <line>115</line>
<option name="timeStamp" value="92" /> <option name="timeStamp" value="92" />
</line-breakpoint> </line-breakpoint>
</breakpoints> </breakpoints>
......
...@@ -7,7 +7,6 @@ Author: Tue Herlau ...@@ -7,7 +7,6 @@ Author: Tue Herlau
Author-email: tuhe@dtu.dk Author-email: tuhe@dtu.dk
License: MIT License: MIT
Project-URL: Bug Tracker, https://lab.compute.dtu.dk/tuhe/unitgrade/issues Project-URL: Bug Tracker, https://lab.compute.dtu.dk/tuhe/unitgrade/issues
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent Classifier: Operating System :: OS Independent
...@@ -191,4 +190,3 @@ Please contact me and we can discuss your specific concerns. ...@@ -191,4 +190,3 @@ Please contact me and we can discuss your specific concerns.
year={2022}, year={2022},
} }
``` ```
colorama
coverage
importnb
numpy numpy
pyfiglet
requests
tabulate tabulate
pyfiglet
coverage
colorama
tqdm tqdm
importnb
requests
...@@ -117,6 +117,8 @@ def mkapp(base_dir="./"): ...@@ -117,6 +117,8 @@ def mkapp(base_dir="./"):
rs['local_base_dir_for_test_module'] = str(Path(*base)) rs['local_base_dir_for_test_module'] = str(Path(*base))
rs['test_module'] = ".".join(db.get('modules')) rs['test_module'] = ".".join(db.get('modules'))
del rs['root_dir'] # Don't overwrite this one.
return rs return rs
def select_report_file(json): def select_report_file(json):
...@@ -124,9 +126,13 @@ def mkapp(base_dir="./"): ...@@ -124,9 +126,13 @@ def mkapp(base_dir="./"):
for k, v in available_reports[json].items(): for k, v in available_reports[json].items():
current_report[k] = v current_report[k] = v
print(f"{current_report['root_dir']=}")
for k, v in get_report_database().items(): for k, v in get_report_database().items():
current_report[k] = v current_report[k] = v
print(f"{current_report['root_dir']=}")
def mkempty(pattern, type): def mkempty(pattern, type):
fls = glob.glob(current_report['root_dir'] + pattern) fls = glob.glob(current_report['root_dir'] + pattern)
fls.sort(key=os.path.getmtime) fls.sort(key=os.path.getmtime)
......
#!/usr/bin/env python3 #!/usr/bin/env python3
from queue import Queue # from queue import Queue
from threading import Lock # from threading import Lock
import argparse # import argparse
import datetime # import datetime
import subprocess # import subprocess
from flask import Flask, render_template # from flask import Flask, render_template
from flask_socketio import SocketIO # from flask_socketio import SocketIO
import pty # import pty
import os import os
import subprocess
import select
import termios
import struct
import fcntl
import shlex
import logging
import sys
import glob import glob
from pupdb.core import PupDB from pupdb.core import PupDB
from unitgrade_private.hidden_gather_upload import picklestring2dict # from unitgrade_private.hidden_gather_upload import picklestring2dict
from unitgrade_private.hidden_gather_upload import dict2picklestring, picklestring2dict # from unitgrade_private.hidden_gather_upload import dict2picklestring, picklestring2dict
from pathlib import Path from pathlib import Path
def get_available_reports(jobfolder): def get_available_reports(jobfolder):
...@@ -41,7 +33,13 @@ def get_available_reports(jobfolder): ...@@ -41,7 +33,13 @@ def get_available_reports(jobfolder):
base = lpath_full.parts[:-len(Path(report_py).parts)] base = lpath_full.parts[:-len(Path(report_py).parts)]
# rs['local_base_dir_for_test_module'] = str(Path(*base)) # rs['local_base_dir_for_test_module'] = str(Path(*base))
print("root_dir", base)
print(f"{lpath_full=}")
root_dir = str(Path(*base)) root_dir = str(Path(*base))
print(f"{root_dir=}")
print(f"{base=}")
print(f"{report_py=}")
token = report_py[:-3] + "_grade.py" token = report_py[:-3] + "_grade.py"
available_reports[f] = {'json': f, available_reports[f] = {'json': f,
'relative_path': report_py, 'relative_path': report_py,
......
...@@ -18,6 +18,7 @@ class Watcher: ...@@ -18,6 +18,7 @@ class Watcher:
def run(self): def run(self):
event_handler = Handler(self.watched_files_dictionary, self.watched_files_lock) event_handler = Handler(self.watched_files_dictionary, self.watched_files_lock)
# directory = os.path.commonpath([os.path.dirname(f) for f in self.watched_files_dictionary.keys()]) # directory = os.path.commonpath([os.path.dirname(f) for f in self.watched_files_dictionary.keys()])
print("self.base_directory", self.base_directory)
self.observer.schedule(event_handler, self.base_directory, recursive=True) self.observer.schedule(event_handler, self.base_directory, recursive=True)
self.observer.start() self.observer.start()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment