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 @@
<option name="languageLevel" value="ES6" />
</component>
<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>
\ No newline at end of file
......@@ -2,11 +2,16 @@
<project version="4">
<component name="ChangeListManager">
<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$/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/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>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -363,12 +368,12 @@
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/src/unitgrade/framework.py</url>
<line>103</line>
<line>118</line>
<option name="timeStamp" value="91" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/src/unitgrade/framework.py</url>
<line>100</line>
<line>115</line>
<option name="timeStamp" value="92" />
</line-breakpoint>
</breakpoints>
......
......@@ -7,7 +7,6 @@ Author: Tue Herlau
Author-email: tuhe@dtu.dk
License: MIT
Project-URL: Bug Tracker, https://lab.compute.dtu.dk/tuhe/unitgrade/issues
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
......@@ -191,4 +190,3 @@ Please contact me and we can discuss your specific concerns.
year={2022},
}
```
colorama
coverage
importnb
numpy
pyfiglet
requests
tabulate
pyfiglet
coverage
colorama
tqdm
importnb
requests
......@@ -117,6 +117,8 @@ def mkapp(base_dir="./"):
rs['local_base_dir_for_test_module'] = str(Path(*base))
rs['test_module'] = ".".join(db.get('modules'))
del rs['root_dir'] # Don't overwrite this one.
return rs
def select_report_file(json):
......@@ -124,9 +126,13 @@ def mkapp(base_dir="./"):
for k, v in available_reports[json].items():
current_report[k] = v
print(f"{current_report['root_dir']=}")
for k, v in get_report_database().items():
current_report[k] = v
print(f"{current_report['root_dir']=}")
def mkempty(pattern, type):
fls = glob.glob(current_report['root_dir'] + pattern)
fls.sort(key=os.path.getmtime)
......
#!/usr/bin/env python3
from queue import Queue
from threading import Lock
import argparse
import datetime
import subprocess
from flask import Flask, render_template
from flask_socketio import SocketIO
import pty
# from queue import Queue
# from threading import Lock
# import argparse
# import datetime
# import subprocess
# from flask import Flask, render_template
# from flask_socketio import SocketIO
# import pty
import os
import subprocess
import select
import termios
import struct
import fcntl
import shlex
import logging
import sys
import glob
from pupdb.core import PupDB
from unitgrade_private.hidden_gather_upload import picklestring2dict
from unitgrade_private.hidden_gather_upload import dict2picklestring, picklestring2dict
# from unitgrade_private.hidden_gather_upload import picklestring2dict
# from unitgrade_private.hidden_gather_upload import dict2picklestring, picklestring2dict
from pathlib import Path
def get_available_reports(jobfolder):
......@@ -41,7 +33,13 @@ def get_available_reports(jobfolder):
base = lpath_full.parts[:-len(Path(report_py).parts)]
# rs['local_base_dir_for_test_module'] = str(Path(*base))
print("root_dir", base)
print(f"{lpath_full=}")
root_dir = str(Path(*base))
print(f"{root_dir=}")
print(f"{base=}")
print(f"{report_py=}")
token = report_py[:-3] + "_grade.py"
available_reports[f] = {'json': f,
'relative_path': report_py,
......
......@@ -18,6 +18,7 @@ class Watcher:
def run(self):
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()])
print("self.base_directory", self.base_directory)
self.observer.schedule(event_handler, self.base_directory, recursive=True)
self.observer.start()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment