From cb5905d008ad6850fa6729c76740a813f989d9f4 Mon Sep 17 00:00:00 2001 From: Sam Dotson Date: Tue, 5 Nov 2024 16:00:03 -0500 Subject: [PATCH] updates ci caching --- .github/workflows/CI.yml | 17 +++++--- .gitignore | 1 + README.md | 85 ++++++++++++++++++++++++++-------------- 3 files changed, 68 insertions(+), 35 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6aa364d..09d897b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -5,6 +5,11 @@ on: branches: - main pull_request: + branches: + - main + +env: + CACHE_NUMBER: 0 jobs: build: @@ -35,24 +40,26 @@ jobs: environment-file: environment.yml use-mamba: true use-only-tar-bz2: true + cache-env: true - run: | conda config --env --set pip_interop_enabled True # Set up caching to speed up subsequent runs - - name: Set up cache + - name: Set up LaTeX cache uses: actions/cache@v3 + id: latex-cache with: path: | ~/.texlive - ~/.miktex /usr/local/texlive - ${{ runner.temp }}/latex_cache key: ${{ runner.os }}-latex-${{ hashFiles('**/Snakefile') }} restore-keys: | ${{ runner.os }}-latex- # Install LaTeX on each OS - name: Install LaTeX + env: + CACHE_HIT: ${{ steps.latex-cache.outputs.cache-hit }} run: | if [[ ${{ matrix.os }} == 'ubuntu-latest' ]]; then sudo apt-get update @@ -77,5 +84,5 @@ jobs: - name: Upload PDF artifact uses: actions/upload-artifact@v3 with: - name: thesis-pdf - path: docs/thesis.pdf + name: 2025-dotson-thesis + path: docs/2025-dotson-thesis.pdf diff --git a/.gitignore b/.gitignore index 993e2fb..2fe8ce7 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ __pycache__/ data/benchmark/data/* docs/_minted-thesis pres/_minted-arfc-pres +_minted-* diff --git a/README.md b/README.md index 610685d..85934e3 100644 --- a/README.md +++ b/README.md @@ -3,40 +3,30 @@ [![Build Dissertation](https://github.com/arfc/2025-dotson-dissertation/actions/workflows/CI.yml/badge.svg)](https://github.com/arfc/2025-dotson-dissertation/actions/workflows/CI.yml) -This repository holds my preliminary exam document. The style guide comes from the University of Illinois Urbana-Champaign Graduate College. A link to the resources may be found [here](https://grad.illinois.edu/thesis/format). +This repository holds my preliminary exam document. The style guide comes from +the University of Illinois Urbana-Champaign Graduate College. A link to the +resources may be found [here](https://grad.illinois.edu/thesis/format). -# Compiling the prelim document - -## Windows -The document style must be compiled using `biber`. Doing this from the command line is more reliable than modifying TeXworks or other editor (I have experienced issues with Windows blocking a biber.exe call from TeXworks). **Make sure your LaTeX installation is up-to-date.** - -```bash -C:\Users\samgd\Research\2025-dotson-dissertation\docs>pdflatex -shell-escape 2025-dotson-thesis.tex -C:\Users\samgd\Research\2025-dotson-dissertation\docs>biber 2025-dotson-thesis # This is not a typo. Do not include a file extension. -C:\Users\samgd\Research\2025-dotson-dissertation\docs>pdflatex -shell-escape 2025-dotson-thesis.tex -C:\Users\samgd\Research\2025-dotson-dissertation\docs>pdflatex -shell-escape 2025-dotson-thesis.tex -``` - -## Linux - -```bash -$ cd 2025-dotson-dissertation/docs -$ make -``` - -## From the template repository -### uiucthesis class +# Reproducing the Analysis -A LaTeX package for formatting theses in the format required by the University of Illinois at Urbana-Champaign. +Many of the plots that were present in the original preliminary document were +produced using a `juptyer notebook`. The analyses new to this thesis were +developed using a `snakemake` workflow. This repository includes an +`environment.yaml` file to facilitate reproducibility of this work. +## Prerequisites -# Reproducing the Analysis +This workflow assumes users have a working installation of the following -Many of the plots that were present in the original preliminary document were produced using a `juptyer notebook`. The analyses new to this thesis were developed using a `snakemake` workflow. This repository includes an `environment.yaml` file to facilitate reproducibility of this work. +* `mamba`/`conda` (package dependency and environment management tools) +* [LaTeX](https://www.latex-project.org/get/) +* [biber](https://ctan.org/pkg/biber?lang=en) (per the recommendation from the + UIUC Graduate College) ## Setting up the environment -To set up the `mamba` environment, run the following commands in either command prompt or terminal. +To set up the `mamba` environment, run the following commands in either command +prompt or terminal. ```bash cd 2025-dotson-dissertation @@ -50,20 +40,54 @@ The `snakemake` workflow used here is shown by the DAG below. ![dag](analysis/dag.png) -To run execute the `snakemake` workflow run the following commands in either command prompt or terminal. +To run execute the `snakemake` workflow run the following commands in either +command prompt or terminal. ```bash cd analysis snakemake --cores=1 ``` +# Compiling the dissertation + +If you only want to reproduce the document itself without running any analysis, +here are the following instructions. + +## Windows +The document style must be compiled using `biber`. Doing this from the command +line is more reliable than modifying TeXworks or other editor (I have +experienced issues with Windows blocking a biber.exe call from TeXworks). **Make +sure your LaTeX installation is up-to-date.** + +```bash +C:\Users\samgd\Research\2025-dotson-dissertation\docs>pdflatex -shell-escape 2025-dotson-thesis.tex +C:\Users\samgd\Research\2025-dotson-dissertation\docs>biber 2025-dotson-thesis # This is not a typo. Do not include a file extension. +C:\Users\samgd\Research\2025-dotson-dissertation\docs>pdflatex -shell-escape 2025-dotson-thesis.tex +C:\Users\samgd\Research\2025-dotson-dissertation\docs>pdflatex -shell-escape 2025-dotson-thesis.tex +``` + +## Unix + +```bash +$ cd 2025-dotson-dissertation/docs +$ make +``` + +## From the template repository +### uiucthesis class + +A LaTeX package for formatting theses in the format required by the University +of Illinois at Urbana-Champaign. + #### Update Notes - 3.1a (Samuel G Dotson) * Adds prelim macro - 3.1 (Zachary J Weiner) - * Format table of contents entries with titletoc, prepend "Chapter" and "Appendix" - * Place appendices after references, returning to `\mainmatter` so that appendices are still numbered + * Format table of contents entries with titletoc, prepend "Chapter" and + "Appendix" + * Place appendices after references, returning to `\mainmatter` so that + appendices are still numbered * Add copyright and licensing information - 3.0 (Zachary J Weiner) * Significant revision, obsolete options removed and source simplified @@ -71,4 +95,5 @@ snakemake --cores=1 * Removed the Vita Section * Added a Makefile * Changed all dates from 2009 -> 2014 - * Be careful when updating the date in the first line of uiucthesis2021.dtx! All numbers must be two digits, including month and day. + * Be careful when updating the date in the first line of uiucthesis2021.dtx! + All numbers must be two digits, including month and day.