Skip to content

Commit 7522c2d

Browse files
oasaph[bot]flaggle-bot[bot]
authored
feat: Overhaul documentation and add advanced usage sections (#25)
* feat: Overhaul documentation and add advanced usage sections - Added advanced usage documentation covering custom flag types, dynamic flags, environment-based flags, user-based flags, feature rollouts, and best practices. - Introduced comprehensive API references for Flag and Flaggle classes. - Created changelog to document notable changes and releases. - Enhanced configuration documentation with examples for environment variables and configuration files. - Expanded contributing guidelines to encourage community involvement and maintain code quality. - Developed FAQ section addressing common questions and troubleshooting tips. - Implemented integration guides for FastAPI, Flask, Django, Typer, and other environments. - Added support for MkDocs with various plugins for improved documentation experience. - Included license information under MIT License. - Established supported operations documentation detailing flag management and JSON schema for flags endpoint. * [skip ci] 🔖 Bump version -> 0.4.0 * 👷 chore(workflows): change runner to self-hosted for build jobs * 🚸 feat(devcontainer): set up Dockerfile and configuration for Python environment * 👷 feat(release): implement pre-release versioning and promotion workflow * 🐛 fix(version): update version to 0.4.0a0 for pre-release * [skip ci] 🔖 Bump version 0.4.0a0 -> 0.4.0a1 * 👷 feat(workflow): enhance release process with version bump and PR creation * [skip ci] 🔖 Bump version 0.4.0a1 -> 0.4.0a2 * 💚 chore(workflow): update paths-ignore to include wildcard for directories * 💚 fix(workflow): standardize paths-ignore formatting in workflow file * 💚 fix(workflow): update paths for push and pull_request triggers * 💚 fix(workflow): update paths-ignore to prevent triggering on specific files --------- Co-authored-by: [bot] <+[bot]@users.noreply.github.com> Co-authored-by: flaggle-bot[bot] <+flaggle-bot[bot]@users.noreply.github.com>
1 parent 5d04440 commit 7522c2d

29 files changed

Lines changed: 2140 additions & 35 deletions

.devcontainer/Dockerfile

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
FROM mcr.microsoft.com/devcontainers/base:jammy
2+
# FROM mcr.microsoft.com/devcontainers/base:jammy
3+
4+
ARG DEBIAN_FRONTEND=noninteractive
5+
ARG USER=vscode
6+
7+
RUN DEBIAN_FRONTEND=noninteractive \
8+
&& apt-get update \
9+
&& apt-get install -y build-essential --no-install-recommends \
10+
bat \
11+
bison \
12+
bsdmainutils \
13+
build-essential \
14+
ca-certificates \
15+
cmake \
16+
curl \
17+
file \
18+
gcc \
19+
git \
20+
iputils-ping \
21+
jq \
22+
libbz2-dev \
23+
libedit-dev \
24+
libffi-dev \
25+
liblzma-dev \
26+
libncurses-dev \
27+
libncurses5-dev \
28+
libncursesw5-dev \
29+
libreadline-dev \
30+
libsqlite3-dev \
31+
libssl-dev \
32+
libxml2-dev \
33+
libxmlsec1-dev \
34+
llvm \
35+
make \
36+
nala \
37+
net-tools \
38+
pipx \
39+
procps \
40+
software-properties-common \
41+
telnet \
42+
tk-dev \
43+
tzdata \
44+
unzip \
45+
vim \
46+
wget \
47+
xz-utils \
48+
zlib1g-dev
49+
50+
# Install yq
51+
ENV YQ_VERSION="v4.47.1"
52+
RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 \
53+
&& chmod +x /usr/local/bin/yq
54+
55+
# Run setup eza script
56+
COPY scripts/setup-eza.sh /tmp/setup-eza.sh
57+
RUN chmod +x /tmp/setup-eza.sh && /tmp/setup-eza.sh
58+
59+
# Run setup fnm script
60+
COPY scripts/setup-fnm.sh /tmp/setup-fnm.sh
61+
RUN chmod +x /tmp/setup-fnm.sh && /tmp/setup-fnm.sh
62+
63+
# Python and poetry installation
64+
USER $USER
65+
ARG HOME="/home/$USER"
66+
ARG PYTHON_VERSION=3.9
67+
# ARG PYTHON_VERSION=3.10
68+
69+
ENV PYENV_ROOT="${HOME}/.pyenv"
70+
ENV PATH="${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${HOME}/.local/bin:$PATH"
71+
72+
COPY ./dotfiles/ /tmp/setup/
73+
74+
RUN <<"EOT" bash
75+
set -eux
76+
77+
# Create Symbolic Links
78+
sudo mkdir -p /opt/certs /opt/Documents /opt/Downloads /opt/.ssh
79+
sudo ln -sf /opt/Documents ~/Documents
80+
sudo ln -sf /opt/Downloads ~/Downloads
81+
EOT
82+
83+
RUN <<"EOT" bash
84+
set -eux
85+
86+
### Setup shell
87+
sudo cp -r /tmp/setup/. ~/
88+
sudo chown -R ${USER}:${USER} ~/.
89+
EOT
90+
91+
RUN echo "done 0" \
92+
&& curl https://pyenv.run | bash \
93+
&& echo "done 1" \
94+
&& pyenv install ${PYTHON_VERSION} \
95+
&& echo "done 2" \
96+
&& pyenv global ${PYTHON_VERSION} \
97+
&& echo "done 3" \
98+
&& curl -sSL https://install.python-poetry.org | python3 - \
99+
&& poetry config virtualenvs.in-project true

.devcontainer/devcontainer.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"name": "poetry3-poetry-pyenv",
3+
"build": {
4+
"dockerfile": "Dockerfile"
5+
},
6+
// 👇 Features to add to the Dev Container. More info: https://containers.dev/implementors/features.
7+
// "features": {},
8+
// 👇 Use 'forwardPorts' to make a list of ports inside the container available locally.
9+
// "forwardPorts": [],
10+
// 👇 Use 'postCreateCommand' to run commands after the container is created.
11+
// "postCreateCommand": "bash .devcontainer/scripts/setup-dependencies.sh",
12+
// 👇 Configure tool-specific properties.
13+
"customizations": {
14+
"vscode": {
15+
"extensions": [
16+
"ms-python.python",
17+
"njpwerner.autodocstring",
18+
"seatonjiang.gitmoji-vscode",
19+
"redhat.vscode-yaml",
20+
"GitHub.vscode-github-actions",
21+
"GitHub.vscode-pull-request-github",
22+
"GitHub.copilot-chat",
23+
"GitHub.copilot"
24+
]
25+
}
26+
},
27+
"features": {
28+
"ghcr.io/devcontainers-community/npm-features/prettier:1": {
29+
"version": "latest"
30+
},
31+
"ghcr.io/schlich/devcontainer-features/powerlevel10k:1": {},
32+
"ghcr.io/nils-geistmann/devcontainers-features/zsh:0": {
33+
"setLocale": true,
34+
"theme": "agnoster",
35+
"plugins": "git docker sudo python poetry eza aliases",
36+
"desiredLocale": "en_US.UTF-8 UTF-8"
37+
},
38+
"ghcr.io/devcontainers-extra/features/zsh-plugins:0": {
39+
"plugins": "ssh-agent npm",
40+
"omzPlugins": "https://github.com/zsh-users/zsh-autosuggestions",
41+
"username": "vscode"
42+
},
43+
"ghcr.io/braun-daniel/devcontainer-features/fzf:1": {}
44+
}
45+
// 👇 Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
46+
// "remoteUser": "root"
47+
}

