Skip to content

Commit a10b040

Browse files
committed
final release
0 parents  commit a10b040

40 files changed

+5409
-0
lines changed

.cursor/rules/always-use-uv.mdc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
description:
3+
globs:
4+
alwaysApply: false
5+
---
6+
When installing any new package prefer using uv over pip and conda

.devcontainer/.p10k.zsh

Lines changed: 1718 additions & 0 deletions
Large diffs are not rendered by default.

.devcontainer/.zshrc

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
2+
# Initialization code that may require console input (password prompts, [y/n]
3+
# confirmations, etc.) must go above this block; everything else may go below.
4+
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
5+
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
6+
fi
7+
8+
# If you come from bash you might have to change your $PATH.
9+
# export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
10+
11+
# Path to your Oh My Zsh installation.
12+
export ZSH="$HOME/.oh-my-zsh"
13+
14+
# Set name of the theme to load --- if set to "random", it will
15+
# load a random theme each time Oh My Zsh is loaded, in which case,
16+
# to know which specific one was loaded, run: echo $RANDOM_THEME
17+
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
18+
ZSH_THEME="powerlevel10k/powerlevel10k"
19+
20+
# Set list of themes to pick from when loading at random
21+
# Setting this variable when ZSH_THEME=random will cause zsh to load
22+
# a theme from this variable instead of looking in $ZSH/themes/
23+
# If set to an empty array, this variable will have no effect.
24+
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
25+
26+
# Uncomment the following line to use case-sensitive completion.
27+
# CASE_SENSITIVE="true"
28+
29+
# Uncomment the following line to use hyphen-insensitive completion.
30+
# Case-sensitive completion must be off. _ and - will be interchangeable.
31+
# HYPHEN_INSENSITIVE="true"
32+
33+
# Uncomment one of the following lines to change the auto-update behavior
34+
# zstyle ':omz:update' mode disabled # disable automatic updates
35+
# zstyle ':omz:update' mode auto # update automatically without asking
36+
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
37+
38+
# Uncomment the following line to change how often to auto-update (in days).
39+
# zstyle ':omz:update' frequency 13
40+
41+
# Uncomment the following line if pasting URLs and other text is messed up.
42+
# DISABLE_MAGIC_FUNCTIONS="true"
43+
44+
# Uncomment the following line to disable colors in ls.
45+
# DISABLE_LS_COLORS="true"
46+
47+
# Uncomment the following line to disable auto-setting terminal title.
48+
# DISABLE_AUTO_TITLE="true"
49+
50+
# Uncomment the following line to enable command auto-correction.
51+
# ENABLE_CORRECTION="true"
52+
53+
# Uncomment the following line to display red dots whilst waiting for completion.
54+
# You can also set it to another string to have that shown instead of the default red dots.
55+
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
56+
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
57+
# COMPLETION_WAITING_DOTS="true"
58+
59+
# Uncomment the following line if you want to disable marking untracked files
60+
# under VCS as dirty. This makes repository status check for large repositories
61+
# much, much faster.
62+
# DISABLE_UNTRACKED_FILES_DIRTY="true"
63+
64+
# Uncomment the following line if you want to change the command execution time
65+
# stamp shown in the history command output.
66+
# You can set one of the optional three formats:
67+
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
68+
# or set a custom format using the strftime function format specifications,
69+
# see 'man strftime' for details.
70+
# HIST_STAMPS="mm/dd/yyyy"
71+
72+
# Would you like to use another custom folder than $ZSH/custom?
73+
# ZSH_CUSTOM=/path/to/new-custom-folder
74+
75+
# Which plugins would you like to load?
76+
# Standard plugins can be found in $ZSH/plugins/
77+
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
78+
# Example format: plugins=(rails git textmate ruby lighthouse)
79+
# Add wisely, as too many plugins slow down shell startup.
80+
plugins=(git sudo history encode64 copypath zsh-autosuggestions zsh-syntax-highlighting)
81+
82+
source $ZSH/oh-my-zsh.sh
83+
84+
# User configuration
85+
86+
# export MANPATH="/usr/local/man:$MANPATH"
87+
88+
# You may need to manually set your language environment
89+
# export LANG=en_US.UTF-8
90+
91+
# Preferred editor for local and remote sessions
92+
# if [[ -n $SSH_CONNECTION ]]; then
93+
# export EDITOR='vim'
94+
# else
95+
# export EDITOR='nvim'
96+
# fi
97+
98+
# Compilation flags
99+
# export ARCHFLAGS="-arch $(uname -m)"
100+
101+
# Set personal aliases, overriding those provided by Oh My Zsh libs,
102+
# plugins, and themes. Aliases can be placed here, though Oh My Zsh
103+
# users are encouraged to define aliases within a top-level file in
104+
# the $ZSH_CUSTOM folder, with .zsh extension. Examples:
105+
# - $ZSH_CUSTOM/aliases.zsh
106+
# - $ZSH_CUSTOM/macos.zsh
107+
# For a full list of active aliases, run `alias`.
108+
#
109+
# Example aliases
110+
# alias zshconfig="mate ~/.zshrc"
111+
# alias ohmyzsh="mate ~/.oh-my-zsh"
112+
113+
# Custom aliases
114+
alias j="just"
115+
jf() {just | grep "$1";}
116+
alias python=/home/appuser/app/.venv/bin/python
117+
alias python3=/home/appuser/app/.venv/bin/python3
118+
119+
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
120+
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
121+
122+
# . "$HOME/.local/bin/env"
123+
124+
# nvm
125+
export NVM_DIR="$HOME/.nvm"
126+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
127+
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
128+
129+
# Check if DOTENV_FILE is set and the file exists
130+
if [[ -n "$DOTENV_FILE" && -f "$DOTENV_FILE" ]]; then
131+
# Export each non-comment, non-empty line as environment variable
132+
export $(grep -v '^#' "$DOTENV_FILE" | grep -v '^$' | xargs)
133+
fi
134+
135+
# adding history config
136+
HISTSIZE=10000
137+
SAVEHIST=10000
138+
HISTFILE=$HOME/commandhistory/.zsh_history

