Skip to content

Commit

Permalink
updates name of main tex file, correctly uses miniforge3
Browse files Browse the repository at this point in the history
  • Loading branch information
samgdotson committed Nov 5, 2024
1 parent 6e870ce commit f10aa24
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Create environment with Mamba
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge # mamba is faster than base conda
miniforge-variant: Miniforge3 # mamba is faster than base conda
miniforge-version: latest
channels: conda-forge, bioconda
auto-activate-base: false
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*.pyg
.env
.snakemake
thesis.pdf
*.pdf
__pycache__/
.ipynb_checkpoints/
data/benchmark/data/*
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ This repository holds my preliminary exam document. The style guide comes from t
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 thesis.tex
C:\Users\samgd\Research\2025-dotson-dissertation\docs>biber thesis # This is not a typo. Do not include a file extension.
C:\Users\samgd\Research\2025-dotson-dissertation\docs>pdflatex -shell-escape thesis.tex
C:\Users\samgd\Research\2025-dotson-dissertation\docs>pdflatex -shell-escape thesis.tex
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
Expand Down
30 changes: 19 additions & 11 deletions analysis/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,40 @@ latexopt = """
-halt-on-error
"""

docs_path = "../docs/"

with open(f"{docs_path}Makefile", "r") as file:
lines = file.readlines()

output_name = lines[0].strip('\n').replace(' ', '').split('=')[-1]

#============================RULES================================
rule targets:
input:
thesis = "../docs/thesis.pdf",
thesis = f"{docs_path}{output_name}.pdf",
dag = "dag.png"

if sys.platform == 'Windows':
rule build_thesis:
input:
main_tex = "../docs/thesis.tex"
output: "../docs/thesis.pdf"
main_tex = f"{docs_path}{output_name}.tex"
output: f"{docs_path}{output_name}.pdf"
shell:
f"""
cd ../docs && \
pdflatex {latexopt} thesis.tex && \
biber thesis && \
pdflatex {latexopt} thesis.tex && \
pdflatex {latexopt} thesis.tex &&
pdflatex {latexopt} {output_name}.tex && \
biber {output_name} && \
pdflatex {latexopt} {output_name}.tex && \
pdflatex {latexopt} {output_name}.tex &&
"""
elif sys.platform in ['darwin', 'linux']:
rule build_thesis:
input:
main_tex = "../docs/thesis.tex"
output: "../docs/thesis.pdf"
main_tex = f"{docs_path}{output_name}.tex"
output: f"{docs_path}{output_name}.pdf"
shell:
"""
(cd ../docs && make)
f"""
(cd {docs_path} && make)
"""

rule build_dag:
Expand Down
Binary file modified analysis/dag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
manuscript = thesis
manuscript = 2025-dotson-thesis
references = $(wildcard *.bib)
latexopt = -shell-escape -halt-on-error -file-line-error

Expand Down

0 comments on commit f10aa24

Please sign in to comment.