.devcontainer/dotfiles/.aliases

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
alias zrld="source ~/.zshrc"
2+
alias zcfg="$EDITOR ~/.zshrc && zrld"

.devcontainer/dotfiles/.zplugins

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# shellcheck disable=SC2148
2+
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
3+
[ ! -d $ZINIT_HOME ] && mkdir -p "$(dirname $ZINIT_HOME)"
4+
[ ! -d $ZINIT_HOME/.git ] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
5+
source "${ZINIT_HOME}/zinit.zsh"
6+
7+
# source ~/.zplugins
8+
# Load starship theme
9+
# line 1: `starship` binary as command, from github release
10+
# line 2: starship setup at clone(create init.zsh, completion)
11+
# line 3: pull behavior same as clone, source init.zsh
12+
zinit ice as"command" from"gh-r" \
13+
atclone"./starship init zsh > init.zsh; ./starship completions zsh > _starship" \
14+
atpull"%atclone" src"init.zsh"
15+
zinit light starship/starship
16+
17+
# Binary release in archive, from GitHub-releases page.
18+
# After automatic unpacking it provides program "fzf".
19+
zi ice from"gh-r" as"program"
20+
zi light junegunn/fzf
21+
22+
# Vim repository on GitHub – a typical source code that needs compilation – Zinit
23+
# can manage it for you if you like, run `./configure` and other `make`, etc.
24+
# Ice-mod `pick` selects a binary program to add to $PATH. You could also install the
25+
# package under the path $ZPFX, see: https://zdharma-continuum.github.io/zinit/wiki/Compiling-programs
26+
# zi ice \
27+
# as"program" \
28+
# atclone"rm -f src/auto/config.cache; ./configure" \
29+
# atpull"%atclone" \
30+
# make \
31+
# pick"src/vim"
32+
# zi light vim/vim
33+
34+
zi light Aloxaf/fzf-tab
35+
zi light lincheney/fzf-tab-completion
36+
zi light ahmetb/kubectl-aliases
37+
zi light Freed-Wu/fzf-tab-source
38+
39+
zi snippet OMZP::git
40+
zi snippet OMZP::sudo
41+
zi snippet OMZP::poetry
42+
zi snippet OMZP::eza
43+
zi snippet OMZP::dotenv
44+
zi snippet OMZP::colorize
45+
zi snippet OMZP::aliases
46+
47+
48+
### fzf-tab
49+
50+
export LESSOPEN='|~/.lesspipe.sh %s'
51+
52+
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'eza -1 --color=always $realpath'
53+
# shellcheck disable=SC2086
54+
# shellcheck disable=SC2296
55+
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
56+
zstyle ':fzf-tab:*' fzf-command ftb-tmux-popup
57+
zstyle ':fzf-tab:*' fzf-bindings 'ctrl-j:accept' 'ctrl-a:toggle-all'
58+
59+
zstyle ':fzf-tab:complete:*:*' fzf-flags --preview-window=right,60% --height=70% --border=double
60+
zstyle ':completion:*:descriptions' format '[%d]'

