summaryrefslogtreecommitdiffstats
path: root/docs/source/_static
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2022-05-01 16:03:24 +0100
committerjwansek <eddie.atten.ea29@gmail.com>2022-05-01 16:03:24 +0100
commitabc7f067ff20bc2bd07d9236c30055549481547c (patch)
treed486cb4efda107633bcf243e5f60fdebd7094e5f /docs/source/_static
parentee1b57ec6197c554f3c011f9a648e2222d845994 (diff)
downloadSmarker-abc7f067ff20bc2bd07d9236c30055549481547c.tar.gz
Smarker-abc7f067ff20bc2bd07d9236c30055549481547c.zip
Finished plagarism detector, added docs
Diffstat (limited to 'docs/source/_static')
-rw-r--r--docs/source/_static/QuickStart/simple_assessment.yml12
-rw-r--r--docs/source/_static/QuickStart/simple_submission_1/euclid.py22
-rw-r--r--docs/source/_static/QuickStart/simple_submission_2/euclid.py10
-rw-r--r--docs/source/_static/QuickStart/simple_submission_3/euclid.py11
-rw-r--r--docs/source/_static/QuickStart/simple_submission_4/euclid.py16
-rw-r--r--docs/source/_static/readme_matrix.pngbin0 -> 17528 bytes
-rw-r--r--docs/source/_static/report.txt9
-rw-r--r--docs/source/_static/simple.json60
-rw-r--r--docs/source/_static/simple.txt89
9 files changed, 229 insertions, 0 deletions
diff --git a/docs/source/_static/QuickStart/simple_assessment.yml b/docs/source/_static/QuickStart/simple_assessment.yml
new file mode 100644
index 0000000..414f00b
--- /dev/null
+++ b/docs/source/_static/QuickStart/simple_assessment.yml
@@ -0,0 +1,12 @@
+name: simple_assessment
+files:
+ - euclid.py:
+ functions:
+ - gcd(2)
+ tests:
+ - |
+ assert euclid.gcd(8,12) == 4
+ run:
+ - python euclid.py:
+ regexes:
+ - ^4
diff --git a/docs/source/_static/QuickStart/simple_submission_1/euclid.py b/docs/source/_static/QuickStart/simple_submission_1/euclid.py
new file mode 100644
index 0000000..f72707a
--- /dev/null
+++ b/docs/source/_static/QuickStart/simple_submission_1/euclid.py
@@ -0,0 +1,22 @@
+# the newest!
+# assessment 1
+
+def gcd(m,n) -> int:
+ """Calculates the greatest common denominator between two numbers.
+
+ Args:
+ x (int): Number One
+ y (int): Number Two
+
+ Returns:
+ int: The GCD of the two numbers
+ """
+ if m< n:
+ (m,n) = (n,m)
+ if(m%n) == 0:
+ return n
+ else:
+ return (gcd(n, m % n)) # recursion taking place
+
+# gcd
+print(gcd(8,12))
diff --git a/docs/source/_static/QuickStart/simple_submission_2/euclid.py b/docs/source/_static/QuickStart/simple_submission_2/euclid.py
new file mode 100644
index 0000000..0819bc5
--- /dev/null
+++ b/docs/source/_static/QuickStart/simple_submission_2/euclid.py
@@ -0,0 +1,10 @@
+def gcd(m,n):
+ if m< n:
+ (m,n) = (n,m)
+ if(m%n) == 0:
+ return n
+ else:
+ return (gcd(n, m % n)) # recursion taking place
+
+# calling function with parameters and printing it out
+print(gcd(8,12))
diff --git a/docs/source/_static/QuickStart/simple_submission_3/euclid.py b/docs/source/_static/QuickStart/simple_submission_3/euclid.py
new file mode 100644
index 0000000..73e7d9c
--- /dev/null
+++ b/docs/source/_static/QuickStart/simple_submission_3/euclid.py
@@ -0,0 +1,11 @@
+def gcd(p,q):
+ """Docstring gcd"""
+ if p < q:
+ (p,q) = (q,p)
+ if(p%q) == 0:
+ return q
+ else:
+ return (gcd(q, p % q)) # recursion taking place
+
+# calling function with parameters and printing it out
+print(gcd(8,12))
diff --git a/docs/source/_static/QuickStart/simple_submission_4/euclid.py b/docs/source/_static/QuickStart/simple_submission_4/euclid.py
new file mode 100644
index 0000000..064d1e5
--- /dev/null
+++ b/docs/source/_static/QuickStart/simple_submission_4/euclid.py
@@ -0,0 +1,16 @@
+# assessment A
+# student id: 4
+
+def gcd(x,y):
+ if x > y:
+ small = y
+ else:
+ small = x
+ for i in range(1, small+1):
+ if((x % i == 0) and (y % i == 0)):
+ g = i
+
+ return g
+
+# calling function with parameters and printing it out
+print(gcd(8,12))
diff --git a/docs/source/_static/readme_matrix.png b/docs/source/_static/readme_matrix.png
new file mode 100644
index 0000000..e91358b
--- /dev/null
+++ b/docs/source/_static/readme_matrix.png
Binary files differ
diff --git a/docs/source/_static/report.txt b/docs/source/_static/report.txt
new file mode 100644
index 0000000..b78e20b
--- /dev/null
+++ b/docs/source/_static/report.txt
@@ -0,0 +1,9 @@
+euclid.py
+ 2 ... 1
+2 100.00 ... 94.74
+3 100.00 ... 94.74
+4 63.16 ... 57.89
+1 94.74 ... 100.00
+
+[4 rows x 4 columns]
+Written report to /Smarker/plagarism_report_details.pickle
diff --git a/docs/source/_static/simple.json b/docs/source/_static/simple.json
new file mode 100644
index 0000000..40accc7
--- /dev/null
+++ b/docs/source/_static/simple.json
@@ -0,0 +1,60 @@
+{
+ "files": [
+ {
+ "euclid.py": {
+ "functions": [
+ {
+ "gcd(2)": {
+ "present": true,
+ "documentation": {
+ "comments": "None",
+ "doc": "Docstring gcd"
+ },
+ "arguments": "(p, q)",
+ "minimum_arguments": 2,
+ "source_code": "def gcd(p,q):\n \"\"\"Docstring gcd\"\"\"\n if p < q:\n (p,q) = (q,p)\n if(p%q) == 0:\n return q\n else:\n return (gcd(q, p % q)) # recursion taking place"
+ }
+ }
+ ],
+ "run": [
+ {
+ "python euclid.py": {
+ "regexes": {
+ "^4": [
+ "4"
+ ]
+ },
+ "full_output": "4\n"
+ }
+ }
+ ],
+ "tests": [
+ "assert euclid.gcd(8,12) == 4\n"
+ ],
+ "present": true,
+ "has_exception": false,
+ "documentation": {
+ "comments": "None",
+ "doc": "None"
+ }
+ }
+ }
+ ],
+ "name": "simple_assessment",
+ "student_no": "123456790",
+ "test_results": {
+ "pytest_report": "============================= test session starts ==============================\nplatform linux -- Python 3.10.4, pytest-7.1.1, pluggy-1.0.0 -- /usr/bin/python3\ncachedir: .pytest_cache\nrootdir: /tmp/tmpjzy020i4/simple_submission_3\ncollecting ... collected 1 item\n\n../../../../../../tmp/tmpjzy020i4/simple_submission_3/test_euclid.py::test_1 PASSED [100%]\n\n--------------- generated xml file: /tmp/tmpyu0qypji/report.xml ----------------\n============================== 1 passed in 0.01s ===============================\n",
+ "junitxml": "<?xml version=\"1.0\" encoding=\"utf-8\"?><testsuites><testsuite name=\"pytest\" errors=\"0\" failures=\"0\" skipped=\"0\" tests=\"1\" time=\"0.019\" timestamp=\"2022-05-01T15:03:57.143881\" hostname=\"thonkpad2\"><testcase classname=\"test_euclid\" name=\"test_1\" time=\"0.001\" /></testsuite></testsuites>",
+ "meta": {
+ "name": "pytest",
+ "errors": "0",
+ "failures": "0",
+ "skipped": "0",
+ "tests": "1",
+ "time": "0.019",
+ "timestamp": "2022-05-01T15:03:57.143881",
+ "hostname": "thonkpad2"
+ }
+ },
+ "class_tree": {}
+}
diff --git a/docs/source/_static/simple.txt b/docs/source/_static/simple.txt
new file mode 100644
index 0000000..b6dcc16
--- /dev/null
+++ b/docs/source/_static/simple.txt
@@ -0,0 +1,89 @@
+============================= test session starts ==============================
+platform linux -- Python 3.10.4, pytest-7.1.2, pluggy-1.0.0 -- /usr/bin/python3
+cachedir: .pytest_cache
+rootdir: /tmp/tmp398_c3x6/simple_submission_1
+collecting ... collected 1 item
+
+../tmp/tmp398_c3x6/simple_submission_1/test_euclid.py::test_1 PASSED [100%]
+
+--------------- generated xml file: /tmp/tmpceag5_nn/report.xml ----------------
+============================== 1 passed in 0.01s ===============================
+4
+=== simple_assessment - Student ID: 1 Automatic marking report ===
+Report generated at 2022-05-01 15:49:15.701124
+
+== Class Tree: ==
+
+{}
+
+
+== File Analysis ==
+
+ = euclid.py =
+ Documentation:
+ 28 characters long
+ Comments:
+ ```
+ # the newest!
+ # assessment 1
+ ```
+ Docstring:
+ *** No docstring present ***
+ Functions:
+ gcd(2):
+ Arguments:
+ (m, n) -> int
+ Enough? YES
+ Documentation:
+ 164 characters long
+ Comments:
+ *** No comments present ***
+ Docstring:
+ ```
+ Calculates the greatest common denominator between two numbers.
+
+ Args:
+ x (int): Number One
+ y (int): Number Two
+
+ Returns:
+ int: The GCD of the two numbers
+ ```
+ Source:
+ 15 lines (356 characters)
+ Code:
+ ```
+ def gcd(m,n) -> int:
+ """Calculates the greatest common denominator between two numbers.
+
+ Args:
+ x (int): Number One
+ y (int): Number Two
+
+ Returns:
+ int: The GCD of the two numbers
+ """
+ if m< n:
+ (m,n) = (n,m)
+ if(m%n) == 0:
+ return n
+ else:
+ return (gcd(n, m % n)) # recursion taking place
+ ```
+ Runtime Analysis:
+ Command `python euclid.py`:
+ Monitor:
+ stdout
+ Regexes:
+ `^4`:
+ Found occurrences: 1
+ Occurrences list:
+ 4
+ Full runtime output:
+ ```
+ 4
+
+ ```
+
+
+