diff options
Diffstat (limited to 'docs/source/quickstart.rst')
-rw-r--r-- | docs/source/quickstart.rst | 16 |
1 files changed, 13 insertions, 3 deletions
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 |