.devcontainer/devcontainer.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"name": "Learn Simple Regular Expressions",
3+
"dockerComposeFile": "../docker-compose.yml",
4+
"service": "dev_service",
5+
"workspaceFolder": "/home/appuser/app",
6+
"customizations": {
7+
"vscode": {
8+
"settings": {
9+
"terminal.integrated.defaultProfile.linux": "zsh",
10+
"terminal.integrated.fontFamily": "MesloLGS Nerd Font Mono"
11+
},
12+
"extensions": [
13+
// ide
14+
"ms-azuretools.vscode-docker",
15+
"aaron-bond.better-comments",
16+
"njpwerner.autodocstring",
17+
"eamodio.gitlens",
18+
"formulahendry.code-runner",
19+
"christian-kohler.path-intellisense",
20+
// language
21+
"ms-python.python",
22+
"ms-python.vscode-pylance",
23+
"ms-toolsai.jupyter",
24+
"tamasfe.even-better-toml",
25+
"marimo-team.vscode-marimo",
26+
// code quality
27+
"charliermarsh.ruff",
28+
"streetsidesoftware.code-spell-checker",
29+
"davidanson.vscode-markdownlint",
30+
// github actions
31+
"github.vscode-github-actions",
32+
// file helpers
33+
"george-alisson.html-preview-vscode",
34+
"tomoki1207.pdf"
35+
]
36+
}
37+
},
38+
"remoteUser": "appuser",
39+
40+
"forwardPorts": [],
41+
"postCreateCommand": "bash ./.devcontainer/post-create.sh",
42+
"mounts": [
43+
"source=zsh-history-learn-simple-regular-expressions-project,target=/home/appuser/commandhistory,type=volume",
44+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh,target=/home/appuser/.ssh,type=bind,consistency=cached",
45+
"source=${localEnv:SSH_AUTH_SOCK},target=/ssh-agent,type=bind"
46+
],
47+
"remoteEnv": {
48+
"SSH_AUTH_SOCK": "/ssh-agent"
49+
}
50+
}

.devcontainer/post-create.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Setup git configuration
2+
git config --global user.name "Rohit Gupta"
3+
git config --global user.email "[email protected]"
4+
git config --global push.default current
5+
git config --global safe.directory /home/appuser/app
6+
7+
# add commit signing
8+
git config --global gpg.format ssh
9+
git config --global user.signingkey ~/.ssh/id_ed25519.pub
10+
git config --global commit.gpgsign true
11+
12+
sudo chown -R appuser:appuser /home/appuser/commandhistory
13+
14+
# install project dependencies
15+
uv sync --all-groups

.dockerignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Git
2+
.git
3+
.gitignore
4+
5+
# Python-generated files
6+
__pycache__/
7+
*.py[oc]
8+
build/
9+
dist/
10+
wheels/
11+
.ruff_cache/
12+
*.egg-info
13+
.coverage
14+
15+
# Virtual environments
16+
.venv
17+
18+
# macos
19+
.DS_Store
20+
21+
# Project files
22+
outputs
23+
logs
24+
scratchpad
25+
data
26+
.ruff_cache
27+
.pytest_cache
28+
htmlcov
29+
.coverage

.env.example

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# id -u
2+
APP_UID=
3+
4+
# id -g
5+
APP_GID=
6+
7+
# my_secret
8+
MY_SECRET=
9+
10+
# github pr token https://github.com/settings/personal-access-tokens
11+
# use https://github.com/settings/personal-access-tokens/7742939 as base
12+
GH_TOKEN=
13+
14+
# pypi token https://pypi.org/manage/account/token/
15+
UV_PUBLISH_TOKEN=
16+
17+
# LIVE_SERVER_PORT
18+
LIVE_SERVER_PORT=

.github/actions/setup/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
runs:
2+
using: composite
3+
steps:
4+
- name: "Install UV"
5+
uses: astral-sh/setup-uv@v4

.github/copilot-instructions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
1. When installing any new package prefer using uv over pip and conda
2+
2. When running any python commands, if you don't find something installed activate the python environment first.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Release to PyPI"]
6+
types:
7+
- completed
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
18+
19+
jobs:
20+
deploy-docs:
21+
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
22+
environment:
23+
name: "github-pages"
24+
url: ${{ steps.deployment.outputs.page_url }}
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- name: Checkout Code
29+
uses: actions/checkout@v4
30+
31+
- name: Setup UV
32+
uses: astral-sh/setup-uv@v6
33+
34+
- name: Install Dependencies
35+
run: uv sync --no-dev --locked --group docs
36+
37+
- name: Build Documentation
38+
run: uv run --no-sync mkdocs build --strict
39+
40+
- name: Setup Pages
41+
uses: actions/configure-pages@v5
42+
43+
- name: Upload Pages Artifact
44+
uses: actions/upload-pages-artifact@v3
45+
with:
46+
path: ./site
47+
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)