.devcontainer/dotfiles/.zshrc

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
source ~/.zplugins
2+
3+
export EDITOR='vim'
4+
export KUBE_EDITOR='code -w'
5+
source ~/.aliases
6+
bindkey -e
7+
bindkey "^[[1;5C" forward-word
8+
bindkey "^[[1;5D" backward-word
9+
10+
### Brew
11+
12+
export HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew";
13+
export HOMEBREW_CELLAR="/home/linuxbrew/.linuxbrew/Cellar";
14+
export HOMEBREW_REPOSITORY="/home/linuxbrew/.linuxbrew/Homebrew";
15+
export PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin${PATH+:$PATH}";
16+
export MANPATH="/home/linuxbrew/.linuxbrew/share/man${MANPATH+:$MANPATH}:";
17+
export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:${INFOPATH:-}";
18+
19+
### Starship
20+
21+
eval "$(starship init zsh)"
22+
23+
### fnm
24+
25+
FNM_PATH="/home/vscode/.local/share/fnm"
26+
if [ -d "$FNM_PATH" ]; then
27+
export PATH="$FNM_PATH:$PATH"
28+
eval "`fnm env`"
29+
fi
30+
31+
### Pipx
32+
33+
export PATH="$PATH:/home/user/.local/bin"
34+
35+
### Pyenv
36+
37+
export PYENV_ROOT="$HOME/.pyenv"
38+
export PATH="$PYENV_ROOT/bin:$PATH"
39+
eval "$(pyenv init --path)"

.devcontainer/scripts/setup-eza.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
sudo apt update
4+
sudo apt install -y gpg
5+
sudo mkdir -p /etc/apt/keyrings
6+
wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | sudo gpg --dearmor -o /etc/apt/keyrings/gierens.gpg
7+
echo "deb [signed-by=/etc/apt/keyrings/gierens.gpg] http://deb.gierens.de stable main" | sudo tee /etc/apt/sources.list.d/gierens.list
8+
sudo chmod 644 /etc/apt/keyrings/gierens.gpg /etc/apt/sources.list.d/gierens.list
9+
sudo apt update
10+
sudo apt install -y eza

.devcontainer/scripts/setup-fnm.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
curl -fsSL https://fnm.vercel.app/install | bash

0 commit comments

Comments
 (0)