HiveMinds / Code-LatexReportTemplate

Syncs your matlab or python code and pictures directly into your latex report (pdf).
GNU Affero General Public License v3.0
1 stars 2 forks source link

Student latex course template Build Status

Hi, this is a template you can use for every course. In particular if you do some python coding (normal or Jupiter notebooks), this repository enables you to automatically updates your report every time you run your code. It also syncs with Overleaf so you can do your typing there. That means no last minute copy pasting of images into Overleaf (if you were into that sort of thing). Also it automatically sets up your programming envirionment for you, and if you collaborate with others, you can automatically see whether their code contributions keep the code working, thanks to the Continuous Integration with Travis-CI. To summarise:

  1. Python code and latex report integration. The following is done with a single command:
    • Plots are exported directly into your latex report.
    • Your python code is automatically included in the appendices of your report.
    • The example jupyter notebook is automatically executed.
    • The example jupyter notebook is automatically converted to pdf
    • The pdf of the example jupyter notebook is automatically integrated in the latex report.
    • The latex report is automatically compiled into a pdf.
  2. You can easily sync with Overleaf, e.g. if you do a last minute run, you just push and pull into overleaf, instead of manually uploading pictures.
  3. Unit tests are written. (entire repository code can be tested with a single line)

Usage: do once

  1. If you don't have pip: open Anaconda prompt and browse to the directory of this readme:

    cd /home/<your path to the repository folder>/
  2. To use this package, first make a new conda environment and activate (it this automatically installs everything you need)

    conda env create --file environment.yml

Usage: do every time you start Anaconda:

  1. Activate the conda environment you created:
    conda activate example_env

Usage: do every run:

  1. Performe a run for assignment 1 (named project1) of main code (in main.py, called from __main__.py)
    python -m code.project1.src

Testing

  1. Testing is as simple as running the following command in the root directory of this repository in Anaconda prompt:
    python -m pytest

    from the root directory of this project.