From 9335ca20aa662612e21bc827b78d2dc988e20ee6 Mon Sep 17 00:00:00 2001 From: Oliver Killane Date: Tue, 26 Sep 2023 16:44:20 +0100 Subject: [PATCH 1/5] added docker build and pull request template --- .devcontainer/Dockerfile | 24 +++++++++++++++++++++ .devcontainer/devcontainer.json | 15 ++++++++++++++ .github/pull_request_template.md | 6 ++++++ .github/workflows/push-dev-image.yaml | 30 +++++++++++++++++++++++++++ 4 files changed, 75 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/push-dev-image.yaml diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..eeb3d16 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,24 @@ +FROM ubuntu:latest + +ARG TL_VERSION=2023 +ARG TL_MIRROR=https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz + +# Install basic packages +RUN apt-get update -q +RUN apt-get install -qy build-essential wget sudo + +# Clean up to reduce image size +RUN apt-get clean autoclean && apt-get autoremove -y +RUN rm -rf /var/lib/{apt,dpkg,cache,log}/ /tmp/* /usr/local/texlive/${TL_VERSION}/*.log + +# Install basic texlive distribution +RUN cd /tmp && \ + wget --directory-prefix /tmp ${TL_MIRROR} && \ + zcat < install-tl-unx.tar.gz | tar xf - && \ + cd install-tl-* && \ + perl ./install-tl --scheme=small --no-interaction +ENV PATH="${PATH}:/usr/local/texlive/${TL_VERSION}/bin/x86_64-linux" + +# Update packages and tlmgr +RUN tlmgr init-usertree +RUN tlmgr update --self --all diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..41167aa --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,15 @@ +{ + "image": "ghcr.io/oliverkillane/imperial-computing-notes-dev:latest", + "customizations": { + "vscode": { + "extensions": [] + } + }, + "mounts": [ + { + "source": "${localEnv:HOME}/.ssh", + "target": "/root/.ssh", + "type": "bind" + } + ] +} \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..4095763 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,6 @@ +## Goals +- [ ] Increase the flubbo of the foobar +- [x] Re-jingle the plorb (without wazzo deractance) + - Only semi-jingled, decided against replacement due to additional build complexity + + > :eyes: **Please see zarg formatting** (decreased cadence) diff --git a/.github/workflows/push-dev-image.yaml b/.github/workflows/push-dev-image.yaml new file mode 100644 index 0000000..3f38ae6 --- /dev/null +++ b/.github/workflows/push-dev-image.yaml @@ -0,0 +1,30 @@ +name: Build and Publish Image + +on: + push: + branches: + - enh/development-docker + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.IMPERIAL_NOTES_GHCR_TOKEN }} + - name: Build and Push Image + uses: docker/build-push-action@v5 + with: + context: .devcontainer + push: true + platforms: linux/amd64 + tags: ghcr.io/oliverkillane/imperial-computing-notes-dev:latest + cache-from: type=gha + cache-to: type=gha,mode=max \ No newline at end of file From 484168beb2a552559f18b171250bbb40e2649d89 Mon Sep 17 00:00:00 2001 From: Oliver Killane Date: Wed, 27 Sep 2023 12:19:22 +0100 Subject: [PATCH 2/5] Added metadata for image --- .github/workflows/push-dev-image.yaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push-dev-image.yaml b/.github/workflows/push-dev-image.yaml index 3f38ae6..c485162 100644 --- a/.github/workflows/push-dev-image.yaml +++ b/.github/workflows/push-dev-image.yaml @@ -1,5 +1,5 @@ name: Build and Publish Image - +run-name: Pushing new Imperial College Notes Devcontainer by @${{ github.actor }} on: push: branches: @@ -13,6 +13,17 @@ jobs: uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Enrich Metadata + id: metadata + uses: docker/metadata-action@v5 + with: + images: ghcr.io/oliverkillane/imperial-computing-notes-dev + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + labels: | + org.opencontainers.image.description=A container for easy setup in developing the Imperial Computing Note project. - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: @@ -25,6 +36,7 @@ jobs: context: .devcontainer push: true platforms: linux/amd64 - tags: ghcr.io/oliverkillane/imperial-computing-notes-dev:latest + tags: ${{ steps.metadata.outputs.tags }} + labels: ${{ steps.metadata.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max \ No newline at end of file From 058ca90054ee70c3842f8c2a2c26593ff878b827 Mon Sep 17 00:00:00 2001 From: Oliver Killane Date: Wed, 27 Sep 2023 15:02:33 +0100 Subject: [PATCH 3/5] Fixed devcontainer start --- .devcontainer/Dockerfile | 38 +++++-- .devcontainer/devcontainer.json | 142 +++++++++++++++++++++++++- .github/workflows/push-dev-image.yaml | 13 ++- 3 files changed, 180 insertions(+), 13 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index eeb3d16..f8d3be7 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,17 +1,14 @@ FROM ubuntu:latest -ARG TL_VERSION=2023 -ARG TL_MIRROR=https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz # Install basic packages RUN apt-get update -q -RUN apt-get install -qy build-essential wget sudo - -# Clean up to reduce image size -RUN apt-get clean autoclean && apt-get autoremove -y -RUN rm -rf /var/lib/{apt,dpkg,cache,log}/ /tmp/* /usr/local/texlive/${TL_VERSION}/*.log +RUN apt-get install -qy build-essential wget curl sudo +# LATEX: # Install basic texlive distribution +ARG TL_VERSION=2023 +ARG TL_MIRROR=https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz RUN cd /tmp && \ wget --directory-prefix /tmp ${TL_MIRROR} && \ zcat < install-tl-unx.tar.gz | tar xf - && \ @@ -22,3 +19,30 @@ ENV PATH="${PATH}:/usr/local/texlive/${TL_VERSION}/bin/x86_64-linux" # Update packages and tlmgr RUN tlmgr init-usertree RUN tlmgr update --self --all + +# install inkscape (for tikz) and minted (for code highlighting) +RUN apt-get install -qy inkscape python3 python3-pip +RUN pip install pygments + +# C++ +# Already installed GCC as part of build-essential +RUN apt-get install -qy clang-format + +# Rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -qy + +# Elixir +RUN apt-get install -qy elixir + +# TLA +# Required Java, toolbox used is included in the VSCode extension +RUN apt-get install -qy default-jdk + +# Haskell +RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_GHC_VERSION=latest BOOTSTRAP_HASKELL_CABAL_VERSION=latest BOOTSTRAP_HASKELL_INSTALL_STACK=1 BOOTSTRAP_HASKELL_INSTALL_HLS=1 BOOTSTRAP_HASKELL_ADJUST_BASHRC=P sh + +# Clean up to reduce image size +RUN apt-get clean autoclean && apt-get autoremove -y +RUN rm -rf /var/lib/{apt,dpkg,cache,log}/ /tmp/* /usr/local/texlive/${TL_VERSION}/*.log + +CMD /usr/bin/bash \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 41167aa..dfd2b5c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,8 +1,146 @@ { - "image": "ghcr.io/oliverkillane/imperial-computing-notes-dev:latest", + "image": "ghcr.io/oliverkillane/imperial-computing-notes-dev:enh-development-docker", "customizations": { "vscode": { - "extensions": [] + "settings": { + "latex-workshop.latex.tools": [ + { + "name": "latexmk", + "command": "latexmk", + "args": [ + "-shell-escape", + "-synctex=1", + "-interaction=nonstopmode", + "-file-line-error", + "-pdf", + "-outdir=%OUTDIR%", + "%DOC%" + ], + "env": {} + }, + { + "name": "lualatexmk", + "command": "latexmk", + "args": [ + "-synctex=1", + "-interaction=nonstopmode", + "-file-line-error", + "-lualatex", + "-outdir=%OUTDIR%", + "%DOC%" + ], + "env": {} + }, + { + "name": "xelatexmk", + "command": "latexmk", + "args": [ + "-synctex=1", + "-interaction=nonstopmode", + "-file-line-error", + "-xelatex", + "-outdir=%OUTDIR%", + "%DOC%" + ], + "env": {} + }, + { + "name": "latexmk_rconly", + "command": "latexmk", + "args": [ + "%DOC%" + ], + "env": {} + }, + { + "name": "pdflatex", + "command": "pdflatex", + "args": [ + "-synctex=1", + "-interaction=nonstopmode", + "-file-line-error", + "%DOC%" + ], + "env": {} + }, + { + "name": "bibtex", + "command": "bibtex", + "args": [ + "%DOCFILE%" + ], + "env": {} + }, + { + "name": "rnw2tex", + "command": "Rscript", + "args": [ + "-e", + "knitr::opts_knit$set(concordance = TRUE); knitr::knit('%DOCFILE_EXT%')" + ], + "env": {} + }, + { + "name": "jnw2tex", + "command": "julia", + "args": [ + "-e", + "using Weave; weave(\"%DOC_EXT%\", doctype=\"tex\")" + ], + "env": {} + }, + { + "name": "jnw2texmintex", + "command": "julia", + "args": [ + "-e", + "using Weave; weave(\"%DOC_EXT%\", doctype=\"texminted\")" + ], + "env": {} + }, + { + "name": "tectonic", + "command": "tectonic", + "args": [ + "--synctex", + "--keep-logs", + "%DOC%.tex" + ], + "env": {} + } + ], + "editor.rulers": [ + { + "column": 80, // spacing of 1st column from left + "color": "#ff9900" // orange, Go Vols! + }, + { + "column": 100, // spacing of 1st column from left + "color": "#ff0000" // orange, Go Vols! + } + ] + }, + "extensions": [ + // For latex vscode setup + "James-Yu.latex-workshop", + // Development Ease + "usernamehw.errorlens", + "GitHub.vscode-pull-request-github", + "GitHub.github-vscode-theme", + "GitHub.vscode-github-actions", + // Diagrams done with drawio + "hediet.vscode-drawio", + // Language Support + "llvm-vs-code-extensions.vscode-clangd", + "ms-vscode.cmake-tools", + "JakeBecker.elixir-ls", + "ms-python.python", + "ms-python.black-formatter", + "rust-lang.rust-analyzer", + "serayuzgur.crates", + "haskell.haskell", + "alygin.vscode-tlaplus" + ] } }, "mounts": [ diff --git a/.github/workflows/push-dev-image.yaml b/.github/workflows/push-dev-image.yaml index c485162..2ca2b98 100644 --- a/.github/workflows/push-dev-image.yaml +++ b/.github/workflows/push-dev-image.yaml @@ -4,6 +4,8 @@ on: push: branches: - enh/development-docker + paths: + - '.devcontainer/**' jobs: docker: @@ -14,7 +16,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Enrich Metadata - id: metadata + id: meta uses: docker/metadata-action@v5 with: images: ghcr.io/oliverkillane/imperial-computing-notes-dev @@ -22,8 +24,11 @@ jobs: type=ref,event=branch type=ref,event=pr type=semver,pattern={{version}} + flavor: | + latest=true labels: | - org.opencontainers.image.description=A container for easy setup in developing the Imperial Computing Note project. + org.opencontainers.image.description=A development image for the imperial computing notes + org.opencontainers.image.vendor=Imperial Computing Notes - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: @@ -36,7 +41,7 @@ jobs: context: .devcontainer push: true platforms: linux/amd64 - tags: ${{ steps.metadata.outputs.tags }} - labels: ${{ steps.metadata.outputs.labels }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max \ No newline at end of file From d11ecd84c9fba567d0a64ad3b0d690e635d2f454 Mon Sep 17 00:00:00 2001 From: Oliver Killane Date: Wed, 27 Sep 2023 20:31:21 +0100 Subject: [PATCH 4/5] Using larger tex scheme for texlive install, added more deps --- .devcontainer/Dockerfile | 8 ++- .devcontainer/devcontainer.json | 103 +++---------------------------- .github/CONTRIBUTING.md | 17 +++++ .github/issue_template.md | 4 ++ .github/pull_request_template.md | 4 ++ LICENSE.md | 21 +++++++ README.md | 61 +----------------- 7 files changed, 59 insertions(+), 159 deletions(-) create mode 100644 .github/CONTRIBUTING.md create mode 100644 .github/issue_template.md create mode 100644 LICENSE.md diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index f8d3be7..352617d 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -3,22 +3,23 @@ FROM ubuntu:latest # Install basic packages RUN apt-get update -q -RUN apt-get install -qy build-essential wget curl sudo +RUN apt-get install -qy build-essential wget curl sudo openssh-client git # LATEX: -# Install basic texlive distribution +# Install full texlive distribution (very large) ARG TL_VERSION=2023 ARG TL_MIRROR=https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz RUN cd /tmp && \ wget --directory-prefix /tmp ${TL_MIRROR} && \ zcat < install-tl-unx.tar.gz | tar xf - && \ cd install-tl-* && \ - perl ./install-tl --scheme=small --no-interaction + perl ./install-tl --no-interaction --no-doc-install --no-src-install ENV PATH="${PATH}:/usr/local/texlive/${TL_VERSION}/bin/x86_64-linux" # Update packages and tlmgr RUN tlmgr init-usertree RUN tlmgr update --self --all +RUN tlmgr install latexindent chktex # install inkscape (for tikz) and minted (for code highlighting) RUN apt-get install -qy inkscape python3 python3-pip @@ -39,6 +40,7 @@ RUN apt-get install -qy elixir RUN apt-get install -qy default-jdk # Haskell +RUN apt-get install -qy libffi-dev libffi8ubuntu1 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_GHC_VERSION=latest BOOTSTRAP_HASKELL_CABAL_VERSION=latest BOOTSTRAP_HASKELL_INSTALL_STACK=1 BOOTSTRAP_HASKELL_INSTALL_HLS=1 BOOTSTRAP_HASKELL_ADJUST_BASHRC=P sh # Clean up to reduce image size diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index dfd2b5c..86043aa 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,8 +1,9 @@ { - "image": "ghcr.io/oliverkillane/imperial-computing-notes-dev:enh-development-docker", + "image": "ghcr.io/oliverkillane/imperial-computing-notes-dev", "customizations": { "vscode": { "settings": { + "latex-workshop.linting.chktex.enabled": true, "latex-workshop.latex.tools": [ { "name": "latexmk", @@ -17,96 +18,6 @@ "%DOC%" ], "env": {} - }, - { - "name": "lualatexmk", - "command": "latexmk", - "args": [ - "-synctex=1", - "-interaction=nonstopmode", - "-file-line-error", - "-lualatex", - "-outdir=%OUTDIR%", - "%DOC%" - ], - "env": {} - }, - { - "name": "xelatexmk", - "command": "latexmk", - "args": [ - "-synctex=1", - "-interaction=nonstopmode", - "-file-line-error", - "-xelatex", - "-outdir=%OUTDIR%", - "%DOC%" - ], - "env": {} - }, - { - "name": "latexmk_rconly", - "command": "latexmk", - "args": [ - "%DOC%" - ], - "env": {} - }, - { - "name": "pdflatex", - "command": "pdflatex", - "args": [ - "-synctex=1", - "-interaction=nonstopmode", - "-file-line-error", - "%DOC%" - ], - "env": {} - }, - { - "name": "bibtex", - "command": "bibtex", - "args": [ - "%DOCFILE%" - ], - "env": {} - }, - { - "name": "rnw2tex", - "command": "Rscript", - "args": [ - "-e", - "knitr::opts_knit$set(concordance = TRUE); knitr::knit('%DOCFILE_EXT%')" - ], - "env": {} - }, - { - "name": "jnw2tex", - "command": "julia", - "args": [ - "-e", - "using Weave; weave(\"%DOC_EXT%\", doctype=\"tex\")" - ], - "env": {} - }, - { - "name": "jnw2texmintex", - "command": "julia", - "args": [ - "-e", - "using Weave; weave(\"%DOC_EXT%\", doctype=\"texminted\")" - ], - "env": {} - }, - { - "name": "tectonic", - "command": "tectonic", - "args": [ - "--synctex", - "--keep-logs", - "%DOC%.tex" - ], - "env": {} } ], "editor.rulers": [ @@ -144,10 +55,10 @@ } }, "mounts": [ - { - "source": "${localEnv:HOME}/.ssh", - "target": "/root/.ssh", - "type": "bind" - } + // { + // "source": "${localEnv:HOME}/.ssh", + // "target": "/root/.ssh", + // "type": "bind" + // } ] } \ No newline at end of file diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..8721a53 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,17 @@ +## Develop + +### From Github Codespaces +Given you have github pro (e.g through the student developer pack) +1. Open the repository in a new codespace +2. Setup git, ssh *...and you're done* + +### From Devcontainer +See the provided [container](../.devcontainer). +1. Install docker desktop +2. Install vscode and the [Dev Container Extension](vscode:extension/ms-vscode-remote.remote-containers) +3. Clone this repository, and open within a devcontainer. +4. Setup git, ssh *...and you're done* + +### Locally +Please use the dockerfile and vscode features from the [container setup](../.devcontainer) as a guide. +- @oliverkillane is using MikTex + vscode + wsl on Windows diff --git a/.github/issue_template.md b/.github/issue_template.md new file mode 100644 index 0000000..0cc9bc9 --- /dev/null +++ b/.github/issue_template.md @@ -0,0 +1,4 @@ +## Description +*{A short description of the issue here}* + +*{Include references to incorrect information (to file, line in latex)}* \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 4095763..4bfa4ec 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -4,3 +4,7 @@ - Only semi-jingled, decided against replacement due to additional build complexity > :eyes: **Please see zarg formatting** (decreased cadence) + +## Chores +- [ ] PDFs regenerated +- [ ] Reformatted \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..fe2e060 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Oliver Killane + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 41fd42d..e89ad3d 100644 --- a/README.md +++ b/README.md @@ -16,69 +16,10 @@ It is designed as an improvement in quality over the [second year repo](https:// - [60029 - Data Processing Systems](60029%20-%20Data%20Processing%20Systems) ## How do I build this? -### Dependencies -1. A tex distribution. [See options here](https://www.latex-project.org/get/) - -2. Inkscape (required for tikz). Needs to be added to path -```powershell -# Check inkscape is installed and on path -inkscape --version -``` - -3. [Pygments](https://pygments.org/) - used by minted (code listings), which requires [python & pip](https://www.python.org/downloads/). -```powershell -pip install Pygments -``` - -4. Correctly configured editor (minted and tikz need shell escape). - -5. `latexindent` for code formatting - -6. [draw.io](https://app.diagrams.net/) for diagrams. This can also be downloaded. - -### My Setup -I am editing on windows 11. -1. Tex Distribution is [MikTex](https://miktex.org/). -2. Inkscape 0.92.4 installed from, their website. `C:\Program Files\Inkscape` added to `Path`. -3. Python 3.10.7 installed with Pip 22.2.2. Pygments 2.13.0 installed. -5. I use wsl as my default terminal, so I run latexindent from there as part of texlive. -```bash -sudo apt install texlive-extra-utils -``` -4. I edit using VSCode using the [Latex Workshop extension](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop). To allow shell escape I have added: -```json -{ - ... - - "latex-workshop.latex.tools": [ - { - "name": "latexmk", - "command": "latexmk", - "args": [ - "-shell-escape", // Shell Escape enabled! - "-synctex=1", - "-interaction=nonstopmode", - "-file-line-error", - "-pdf", - "-outdir=%OUTDIR%", - "%DOC%" - ], - "env": {} - }, - ... - ], - ... -} -``` +## [I want to contribute!](./.github/CONTRIBUTING.md) ## I've found a mistake! Simply [add a new issue](https://github.com/OliverKillane/Imperial-Computing-Year-3-Notes/issues/new/choose) and attach the relevant labels. ![Screenshot 2022-10-09 015053](https://user-images.githubusercontent.com/44177991/194732526-54cca108-9fa7-4b0e-a4af-b0baad625af9.png) -## I want to contribute! -Fork the repository and create a [pull request](https://github.com/OliverKillane/Imperial-Computing-Year-3-Notes/pulls). -- I will review as soon as I can -- PRs need to be formatted correctly (using latexindent) -- If there are merge conflicts, rebase! -- PDFs need to be rebuilt. From e507e3fedaebbdd3c8e7366d19906cd9974bb746 Mon Sep 17 00:00:00 2001 From: Oliver Killane Date: Thu, 28 Sep 2023 00:38:42 +0100 Subject: [PATCH 5/5] using devcontainer common utils --- .devcontainer/Dockerfile | 6 +++--- .devcontainer/devcontainer.json | 5 +++++ .github/workflows/push-dev-image.yaml | 5 ++++- README.md | 5 ----- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 352617d..7757217 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:latest +FROM debian:bookworm-slim # Install basic packages @@ -22,8 +22,8 @@ RUN tlmgr update --self --all RUN tlmgr install latexindent chktex # install inkscape (for tikz) and minted (for code highlighting) -RUN apt-get install -qy inkscape python3 python3-pip -RUN pip install pygments +RUN apt-get install -qy inkscape python3 python3-pip pipx +RUN pipx install pygments # C++ # Already installed GCC as part of build-essential diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 86043aa..789d354 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,10 @@ { "image": "ghcr.io/oliverkillane/imperial-computing-notes-dev", + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "version": "latest" + } + }, "customizations": { "vscode": { "settings": { diff --git a/.github/workflows/push-dev-image.yaml b/.github/workflows/push-dev-image.yaml index 2ca2b98..fa5f51e 100644 --- a/.github/workflows/push-dev-image.yaml +++ b/.github/workflows/push-dev-image.yaml @@ -5,7 +5,7 @@ on: branches: - enh/development-docker paths: - - '.devcontainer/**' + - '.devcontainer/Dockerfile' jobs: docker: @@ -13,6 +13,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + sparse-checkout: .devcontainer/Dockerfile + sparse-checkout-cone-mode: false - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Enrich Metadata diff --git a/README.md b/README.md index e89ad3d..9a35cb8 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,3 @@ It is designed as an improvement in quality over the [second year repo](https:// ## How do I build this? ## [I want to contribute!](./.github/CONTRIBUTING.md) -## I've found a mistake! -Simply [add a new issue](https://github.com/OliverKillane/Imperial-Computing-Year-3-Notes/issues/new/choose) and attach the relevant labels. - -![Screenshot 2022-10-09 015053](https://user-images.githubusercontent.com/44177991/194732526-54cca108-9fa7-4b0e-a4af-b0baad625af9.png) -