summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2022-05-24 17:36:08 +0100
committerjwansek <eddie.atten.ea29@gmail.com>2022-05-24 17:36:08 +0100
commit80b5876ac8ce0322e0a5d821e51a1ce07fc95316 (patch)
tree187c2d53044276c85c87649117c4d3e5db02985f /docs
parentf2f734194c03dfff2024cf417c502515ddb7a855 (diff)
downloadSmarker-80b5876ac8ce0322e0a5d821e51a1ce07fc95316.tar.gz
Smarker-80b5876ac8ce0322e0a5d821e51a1ce07fc95316.zip
Fixed bug in tex template, added alternative similarity metric, updated docs
Diffstat (limited to 'docs')
-rw-r--r--docs/requirements.txt3
-rw-r--r--docs/source/assessments.rst4
-rw-r--r--docs/source/docker.rst7
-rw-r--r--docs/source/quickstart.rst16
4 files changed, 27 insertions, 3 deletions
diff --git a/docs/requirements.txt b/docs/requirements.txt
new file mode 100644
index 0000000..bced0aa
--- /dev/null
+++ b/docs/requirements.txt
@@ -0,0 +1,3 @@
+Sphinx
+sphinx_mdinclude
+sphinx-argparse \ No newline at end of file
diff --git a/docs/source/assessments.rst b/docs/source/assessments.rst
index a8d7311..cd92fe1 100644
--- a/docs/source/assessments.rst
+++ b/docs/source/assessments.rst
@@ -16,6 +16,10 @@ Classes
.. autoclass:: assessments.SimilarityMetric
:members:
+.. autoclass:: assessments.StringSimilarity
+ :inherited-members:
+ :members:
+
Functions
*********
diff --git a/docs/source/docker.rst b/docs/source/docker.rst
index 232c7f4..6332dae 100644
--- a/docs/source/docker.rst
+++ b/docs/source/docker.rst
@@ -11,6 +11,13 @@ Running the system in docker has many advantages:
* Makes the system be able to be used in Windows- Smarker has been tested in docker for windows using WSL for the backend
+.. warning::
+
+ If using windows, I recommend using the mingw shell since powershell is bad at dealing with relative file paths. With mingw you can simply use ``$(pwd)``.
+
+ However, if you do, be sure to **escape file paths properly**; since, for example, ``/tmp/`` will automatically be expanded to ``C:/Users/<user>/AppData/Local/Temp/``. This causes issues when
+ setting up docker volumes. You can prefix your commands with ``MSYS_NO_PATHCONV=1`` (`see the documentation <https://web.archive.org/web/20201112005258/http://www.mingw.org/wiki/Posix_path_conversion>`_).
+
Using docker
------------
diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst
index 08f3cec..b851823 100644
--- a/docs/source/quickstart.rst
+++ b/docs/source/quickstart.rst
@@ -21,7 +21,12 @@ Then add it to the database:
docker run -v "$(pwd)/docs/source/_static/QuickStart/simple_assessment.yml":/tmp/assessment.yml -it --entrypoint python --rm smarker assessments.py -c /tmp/assessment.yml
-If using windows, I recommend using the mingw shell since powershell is bad at dealing with relative file paths in docker.
+.. warning::
+
+ If using windows, I recommend using the mingw shell since powershell is bad at dealing with relative file paths. With mingw you can simply use ``$(pwd)``.
+
+ However, if you do, be sure to **escape file paths properly**; since, for example, ``/tmp/`` will automatically be expanded to ``C:/Users/<user>/AppData/Local/Temp/``. This causes issues when
+ setting up docker volumes. You can prefix your commands with ``MSYS_NO_PATHCONV=1`` (`see the documentation <https://web.archive.org/web/20201112005258/http://www.mingw.org/wiki/Posix_path_conversion>`_).
Then add some students:
@@ -76,7 +81,11 @@ Now we can generate a plagarism report:
.. code-block:: bash
- touch out/report.pickle && sudo docker run -v "$(pwd)/out/report.pickle":/Smarker/plagarism_report_details.pickle -it --entrypoint python --rm smarker assessments.py --plagarism_report simple_assessment
+ touch out/report.pickle && touch out/matrix.png && docker run \
+ -v "$(pwd)/out/report.pickle":/Smarker/plagarism_report_details.pickle \
+ -v "$(pwd)/out/matrix.png":/Smarker/plagarism_report_matrix.png \
+ -it --entrypoint python --rm smarker \
+ assessments.py --plagarism_report simple_assessment
Which produces a pickled report matrix, and prints out to stdout:
@@ -87,9 +96,10 @@ Which produces a pickled report matrix, and prints out to stdout:
3 100.00 100.00 42.86 94.74
4 63.16 63.16 100.00 57.89
1 94.74 94.74 39.29 100.00
+ Written image to /Smarker/plagarism_report_matrix.png
Written report to /Smarker/plagarism_report_details.pickle
-If we run it outside of docker, we can also get it rendered nicely in matplotlib:
+If we run it outside of docker, we can also get it rendered nicely in matplotlib figure GUI, which enables us to resize the produced matrix:
.. image:: _static/readme_matrix.png