Skip to content

Commit

Permalink
Modernize build
Browse files Browse the repository at this point in the history
  • Loading branch information
leannep committed Apr 12, 2024
1 parent 358e0d5 commit 8039f88
Show file tree
Hide file tree
Showing 5 changed files with 7,890 additions and 29 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

"on": [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history for metadata
submodules: true

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Python install
run: |
python -m pip install --upgrade pip
python -m pip install "lander<2.0.0"
python -m pip install pyyaml
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: sqrereadonly
password: ${{ secrets.DOCKERHUB_SQREREADONLY_TOKEN }}

- name: TeX build
run: |
docker run --rm -v `pwd`:/workspace -w /workspace lsstsqre/lsst-texmf:latest sh -c 'make'
- name: Landing page upload
if: ${{ github.event_name == 'push' }}
env:
LTD_PASSWORD: ${{ secrets.LTD_PASSWORD }}
LTD_USERNAME: ${{ secrets.LTD_USERNAME }}
run: |
lander --upload --pdf PSTN-024.pdf --lsstdoc PSTN-024.tex --ltd-product pstn-024
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
*.out
acronyms.tex
authors.tex
meta.tex
*.aux
*.bbl
*.blg
*.fdb_latexmk
*.fls
*.log
PST*pdf
*.xdv
19 changes: 3 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,17 @@ endif

export TEXMFHOME ?= lsst-texmf/texmf

$(DOCNAME).pdf: $(tex) meta.tex local.bib authors.tex acronyms.tex
$(DOCNAME).pdf: $(tex) local.bib authors.tex
latexmk -bibtex -xelatex -f $(DOCNAME)

# Acronym tool allows for selection of acronyms based on tags - you may want more than DM
acronyms.tex: $(tex) myacronyms.txt
$(TEXMFHOME)/../bin/generateAcronyms.py -t "DM" $(tex)

authors.tex: authors.yaml
python3 $(TEXMFHOME)/../bin/db2authors.py > authors.tex
python3 $(TEXMFHOME)/../bin/db2authors.py > authors.tex

.PHONY: clean
clean:
latexmk -c
rm -f $(DOCNAME).bbl
rm -f $(DOCNAME).pdf
rm -f meta.tex
rm -f authors.tex

.FORCE:

meta.tex: Makefile .FORCE
rm -f $@
touch $@
echo '% GENERATED FILE -- edit this in the Makefile' >>$@
/bin/echo '\newcommand{\lsstDocType}{$(DOCTYPE)}' >>$@
/bin/echo '\newcommand{\lsstDocNum}{$(DOCNUMBER)}' >>$@
/bin/echo '\newcommand{\vcsRevision}{$(GITVERSION)$(GITDIRTY)}' >>$@
/bin/echo '\newcommand{\vcsDate}{$(GITDATE)}' >>$@
40 changes: 27 additions & 13 deletions PSTN-024.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
\documentclass[modern]{aastex62}
\documentclass[twocolumn]{aastex631}


% lsstdoc documentation: https://lsst-texmf.lsst.io/lsstdoc.html
\input{meta}
Expand All @@ -8,33 +9,46 @@
% Local commands go here.



\newcommand{\docRef}{PSTN-024}
\newcommand{\docUpstreamLocation}{\url{https://github.com/lsst-pst/pstn-024}}


\begin{document}
\input{authors}
\date{\today}
\title{LSST Data Management System Verification and Validation
}
\hypersetup{pdftitle={\@title}, pdfauthor={\@author}, pdfkeywords={\@keywords}}
\hypersetup{
pdftitle={Scientific Performance of Rubin Observatory LSST Data Management},
pdfauthor={Guy et al},
pdfkeywords={LSST, Data Management}}

\input{abstract}

\keywords{%
Astrophysics - Instrumentation and Methods for Astrophysics
---
methods: data analysis
---
methods: miscellaneous
}

\input{body}

\appendix
% Remove this when you strart your paper
\input{appendix}
\begin{acknowledgments}
This material is based upon work supported in part by the National Science Foundation through Cooperative Agreement AST-1258333 and Cooperative Support Agreement AST-1202910 managed by the Association of Universities for Research in Astronomy (AURA), and the Department of Energy under Contract No. DE-AC02-76SF00515 with the SLAC National Accelerator Laboratory managed by Stanford University.
Additional Rubin Observatory funding comes from private donations, grants to universities, and in-kind support from LSSTC Institutional Members.
\end{acknowledgments}

\facilities{Rubin (LSSTCam), RubinAux (LATISS)}
\software{
Rubin Science Platform \citep{LDM-542},
LSST Science Pipelines \citep{PSTN-019},
Qserv \citep{Wang:2011:QDS:2063348.2063364}
}

% Include all the relevant bib files.
% https://lsst-texmf.lsst.io/lsstdoc.html#bibliographies
\section{References} \label{sec:bib}
\bibliographystyle{yahapj}
\label{sec:bib}
\bibliography{local,lsst,lsst-dm,refs_ads,refs,books}

% Make sure lsst-texmf/bin/generateAcronyms.py is in your path
\section{Acronyms} \label{sec:acronyms}
\input{acronyms.tex}

\end{document}
Loading

0 comments on commit 8039f88

Please sign in to comment.