Skip to content

Commit

Permalink
add devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
NKeleher committed Jul 19, 2024
1 parent ab35b73 commit ed81492
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 10 deletions.
36 changes: 36 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "Ubuntu",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {},
"ghcr.io/guiyomh/features/just:0": {},
"ghcr.io/schlich/devcontainer-features/rye:1": {}
},

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [4000],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "quarto check && just sync",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"quarto.quarto",
// "REditorSupport.r",
"ms-python.python",
"skellock.just"
]
}
},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
"remoteUser": "vscode"
}
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# docs: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
Expand All @@ -14,3 +19,7 @@ updates:
interval: "weekly"
commit-message:
prefix: "chore(actions)"
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ repos:
stages: [commit]
- id: check-json
stages: [commit]
exclude: ^\.devcontainer/devcontainer\.json$
- id: check-toml
stages: [commit]
- id: check-merge-conflict
Expand Down
19 changes: 11 additions & 8 deletions Justfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Set the shell to use
# set shell := ["nu", "-c"]

# Set shell for Windows

set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]

# Set path to virtual environment's python

python_dir := ".venv/Scripts"
python := python_dir + if os_family() == "windows" { "/python.exe" } else { "/python3" }

Expand All @@ -19,11 +20,12 @@ system-info:
get-started: pre-install venv

# sync python virtual environment with requirements.lock
venv:
sync:
rye sync
rye run pre-commit install

# Preview the handbook
venv: sync
rye run pre-commit install# Preview the handbook

preview-docs:
quarto preview

Expand All @@ -34,6 +36,7 @@ build-docs:
# Lint python code
lint-py:
rye lint

# Format python code
fmt-py:
rye fmt
Expand All @@ -48,7 +51,7 @@ fmt-markdown:

# Format a single markdown file, "f"
fmt-md f:
rye run mdformat {{f}}
rye run mdformat {{ f }}

# Check format of all markdown files
fmt-check-markdown:
Expand All @@ -62,10 +65,10 @@ pre-install:

[linux]
pre-install:
quarto_version := "1.4.554"
quarto_version := "1.5.54"
brew install just rye gh
curl -sfL https://github.com/quarto-dev/quarto-cli/releases/download/v{{quarto_version}}/quarto-{{quarto_version}}-linux-amd64.deb | sudo apt install ./quarto-{{quarto_version}}-linux-amd64.deb
rm quarto-{{quarto_version}}-linux-amd64.deb
curl -sfL https://github.com/quarto-dev/quarto-cli/releases/download/v1.5.54/quarto-1.5.54-linux-amd64.deb | sudo apt install ./quarto-1.5.54-linux-amd64.deb
rm quarto-1.5.54-linux-amd64.deb

[macos]
pre-install:
Expand Down
4 changes: 2 additions & 2 deletions docs/assets/style_ipa.css
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
--bs-dark-border-subtle: #bbb;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-font-sans-serif: Arial, Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
--bs-font-sans-serif: Roboto, Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
--bs-body-font-family: var(--bs-font-sans-serif);
Expand Down Expand Up @@ -260,7 +260,7 @@ h6, .h6, h5, .h5, h4, .h4, h3, .h3, h2, .h2, h1, .h1 {
}

h1, .h1 {
font-family: "Georgia Regular";
font-family: "Roboto";
font-size: calc(1.375rem + 1.5vw);
}
@media (min-width: 1200px) {
Expand Down

0 comments on commit ed81492

Please sign in to comment.