Skip to content

Commit

Permalink
Update tex files
Browse files Browse the repository at this point in the history
  • Loading branch information
rs028 committed Jan 5, 2025
1 parent 4976a5b commit 9d56f69
Show file tree
Hide file tree
Showing 12 changed files with 241 additions and 214 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ name: AtChem2 CI
# Controls when the workflow is activated
on:

# Triggers when a pull request is created or updated (only on the
# master branch)
# Triggers when a pull request targeting the master branch is
# created or updated
pull_request:
branches: [ master ]

Expand All @@ -44,7 +44,7 @@ jobs:
# here: https://github.com/actions/runner-images
runs-on: ${{ matrix.os }}
strategy:
matrix:
matrix: # macos testing temporarily deactivated
os: [ubuntu-20.04, ubuntu-22.04] #, macos-12, macos-13]
fortran: [10, 11, 12]
exclude: # gfortran-11, gfortran-12 not available for ubuntu-20.04
Expand Down
82 changes: 36 additions & 46 deletions .github/workflows/tex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,27 @@ name: AtChem2 PDF
# Controls when the workflow is activated
on:

# Triggers when a pull request is created or updated (only on the
# master branch), and the .tex/.svg files modified
pull_request:
branches: [ master ]
# paths:
# - './doc/latex/*.tex'
# - './doc/figures/*.svg'

# Triggers when a push is made to the master branch (either by
# merging a pull request, or by direct commit)
# push:
# branches: [ master ]
# merging a pull request, or by direct commit), and when any of the
# .tex/.svg files in `doc/` have been modified
push:
branches: [ master ]
paths:
- './doc/latex/*.tex'
- './doc/figures/*.svg'

# Run manually from the Actions tab
# workflow_dispatch:
workflow_dispatch:

# ------------------------------ JOBS ------------------------------ #
# This workflow contains a single job called `pdf_manual` which sets
# up a full TeXLive environment, compiles the source files, and
# generates the pdf file of the manual
# This workflow contains a single job called `pdf_manual` which runs
# the script `make_manual_pdf.sh` to generate the pdf file of the
# manual, and uploads it to the repo
jobs:
pdf_manual:
# The job runs on the latest version of linux (ubuntu)
# The job runs on the latest version of linux (ubuntu), and needs
# write permission to the repository
runs-on: ubuntu-latest

permissions:
contents: write

Expand All @@ -52,23 +48,17 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout
with:
# fetch-depth: 2
ref: ${{ github.head_ref }}
ref: ${{ github.ref }}

- name: Check Token Permissions
run: |
echo "Token Permissions: $(curl -sSL -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/${{ github.repository }} | jq .permissions)"
# # -------------------------------------------------------------
# # 2. Setup TeXLive and Inkscape (v1.x), then run the script `make_manual_pdf.sh`
# - name: Setup TexLive and compile the manual
# uses: xu-cheng/texlive-action@v2 # https://github.com/marketplace/actions/github-action-with-texlive
# with:
# scheme: full
# run: |
# apk add inkscape
# ./tools/make_manual_pdf.sh
# -------------------------------------------------------------
# 2. Setup TeXLive, install Inkscape (v1.x), and compile the pdf file
- name: Setup TexLive and compile the manual
uses: xu-cheng/texlive-action@v2 # https://github.com/marketplace/actions/github-action-with-texlive
with:
scheme: full
run: |
apk add inkscape
./tools/make_manual_pdf.sh
# # -------------------------------------------------------------
# # 3.
Expand All @@ -78,16 +68,16 @@ jobs:
# name: AtChem2-Manual.pdf
# path: doc/AtChem2-Manual.pdf

# # -------------------------------------------------------------
# # 4.
# - name: Add pdf to PR
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# # configure git
# git config --local user.name "github-actions[bot]"
# git config --local user.email "github-actions[bot]@users.noreply.github.com"
# # commit pdf file
# git add doc/AtChem2-Manual.pdf
# git commit -m "Update AtChem2-Manual.pdf"
# git push origin HEAD:${{ github.ref }}
# -------------------------------------------------------------
# 4.
- name: Add pdf
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# configure git
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
# commit pdf file
git add doc/AtChem2-Manual.pdf
git commit -m "Update AtChem2-Manual.pdf"
#git push origin master
46 changes: 0 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,49 +44,3 @@ Set the initial conditions, the required outputs and the other model parameters
The `atchem2` executable accepts several command line arguments to customize the location of the configuration, input and output directories, and of the shared library. More information on AtChem2, and detailed instructions on its installation, configuration and use can be found in the manual (`doc/AtChem2-Manual.pdf`) and in the GMD paper (see `CITATION.md`).

The [AtChem2 wiki](https://github.com/AtChem/AtChem2/wiki) contains a summary of the instructions to install, compile, run and contribute to the development of Atchem2, together with additional information and a list of [known issues](https://github.com/AtChem/AtChem2/wiki/Known-Issues) with the suggested solutions or workarounds.


Docker Container
---------------------------------

A containerised version of `AtChem2` is available. Currently this is built for release 1.2.2. The container is built on Rocky Linux 8.9 and pre-installs the `cvode` and `openlibm` dependencies via their relevant `tools/install/install_*.sh` scripts.

The image can be downloaded via:

```
docker pull ghcr.io/wacl-york/atchem2:1.2.2
```

When running the container, changes to the model (e.g. those made to configurations, constraints and mechanisms) should be in a folder that matches the AtChem2 directory structure. This folder is then mounted as a volume to the container with the name `/data_transfer/`. The mechanism to use is provided as a positional argument to the image e.g. `./model/my_mech.fac`.

#### Example host file structure:
```
my_model_run
└── model
├── configuration
├── constraints
└── my_mech.fac
```

#### Example Docker run command:

```
docker run -it --rm -v /path/to/my_model_run:/data_transfer ghcr.io/wacl-york/atchem2:1.2.2 ./model/my_mech.fac
```

Outputs will be copied to `my_model_run/model/output` on completion.

#### Running on Singularity / Apptainer

Some HPC systems use Singularity / Apptainer instead of Docker as their container engine. This image is compatible with those aswell. The image can be converted to a .sif via:

```
apptainer pull path/to/image/atchem2.sif docker://ghcr.io/wacl-york/atchem2:1.2.2
```
#### Example Apptainer run command:

```
apptainer run --bind /path/to/my_model_run/:/data_transfer/ path/to/image/atchem2.sif ./model/my_mech.fac
```
> [!Note]
> The leading "/" is important when mounting the volume for apptainer, as the container opens in the users "~" directory whereas Docker opens at "/"
Binary file modified doc/AtChem2-Manual.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion doc/latex/Credits.tex
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ \section{Credits} \label{sec:credits}
\item Marios Panagi
\end{itemize}

AtChem2 is a development of \href{https://atchem.york.ac.uk/}{AtChem-online},
AtChem2 is a development of \href{https://atchem.york.ac.uk}{AtChem-online},
which was created at the University of Leeds (and is now hosted at the
University of York) by:

Expand Down
Loading

0 comments on commit 9d56f69

Please sign in to comment.