Merge pull request #33 from andrejusk/feat/next

Feat/next
This commit is contained in:
Andrejus Kostarevas
2024-03-11 00:22:27 +00:00
committed by GitHub
52 changed files with 2466 additions and 683 deletions

View File

@@ -1,9 +1,3 @@
.gitignore .gitignore
.dockerignore .dockerignore
Dockerfile Dockerfile
**/plugged
**/completions
**/conf.d
**/fish_variables
**/functions

View File

@@ -10,4 +10,4 @@ jobs:
# Run the tests # Run the tests
- name: 'Run tests' - name: 'Run tests'
run: ./tools/test run: ./script/test

3
.gitignore vendored
View File

@@ -1,3 +1,6 @@
# ide
.vscode
# install artefacts # install artefacts
tmp tmp
temp temp

View File

@@ -1,30 +1,34 @@
# #
# debian-base: Base Debian image with sudo user # debian-base: Base Debian image with sudo user
# #
FROM debian:bullseye AS debian-base FROM debian:bookworm-slim AS base
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -qq update RUN apt-get -qq update
RUN apt-get -qq install --no-install-recommends \ RUN apt-get -qq install --no-install-recommends \
curl \
gnupg \
gnupg2 \
openssh-client \
software-properties-common \ software-properties-common \
wget \ lsb-release \
sudo sudo \
wget
# Create user with sudo priviledge # Create user with sudo priviledge
RUN useradd -r -u 1001 --create-home -m "test-user" RUN useradd -r -u 1001 --create-home -m "test-user"
RUN adduser "test-user" sudo
RUN echo "test-user ALL=(ALL) NOPASSWD: ALL" \ RUN echo "test-user ALL=(ALL) NOPASSWD: ALL" \
>>/etc/sudoers >>/etc/sudoers
# #
# source: Base image with source copied over # source: Base image with source copied over
# #
FROM debian-base AS source FROM base AS source
ARG DOTFILES_DIR="/home/test-user/.dotfiles" ARG DOTFILES_DIR="/workdir/.dotfiles"
RUN mkdir ${DOTFILES_DIR} RUN mkdir -p "$DOTFILES_DIR"
RUN chown test-user ${DOTFILES_DIR} RUN chown -R "test-user" "$DOTFILES_DIR"
ADD --chown="test-user" files "$DOTFILES_DIR/files" ADD --chown="test-user" files "$DOTFILES_DIR/files"
ADD --chown="test-user" script "$DOTFILES_DIR/script" ADD --chown="test-user" script "$DOTFILES_DIR/script"
@@ -36,8 +40,12 @@ WORKDIR "$DOTFILES_DIR"
# #
FROM source AS install FROM source AS install
ENV USER="test-user"
ENV SKIP_SUDO_CHECK "true"
ENV SKIP_SSH_CONFIG "true"
ENV SKIP_DOCKER_CONFIG "true"
USER test-user USER test-user
ENV USER=test-user
ARG UUID="docker" ARG UUID="docker"
RUN ./script/install RUN ./script/install
@@ -48,5 +56,5 @@ RUN ./script/install
FROM install AS test FROM install AS test
ADD --chown="test-user" tests "$DOTFILES_DIR/tests" ADD --chown="test-user" tests "$DOTFILES_DIR/tests"
WORKDIR "${DOTFILES_DIR}/tests" WORKDIR "$DOTFILES_DIR/tests"
ENTRYPOINT [ "./run.sh" ] ENTRYPOINT [ "./run.sh" ]

View File

@@ -1,9 +1,10 @@
# andrejusk/dotfiles # andrejusk/dotfiles
[![Dotfiles CI](https://github.com/andrejusk/dotfiles/actions/workflows/ci.yml/badge.svg)](https://github.com/andrejusk/dotfiles/actions/workflows/ci.yml) [![Dotfiles CI status badge](https://github.com/andrejusk/dotfiles/actions/workflows/ci.yml/badge.svg)](https://github.com/andrejusk/dotfiles/actions/workflows/ci.yml)
My collection of dotfiles and install scripts A collection of dotfiles and install scripts
to set up reproducible dev environments to set up my development environment
🛠️ 📂️ 🚀
## Usage ## Usage
@@ -11,39 +12,13 @@ A local repository can be installed by running:
./script/install ./script/install
### Automated install ### Automated setup
This repository can be installed without a local copy This repository can be installed without a local copy
by invoking the `setup` script directly via `curl`: by invoking the `setup-new` script directly via `curl`:
# Inspect source # Inspect source
curl -s https://raw.githubusercontent.com/andrejusk/dotfiles/HEAD/script/setup | less curl -s https://raw.githubusercontent.com/andrejusk/dotfiles/HEAD/script/setup-new | less
# Run # Run
curl -s https://raw.githubusercontent.com/andrejusk/dotfiles/HEAD/script/setup | bash curl -s https://raw.githubusercontent.com/andrejusk/dotfiles/HEAD/script/setup-new | bash
## Features
My dotfiles include configuration for the following tools:
### Shell
- 🐟 fish (+ fisher)
### Editor
- vscode
### Languages
- node.js (nvm, yarn)
- python (pyenv, poetry)
### Tools
- git, gh
- docker
- terraform (+ ls)
- gcloud, firebase, awscli
- redis cli
- kubectl

View File

@@ -1,3 +0,0 @@
completions
conf.d
fish_variables

View File

@@ -1,19 +0,0 @@
# Only execute in interactive shell
if status is-interactive
# Fish specific
set fish_greeting
set --global hydro_symbol_prompt "\$"
set --global hydro_symbol_git_dirty "~"
if type -q base16-seti
base16-seti
end
# Cross-shell setup
if begin; test -e $HOME/.profile; and type -q replay; end
replay "source $HOME/.profile"
end
pyenv init - | source
end

View File

@@ -1,7 +0,0 @@
jethrokuan/z
jorgebucaran/hydro
jorgebucaran/replay.fish
joseluisq/gitnow
tomyun/base16-fish
PatrickF1/fzf.fish
jorgebucaran/fisher

View File

@@ -1,6 +0,0 @@
# Ignore all
**/*
!.gitignore
# Keep custom functions
!nvm.fish

View File

@@ -1,3 +0,0 @@
function nvm
replay source $NVM_DIR/nvm.sh ';' nvm $argv
end

View File

@@ -3,3 +3,4 @@ Host *
UseKeychain yes UseKeychain yes
AddKeysToAgent yes AddKeysToAgent yes
IdentityFile ~/.ssh/id_ed25519 IdentityFile ~/.ssh/id_ed25519

View File

@@ -1,6 +1,6 @@
# Load .profile, containing login, non-bash related initializations. # Load .profile, containing login, non-bash related initializations.
[ -f "$HOME/.profile" ] && source "$HOME/.profile" [ -f "$HOME/.profile" ] && source "$HOME/.profile"
export NVM_DIR="$HOME/.nvm" export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion

View File

@@ -1,6 +1,6 @@
[user] [user]
name = Andrejus name = Andrejus
email = hi@andrejus.uk email = git@andrejus.uk
[alias] [alias]
# List aliases # List aliases

View File

@@ -1 +0,0 @@
node_modules

1738
files/home/.p10k.zsh Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -10,47 +10,70 @@
# xdg data & config # xdg data & config
export XDG_DATA_HOME=${XDG_DATA_HOME:-"$HOME/.local/share"} export XDG_DATA_HOME=${XDG_DATA_HOME:-"$HOME/.local/share"}
mkdir -p "$XDG_DATA_HOME" mkdir -p "$XDG_DATA_HOME"
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-"$HOME/.config"} export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-"$HOME/.config"}
mkdir -p "$XDG_CONFIG_HOME" mkdir -p "$XDG_CONFIG_HOME"
export PATH="$HOME/.local/bin:$PATH" # local user binaries
local_bin_path="$HOME/.local/bin"
if [[ ":$PATH:" != *":$local_bin_path:"* ]]; then
export PATH="$local_bin_path:$PATH"
fi
mkdir -p ~/.local/bin mkdir -p ~/.local/bin
unset local_bin_path
# homebrew
brew_path="/opt/homebrew/bin/brew"
if [ -x "$brew_path" ]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
unset brew_path
# workspace # workspace
export WORKSPACE=${WORKSPACE:-"$HOME/workspace"} export WORKSPACE=${WORKSPACE:-"$HOME/Workspace"}
mkdir -p "$WORKSPACE" mkdir -p "$WORKSPACE"
# dotfiles # dotfiles
export DOTFILES=${DOTFILES:-"$HOME/.dotfiles"} export DOTFILES=${DOTFILES:-"$HOME/.dotfiles"}
# nvm # nvm
if [ -z "$NVM_DIR" ]; then if [ -z "$NVM_DIR" ]; then
export NVM_DIR=${NVM_DIR:-"$HOME/.nvm"} export NVM_DIR=${NVM_DIR:-"$HOME/.nvm"}
mkdir -p "$NVM_DIR" mkdir -p "$NVM_DIR"
[ -f "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
fi fi
[ -f "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
# node (default v14) # node (default v20 "iron" LTS version)
node_alias="$NVM_DIR/alias/lts/fermium" node_alias="$NVM_DIR/alias/lts/iron"
if [ -f "$node_alias" ]; then if [ -f "$node_alias" ]; then
VERSION=`cat $node_alias` VERSION=`cat $node_alias`
if [ -x `command -v nvm` ]; then
nvm install "$VERSION" > /dev/null 2>&1 & disown nvm install "$VERSION" > /dev/null 2>&1 & disown
export PATH="$NVM_DIR/versions/node/$VERSION/bin:$PATH" fi
node_bin_path="$NVM_DIR/versions/node/$VERSION/bin"
if [[ ":$PATH:" != *":$node_bin_path:"* ]]; then
export PATH="$node_bin_path:$PATH"
fi
fi fi
unset node_alias node_bin_path VERSION
# pyenv # pyenv
export PYENV_ROOT="$HOME/.pyenv" export PYENV_ROOT=${PYENV_ROOT:-"$HOME/.pyenv"}
export PATH="$PYENV_ROOT/bin:$PATH" pyenv_bin_path="$PYENV_ROOT/bin"
if [[ ":$PATH:" != *":$pyenv_bin_path:"* ]]; then
export PATH="$pyenv_bin_path:$PATH"
fi
if [ -x `command -v pyenv` ]; then if [ -x `command -v pyenv` ]; then
eval "$(pyenv init --path)" eval "$(pyenv init --path)"
fi fi
unset pyenv_bin_path
# poetry # poetry
export POETRY_ROOT="$HOME/.poetry" export POETRY_ROOT=${POETRY_ROOT:-"$HOME/.poetry"}
export PATH="$POETRY_ROOT/bin:$PATH" poetry_bin_path="$POETRY_ROOT/bin"
if [[ ":$PATH:" != *":$poetry_bin_path:"* ]]; then
export PATH="$poetry_bin_path:$PATH"
fi
unset poetry_bin_path
# z (jump around) # z (jump around)
export Z_DATA_DIR=${Z_DATA:-"$XDG_DATA_HOME/z"} export Z_DATA_DIR=${Z_DATA:-"$XDG_DATA_HOME/z"}

32
files/home/.zshrc Normal file
View File

@@ -0,0 +1,32 @@
# https://github.com/romkatv/powerlevel10k?tab=readme-ov-file#how-do-i-configure-instant-prompt
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
source $HOME/.profile
export POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true
ZSH_THEME="powerlevel10k/powerlevel10k"
export ZSH="$HOME/.oh-my-zsh"
zstyle ':omz:update' frequency 13
# https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins
plugins=(
aliases
emoji
git
history
poetry
zsh-autosuggestions
zsh-syntax-highlighting
)
source $ZSH/oh-my-zsh.sh
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion

1
install Symbolic link
View File

@@ -0,0 +1 @@
script/install

View File

@@ -1,108 +0,0 @@
# Utility functions for common tasks
ARCH=$(dpkg --print-architecture)
# @arg $1 URL to download
# @arg $2 Path to file
function download_file {
curl \
--silent \
--show-error \
--location \
--output $2 \
$1
}
# @arg $1 URL to run
# @arg $2 binary to use
function download_run {
file=$(mktemp)
download_file $1 $file
cat $file | $2
}
# @arg $1 binary to test
function bin_in_path {
command -v $1
}
# @arg $1 apt package to test
function apt_installed {
dpkg --status $1 >/dev/null
}
function clean {
sudo apt-get clean -qq
}
function update {
sudo apt-get update -qq
}
# @arg $1 apt package to install if not present
function install {
if ! apt_installed $1; then
sudo apt-get install -qq $1
fi
}
# Add apt repository
# @arg $1 JSON object containing the following keys
# * key - entry key
# * repository - apt repository
# * signingKey - gpg signing key url
# * components - apt components
function add_repository {
key=$(jq -r ".key" <<<"$1")
echo "Updating apt repository ${key}..."
signingKey=$(jq -r ".signingKey" <<<"$1")
repository=$(jq -r ".repository" <<<"$1")
components=$(jq -r ".components" <<<"$1")
signingKeyPath="/etc/apt/keyrings/${key}.gpg"
sourcesListPath="/etc/apt/sources.list.d/${key}.list"
source="deb [signed-by=${signingKeyPath} arch=${ARCH}] ${repository} ${components}"
sudo mkdir -p /etc/apt/keyrings
sudo mkdir -p /etc/apt/sources.list.d
echo "$source" | sudo tee "$sourcesListPath" >/dev/null
wget -O- "$signingKey" |
gpg --dearmor |
sudo tee "$signingKeyPath" >/dev/null
}
# @arg $1 package list file to install
function install_file {
sudo apt-get install -qqf $(cat $1)
}
# @arg $1 JSON object containing the following keys
# * name - apt repository
# * target - gpg signing key url
function stow_package {
name=$(jq -r ".name" <<<"$1")
target=$(jq -r ".target" <<<"$1")
case $target in
HOME)
rm -f $HOME/.bashrc
rm -f $HOME/.profile
target=$HOME
;;
CONFIG)
mkdir -p $HOME/.config
target=$HOME/.config
;;
SSH)
mkdir -p $HOME/.ssh
target=$HOME/.ssh
;;
*) ;;
esac
echo "Stowing $ABS_DIR/files/$name to $target"
sudo stow --dir="$ABS_DIR/files" --target=$target $name
}

View File

@@ -2,69 +2,65 @@
set -eo pipefail set -eo pipefail
# -------------------------------------------------------------------- # --------------------------------------------------------------------
# Script that installs system dependencies specified in a config, # Script to run all install scripts contained in install.d
# and runs all post-install scripts contained in a subdirectory.
# #
uuid=${UUID:-$(cat /proc/sys/kernel/random/uuid)} printf "\n\t <<< dots installer >>>\n"
dir=$(dirname "$0") printf "\t========================\n\n\n"
utils="${dir}/_utils.sh"
config="${dir}/install_config.json"
install_dir="${dir}/install.d"
log_dir="${dir}/logs"
# Create log directory if it doesn't exist # Prevent running as root
# and the log path hasn't been overridden if [[ $EUID -eq 0 && -z "$SKIP_SUDO_CHECK" ]]; then
if [[ -z "$LOG_TARGET" ]]; then echo "Failed: Running as sudo. Please run as user"
mkdir -p "$log_dir" exit 1
fi fi
log_target=${LOG_TARGET:-"${log_dir}/${uuid}.log"}
# Ensure sudo credentials are cached
if [[ -z "$SKIP_SUDO_CHECK" ]]; then
sudo -v
fi
# Set up directory variables
dir=$(dirname "$0")
install_dir="$dir/install.d"
export DOTFILES=$(dirname "$dir")
# Set up log destination
if [[ -z "$LOG_TARGET" ]]; then
timestamp=$(date +%Y-%m-%dT%H:%M:%S)
uuid=$(
uuidgen 2> /dev/null \
|| cat /proc/sys/kernel/random/uuid 2> /dev/null \
|| echo $RANDOM
)
log_dir="$dir/logs"
mkdir -p "$log_dir"
log_target=${LOG_TARGET:-"$log_dir/$uuid.log"}
else
log_target="$LOG_TARGET"
fi
touch "$log_target"
if [[ ! -f "$log_target" ]]; then
echo "Failed: Unable to create log file \"$log_target\""
exit 1
fi
log_abs_target=$(readlink -f "$log_target")
# Run install scripts
install() { install() {
echo "Running \"$(basename "$0")\" at \"$(date)\"" echo "Running \"$(basename "$0")\" at \"$(date)\""
echo "Running as \"$(whoami)\" on \"$(hostname)\"" echo "Running as \"$(whoami)\" on \"$(hostname)\""
# Prevent running as root
if [[ $EUID -eq 0 ]]; then
echo "Failed: Running as sudo. Please run as user"
exit 1
fi
# Load installer dependencies
source "$utils"
update
install jq
for dep in $(jq -r ".apt_core_dependencies[]" "$config"); do
install "$dep"
done
# Add apt repositories
for i in $(jq ".apt_repositories | keys | .[]" "$config"); do
value=$(jq -r ".apt_repositories[$i]" "$config")
add_repository "$value"
done
update
# Install apt dependencies
for dep in $(jq -r ".apt_dependencies[]" "$config"); do
install "$dep"
done
# Install dotfiles on system and load them
figlet -c "Stowing..."
for i in $(jq ".stow_packages | keys | .[]" "$config"); do
value=$(jq -r ".stow_packages[$i]" "$config")
stow_package "$value"
done
source "$HOME/.profile"
# Run custom installer scripts
figlet -c "Installing..."
for script in $install_dir/*.sh; do for script in $install_dir/*.sh; do
figlet -c "$(basename $script)" script_name=$(basename $script)
printf "\n\n<<< $script_name:\n"
source $script source $script
printf "\n>>> $script_name\n"
unset script_name
done done
} }
echo "install: Logging to \"$log_abs_target\""
install 2>&1 | tee "$log_abs_target"
echo "install: Logging to \"$log_target\"" # Clean up
install 2>&1 | tee "$log_target" unset uuid dir install_dir log_dir log_abs_target log_target
echo "Thank you!"

4
script/install.d/00-os_info.sh Executable file → Normal file
View File

@@ -8,5 +8,7 @@
if [[ "$OSTYPE" == "darwin"* ]]; then if [[ "$OSTYPE" == "darwin"* ]]; then
sw_vers sw_vers
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
lsb_release -a cat /etc/os-release
else
echo "Unknown OS: $OSTYPE"
fi fi

21
script/install.d/01-ssh.sh Executable file → Normal file
View File

@@ -5,18 +5,21 @@
# Print SSH key. # Print SSH key.
# #
ssh_method="ed25519" # skip if SKIP_SSH_CONFIG is set
if [ -z "$SKIP_SSH_CONFIG" ]; then
ssh_method="ed25519"
ssh_target="${HOME}/.ssh" ssh_target="${HOME}/.ssh"
ssh_key="${ssh_target}/id_${ssh_method}" ssh_key="${ssh_target}/id_${ssh_method}"
ssh_pub="${ssh_key}.pub" ssh_pub="${ssh_key}.pub"
if [ ! -f $ssh_key ]; then if [ ! -f $ssh_key ]; then
ssh-keygen \ ssh-keygen \
-t $ssh_method \ -t $ssh_method \
-f $ssh_key \ -f $ssh_key \
-C "$(whoami)@$(hostname)-$(date -I)" -C "$(whoami)@$(hostname)-$(date -I)"
fi
cat $ssh_pub
unset ssh_method ssh_target ssh_key ssh_pub
fi fi
cat $ssh_pub
unset ssh_method ssh_target ssh_key ssh_pub

View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# (macOS only) Install homebrew.
#
if [[ "$OSTYPE" == "darwin"* ]]; then
export NONINTERACTIVE=1
if ! command -v brew &> /dev/null; then
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
brew update
brew --version
unset NONINTERACTIVE
else
echo "Skipping: Not macOS"
fi

View File

@@ -1,17 +0,0 @@
#!/usr/bin/env bash
fish --version
current_shell=$(grep "^$USER" /etc/passwd)
current_shell=${current_shell##*:}
fish_shell=$(command -v fish)
if [[ "$current_shell" != "$fish_shell" ]]; then
sudo usermod --shell "$fish_shell" "$USER"
fi
fisher_location="$XDG_CONFIG_HOME/fish/functions/fisher.fish"
if ! [ -f $fisher_location ]; then
fish -c "curl -sL https://git.io/fisher | source && fisher update"
fi
fish -c "fisher update"
fish -c "fisher --version"

View File

@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# (distros with apt only) Install core apt packages.
#
if command -v apt-get &> /dev/null; then
apt_packages=(
curl
gnupg
gnupg2
wget
)
sudo apt-get update -qq
sudo apt-get install -qq "${apt_packages[@]}"
unset apt_packages
apt --version
else
echo "Skipping: apt-get not found"
fi

View File

@@ -0,0 +1,16 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# Configure git.
#
if ! command -v git &> /dev/null; then
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
sudo apt-get install -qq git
elif [[ "$OSTYPE" == "darwin"* ]]; then
brew install git
fi
fi
git --version

View File

@@ -0,0 +1,48 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# Configure zsh shell.
#
# install zsh
if ! command -v zsh &> /dev/null; then
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
sudo apt-get install -qq zsh
elif [[ "$OSTYPE" == "darwin"* ]]; then
brew install zsh
fi
fi
zsh --version
# install oh-my-zsh
export ZSH="$HOME/.oh-my-zsh"
if [ ! -d "$ZSH" ]; then
# https://github.com/ohmyzsh/ohmyzsh#unattended-install
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
fi
# install zsh-syntax-highlighting
export ZSH_SYNTAX_HIGHLIGHTING="$ZSH/custom/plugins/zsh-syntax-highlighting"
if [ ! -d "$ZSH_SYNTAX_HIGHLIGHTING" ]; then
git clone -q https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_SYNTAX_HIGHLIGHTING
fi
# install zsh-autosuggestions
export ZSH_AUTOSUGGESTIONS="$ZSH/custom/plugins/zsh-autosuggestions"
if [ ! -d "$ZSH_AUTOSUGGESTIONS" ]; then
git clone -q https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_AUTOSUGGESTIONS
fi
# install powerlevel10k
export POWERLEVEL10K="$ZSH/custom/themes/powerlevel10k"
if [ ! -d "$POWERLEVEL10K" ]; then
git clone -q --depth=1 https://github.com/romkatv/powerlevel10k.git $POWERLEVEL10K
fi
# change default shell to zsh
if [[ "$SHELL" != *zsh ]]; then
sudo chsh -s "$(command -v zsh)" "$(whoami)"
sudo usermod -s "$(command -v zsh)" "$(whoami)"
fi

View File

@@ -0,0 +1,33 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# Install and run stow.
#
if ! command -v stow &> /dev/null; then
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
sudo apt-get install -qq stow
elif [[ "$OSTYPE" == "darwin"* ]]; then
brew install stow
fi
fi
stow --version
root_dir=${DOTFILES:-$(dirname "$(dirname "$(dirname "$(realpath "$0")")")")}
rm -f $HOME/.bash_profile
rm -f $HOME/.bashrc
rm -f $HOME/.gitconfig
rm -f $HOME/.profile
rm -f $HOME/.zshrc
rm -f $HOME/.p10k.zsh
rm -f $HOME/.ssh/config
mkdir -p $HOME/.config
mkdir -p $HOME/.ssh
sudo stow --dir="$root_dir/files" --target="$HOME" home
sudo stow --dir="$root_dir/files" --target="$HOME/.config" dot-config
sudo stow --dir="$root_dir/files" --target="$HOME/.ssh" dot-ssh

View File

@@ -1,15 +0,0 @@
build-essential
libssl-dev
libbz2-dev
libreadline-dev
libsqlite3-dev
libxml2-dev
libxmlsec1-dev
llvm
libncurses5-dev
libncursesw5-dev
xz-utils
tk-dev
libffi-dev
liblzma-dev
zlib1g-dev

39
script/install.d/10-pyenv.sh Executable file → Normal file
View File

@@ -1,24 +1,41 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if ! bin_in_path "pyenv"; then
# see https://github.com/pyenv/pyenv/wiki/common-build-problems # -----------------------------------------------------------------------------
pyenv_list_file="$INSTALL_DIR/10-pyenv-pkglist" # Description:
install_file "$pyenv_list_file" # Configure pyenv.
#
export PYENV_ROOT="$HOME/.pyenv"
if ! echo $PATH | grep -q "$PYENV_ROOT"; then
export PATH="$PYENV_ROOT/bin:$PATH"
fi
if ! command -v "pyenv" &>/dev/null; then
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
# https://github.com/pyenv/pyenv/wiki#suggested-build-environment
sudo apt-get install -qq build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev curl \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
# see https://github.com/pyenv/pyenv-installer # see https://github.com/pyenv/pyenv-installer
download_run \ bash -c "$(curl -fsSL https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer)"
"https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer" \
bash unset pyenv_packages
elif [[ "$OSTYPE" == "darwin"* ]]; then
brew install pyenv
brew install pyenv-virtualenv
fi
fi fi
virtualenv_path="$(pyenv root)/plugins/pyenv-virtualenv" if [[ "$OSTYPE" == "linux-gnu"* ]]; then
if [ ! -d "$virtualenv_path" ]; then virtualenv_path="$(pyenv root)/plugins/pyenv-virtualenv"
if [ ! -d "$virtualenv_path" ]; then
git clone \ git clone \
https://github.com/pyenv/pyenv-virtualenv.git \ https://github.com/pyenv/pyenv-virtualenv.git \
$virtualenv_path $virtualenv_path
fi
unset virtualenv_path
fi fi
eval "$(pyenv init --path)" eval "$(pyenv init --path)"
pyenv update
pyenv --version pyenv --version

61
script/install.d/11-python.sh Executable file → Normal file
View File

@@ -1,16 +1,61 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# Configure Python.
#
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
if ! bin_in_path "pip3"; then if ! command -v "python" &>/dev/null; then
pyenv install 3.9.0 pyenv install 3.12.1
pyenv global 3.9.0 pyenv global 3.12.1
fi fi
pip install --upgrade pip pip3 install --quiet --upgrade --user pip
pip3 install --upgrade pip
python3 --version python3 --version
pip3 --version pip3 --version
for dep in $(jq -r ".pip_dependencies[]" $CONFIG); do pip_dependencies=(
pip3 install --upgrade $dep # docker-compose
done # neovim
# "python-language-server[all]"
# pyvim
)
installed_packages=$(pip3 list --format=freeze | awk -F'==' '{print $1}')
pip_dependencies=($(comm -13 <(printf "%s\n" "${installed_packages[@]}" | sort) <(printf "%s\n" "${pip_dependencies[@]}" | sort)))
if [ ${#pip_dependencies[@]} -gt 0 ]; then
pip3 install --quiet --upgrade --user "${pip_dependencies[@]}"
fi
unset installed_packages pip_dependencies PYTHON_KEYRING_BACKEND
local_bin_path="$HOME/.local/bin"
if [[ ":$PATH:" != *":$local_bin_path:"* ]]; then
export PATH="$local_bin_path:$PATH"
fi
mkdir -p ~/.local/bin
unset local_bin_path
if ! command -v "pipx" &>/dev/null; then
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
sudo apt-get install -qq pipx
elif [[ "$OSTYPE" == "darwin"* ]]; then
brew install pipx
fi
fi
echo "pipx $(pipx --version)"
if ! command -v "poetry" &>/dev/null; then
pipx install poetry
fi
poetry --version
POETRY_PLUGIN="$ZSH/custom/plugins/poetry"
if [ ! -d "$POETRY_PLUGIN" ]; then
mkdir -p $POETRY_PLUGIN
poetry completions zsh > $POETRY_PLUGIN/_poetry
fi

45
script/install.d/12-node.sh Executable file → Normal file
View File

@@ -1,22 +1,39 @@
#!/usr/bin/env bash #!/usr/bin/env bash
nvm_version="v0.38.0"
if ! bin_in_path "nvm"; then
download_run "https://raw.githubusercontent.com/nvm-sh/nvm/${nvm_version}/install.sh" \
"bash"
fi
# -----------------------------------------------------------------------------
# Description:
# Configure Node.js.
#
NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh" [ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
nvm_version="0.39.7"
if ! command -v "nvm" &>/dev/null; then
bash -c "$(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v${nvm_version}/install.sh)"
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
fi
nvm --version nvm --version
nvm alias default lts/fermium nvm alias default lts/iron
nvm install lts/fermium nvm install lts/iron
nvm use lts/fermium nvm use lts/iron
node --version echo "Node.js $(node --version)"
yarn --version echo "npm $(npm --version)"
for dep in $(jq -r ".node_dependencies[]" $CONFIG); do npm_dependencies=(
yarn global add $dep "firebase-tools"
yarn global upgrade $dep "neovim"
done "typescript-language-server"
"typescript"
)
npm_dependencies=($(comm -13 <(printf "%s\n" "${npm_dependencies[@]}" | sort) <(npm list -g --depth=0 --parseable | awk -F'/' '{print $NF}' | sort)))
if [ ${#npm_dependencies[@]} -gt 0 ]; then
npm install -g "${npm_dependencies[@]}"
fi
unset nvm_version npm_dependencies

13
script/install.d/20-docker.sh Executable file → Normal file
View File

@@ -1,13 +1,14 @@
#!/usr/bin/env bash if [[ "$OSTYPE" == "linux-gnu"* && -z "$SKIP_DOCKER_CONFIG" ]]; then
docker --version docker --version
readonly docker_group="docker" readonly docker_group="docker"
if ! grep -q "$docker_group" /etc/group; then if ! grep -q "$docker_group" /etc/group; then
echo "Adding docker group" echo "Adding docker group"
sudo groupadd "$docker_group" sudo groupadd "$docker_group"
fi fi
if ! groups "$USER" | grep -q "\b$docker_group\b"; then if ! groups "$USER" | grep -q "\b$docker_group\b"; then
echo "Adding user to docker group" echo "Adding user to docker group"
sudo usermod -aG docker "$USER" sudo usermod -aG docker "$USER"
fi
fi fi

View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# Install GitHub CLI.
#
if ! command -v gh &>/dev/null; then
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
# https://github.com/cli/cli/blob/trunk/docs/install_linux.md#debian-ubuntu-linux-raspberry-pi-os-apt
sudo mkdir -p -m 755 /etc/apt/keyrings && wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg >/dev/null &&
sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg &&
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list >/dev/null &&
sudo apt-get update -qq &&
sudo apt-get install -qq gh
elif [[ "$OSTYPE" == "darwin"* ]]; then
brew install gh
fi
fi

View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# Install terraform.
#
if ! command -v "terraform" &>/dev/null; then
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
# https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli#install-terraform
wget -O- https://apt.releases.hashicorp.com/gpg |
gpg --dearmor |
sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \
https://apt.releases.hashicorp.com $(lsb_release -cs) main" |
sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt-get update -qq &&
sudo apt-get install -qq terraform
elif [[ "$OSTYPE" == "darwin"* ]]; then
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
fi
fi
terraform --version

View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# (macOS only) Install iTerm2.
#
if [[ "$OSTYPE" == "darwin"* ]]; then
if ! brew list --cask iterm2 &>/dev/null; then
brew install --cask iterm2
fi
fi

View File

@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# (macOS only) Install nerdfonts.
#
if [[ "$OSTYPE" == "darwin"* ]]; then
fonts_list=(
font-fira-mono-nerd-font
font-fira-code-nerd-font
)
if ! brew list "${fonts_list[@]}" &> /dev/null; then
brew tap homebrew/cask-fonts
for font in "${fonts_list[@]}"; do
brew install --cask "$font"
done
fi
unset fonts_list
fi

View File

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# (macOS only) Install Colour Contrast Analyser (CCA).
#
if [[ "$OSTYPE" == "darwin"* ]]; then
if ! brew list --cask colour-contrast-analyser &> /dev/null; then
brew install --cask colour-contrast-analyser
else
echo "Colour Contrast Analyser (CCA) is already installed."
fi
fi

View File

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# (macOS only) Install Rectangle.
#
if [[ "$OSTYPE" == "darwin"* ]]; then
if ! brew list --cask rectangle &> /dev/null; then
brew install --cask rectangle
else
echo "Rectangle is already installed."
fi
fi

View File

@@ -0,0 +1,16 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# Install neofetch.
#
if ! command -v "neofetch" &>/dev/null; then
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
sudo apt-get install -qq neofetch &>/dev/null
elif [[ "$OSTYPE" == "darwin"* ]]; then
brew install neofetch
fi
fi
echo "$(neofetch --version)"

View File

@@ -1,2 +0,0 @@
#!/usr/bin/env bash
clean

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# Clean up after installation.
#
if [[ "$OSTYPE" == "darwin"* ]]; then
brew cleanup
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
sudo apt-get autoremove -qq
sudo apt-get clean -qq
fi

8
script/install.d/99-screenfetch.sh Executable file → Normal file
View File

@@ -1,2 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
screenfetch
# -----------------------------------------------------------------------------
# Description:
# Print system information.
#
neofetch

View File

@@ -18,36 +18,13 @@
"repository": "https://packages.cloud.google.com/apt", "repository": "https://packages.cloud.google.com/apt",
"components": "cloud-sdk main" "components": "cloud-sdk main"
}, },
{
"key": "google-k8s",
"signingKey": "https://packages.cloud.google.com/apt/doc/apt-key.gpg",
"repository": "https://apt.kubernetes.io/",
"components": "kubernetes-xenial main"
},
{ {
"key": "docker", "key": "docker",
"signingKey": "https://download.docker.com/linux/debian/gpg", "signingKey": "https://download.docker.com/linux/debian/gpg",
"repository": "https://download.docker.com/linux/debian", "repository": "https://download.docker.com/linux/debian",
"components": "bullseye stable" "components": "bullseye stable"
},
{
"key": "fish",
"signingKey": "https://download.opensuse.org/repositories/shells:fish/Debian_10/Release.key",
"repository": "https://download.opensuse.org/repositories/shells:/fish/Debian_10/",
"components": "/"
},
{
"key": "github",
"signingKey": "https://cli.github.com/packages/githubcli-archive-keyring.gpg",
"repository": "https://cli.github.com/packages",
"components": "stable main"
} }
], ],
"apt_core_dependencies": [
"curl",
"gnupg",
"gnupg2"
],
"apt_dependencies": [ "apt_dependencies": [
"apt-transport-https", "apt-transport-https",
"ca-certificates", "ca-certificates",
@@ -60,11 +37,9 @@
"emacs", "emacs",
"fd-find", "fd-find",
"figlet", "figlet",
"fish",
"fonts-nanum", "fonts-nanum",
"fortune-mod", "fortune-mod",
"fzf", "fzf",
"gh",
"git", "git",
"google-cloud-sdk", "google-cloud-sdk",
"kubectl", "kubectl",
@@ -76,39 +51,10 @@
"openssh-server", "openssh-server",
"redis-tools", "redis-tools",
"screenfetch", "screenfetch",
"stow",
"terraform-ls", "terraform-ls",
"terraform", "terraform",
"tmux", "tmux",
"unzip", "unzip",
"yarn" "yarn"
],
"node_dependencies": [
"firebase-tools",
"neovim",
"typescript-language-server",
"typescript"
],
"pip_dependencies": [
"awscli",
"docker-compose",
"neovim",
"poetry",
"python-language-server[all]",
"pyvim"
],
"stow_packages": [
{
"name": "config",
"target": "CONFIG"
},
{
"name": "home",
"target": "HOME"
},
{
"name": "ssh",
"target": "SSH"
}
] ]
} }

View File

@@ -2,7 +2,7 @@
set -eo pipefail set -eo pipefail
# -------------------------------------------------------------------- # --------------------------------------------------------------------
# Script that sets up git in dotfiles directory. # Script that sets up git remote in dotfiles directory.
# #
# Optional arguments: # Optional arguments:
# GITHUB_AUTHOR: GitHub author of repository # GITHUB_AUTHOR: GitHub author of repository
@@ -39,6 +39,8 @@ git -C $dir reset --hard FETCH_HEAD
git -C $dir branch --set-upstream-to=origin/$branch $branch git -C $dir branch --set-upstream-to=origin/$branch $branch
git -C $dir pull --rebase git -C $dir pull --rebase
unset dir author repository branch
printf "\n" printf "\n"
echo ">>> git logs" echo ">>> git logs"
echo "Done!" echo "Done!"

View File

@@ -5,18 +5,6 @@ set -eo pipefail
# Summary: Script to checkout a compatible # Summary: Script to checkout a compatible
# repository and run `script/install` # repository and run `script/install`
# #
# Optional arguments:
# GITHUB_AUTHOR: GitHub author of repository
# Defaults to "andrejusk"
# GITHUB_REPOSITORY: GitHub repository name
# Defaults to "dotfiles"
# GITHUB_BRANCH: GitHub branch name
# Defaults to "master"
# DOTFILES_DIR: Directory to install dotfiles to
# Defaults to "$HOME/.dotfiles"
# DOTFILES_SKIP_INSTALL: Skip running `script/install`
# Defaults to false
#
# Required binaries: # Required binaries:
# curl # curl
# tar # tar
@@ -51,7 +39,7 @@ fi
# Read GitHub repository and branch from environment variables # Read GitHub repository and branch from environment variables
author=${GITHUB_AUTHOR:-andrejusk} author=${GITHUB_AUTHOR:-andrejusk}
repository=${GITHUB_REPOSITORY:-dotfiles} repository=${GITHUB_REPO:-dotfiles}
branch=${GITHUB_BRANCH:-master} branch=${GITHUB_BRANCH:-master}
# Check if repository and branch exists # Check if repository and branch exists

View File

@@ -1 +1 @@
3.9.0 3.12.1

372
tests/poetry.lock generated
View File

@@ -1,154 +1,183 @@
[[package]] # This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand.
name = "appdirs"
version = "1.4.4"
description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
category = "dev"
optional = false
python-versions = "*"
[[package]] [[package]]
name = "atomicwrites" name = "atomicwrites"
version = "1.4.0" version = "1.4.1"
description = "Atomic file writes." description = "Atomic file writes."
category = "dev"
optional = false optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
files = [
{file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"},
]
[[package]] [[package]]
name = "attrs" name = "attrs"
version = "21.2.0" version = "23.2.0"
description = "Classes Without Boilerplate" description = "Classes Without Boilerplate"
category = "dev"
optional = false optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" python-versions = ">=3.7"
files = [
{file = "attrs-23.2.0-py3-none-any.whl", hash = "sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1"},
{file = "attrs-23.2.0.tar.gz", hash = "sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30"},
]
[package.extras] [package.extras]
dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit"] cov = ["attrs[tests]", "coverage[toml] (>=5.3)"]
docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] dev = ["attrs[tests]", "pre-commit"]
tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface"] docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope-interface"]
tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins"] tests = ["attrs[tests-no-zope]", "zope-interface"]
tests-mypy = ["mypy (>=1.6)", "pytest-mypy-plugins"]
tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "pytest (>=4.3.0)", "pytest-xdist[psutil]"]
[[package]] [[package]]
name = "black" name = "black"
version = "21.7b0" version = "21.12b0"
description = "The uncompromising code formatter." description = "The uncompromising code formatter."
category = "dev"
optional = false optional = false
python-versions = ">=3.6.2" python-versions = ">=3.6.2"
files = [
{file = "black-21.12b0-py3-none-any.whl", hash = "sha256:a615e69ae185e08fdd73e4715e260e2479c861b5740057fde6e8b4e3b7dd589f"},
{file = "black-21.12b0.tar.gz", hash = "sha256:77b80f693a569e2e527958459634f18df9b0ba2625ba4e0c2d5da5be42e6f2b3"},
]
[package.dependencies] [package.dependencies]
appdirs = "*"
click = ">=7.1.2" click = ">=7.1.2"
mypy-extensions = ">=0.4.3" mypy-extensions = ">=0.4.3"
pathspec = ">=0.8.1,<1" pathspec = ">=0.9.0,<1"
regex = ">=2020.1.8" platformdirs = ">=2"
tomli = ">=0.2.6,<2.0.0" tomli = ">=0.2.6,<2.0.0"
typing-extensions = [
{version = ">=3.10.0.0,<3.10.0.1 || >3.10.0.1", markers = "python_version >= \"3.10\""},
{version = ">=3.10.0.0", markers = "python_version < \"3.10\""},
]
[package.extras] [package.extras]
colorama = ["colorama (>=0.4.3)"] colorama = ["colorama (>=0.4.3)"]
d = ["aiohttp (>=3.6.0)", "aiohttp-cors (>=0.4.0)"] d = ["aiohttp (>=3.7.4)"]
python2 = ["typed-ast (>=1.4.2)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"]
python2 = ["typed-ast (>=1.4.3)"]
uvloop = ["uvloop (>=0.15.2)"] uvloop = ["uvloop (>=0.15.2)"]
[[package]] [[package]]
name = "click" name = "click"
version = "8.0.1" version = "8.1.7"
description = "Composable command line interface toolkit" description = "Composable command line interface toolkit"
category = "dev"
optional = false optional = false
python-versions = ">=3.6" python-versions = ">=3.7"
files = [
{file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"},
{file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"},
]
[package.dependencies] [package.dependencies]
colorama = {version = "*", markers = "platform_system == \"Windows\""} colorama = {version = "*", markers = "platform_system == \"Windows\""}
[[package]] [[package]]
name = "colorama" name = "colorama"
version = "0.4.4" version = "0.4.6"
description = "Cross-platform colored terminal text." description = "Cross-platform colored terminal text."
category = "dev"
optional = false optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
files = [
[[package]] {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
name = "execnet" {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
version = "1.9.0" ]
description = "execnet: rapid multi-Python deployment"
category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
[package.extras]
testing = ["pre-commit"]
[[package]] [[package]]
name = "iniconfig" name = "iniconfig"
version = "1.1.1" version = "2.0.0"
description = "iniconfig: brain-dead simple config-ini parsing" description = "brain-dead simple config-ini parsing"
category = "dev"
optional = false optional = false
python-versions = "*" python-versions = ">=3.7"
files = [
{file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"},
{file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"},
]
[[package]] [[package]]
name = "mypy-extensions" name = "mypy-extensions"
version = "0.4.3" version = "1.0.0"
description = "Experimental type system extensions for programs checked with the mypy typechecker." description = "Type system extensions for programs checked with the mypy type checker."
category = "dev"
optional = false optional = false
python-versions = "*" python-versions = ">=3.5"
files = [
{file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"},
{file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"},
]
[[package]] [[package]]
name = "packaging" name = "packaging"
version = "21.0" version = "23.2"
description = "Core utilities for Python packages" description = "Core utilities for Python packages"
category = "dev"
optional = false optional = false
python-versions = ">=3.6" python-versions = ">=3.7"
files = [
[package.dependencies] {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"},
pyparsing = ">=2.0.2" {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"},
]
[[package]] [[package]]
name = "pathspec" name = "pathspec"
version = "0.9.0" version = "0.12.1"
description = "Utility library for gitignore style pattern matching of file paths." description = "Utility library for gitignore style pattern matching of file paths."
category = "dev"
optional = false optional = false
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" python-versions = ">=3.8"
files = [
{file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"},
{file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"},
]
[[package]]
name = "platformdirs"
version = "4.2.0"
description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
optional = false
python-versions = ">=3.8"
files = [
{file = "platformdirs-4.2.0-py3-none-any.whl", hash = "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068"},
{file = "platformdirs-4.2.0.tar.gz", hash = "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768"},
]
[package.extras]
docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"]
test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"]
[[package]] [[package]]
name = "pluggy" name = "pluggy"
version = "0.13.1" version = "1.4.0"
description = "plugin and hook calling mechanisms for python" description = "plugin and hook calling mechanisms for python"
category = "dev"
optional = false optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" python-versions = ">=3.8"
files = [
{file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"},
{file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"},
]
[package.extras] [package.extras]
dev = ["pre-commit", "tox"] dev = ["pre-commit", "tox"]
testing = ["pytest", "pytest-benchmark"]
[[package]] [[package]]
name = "py" name = "py"
version = "1.10.0" version = "1.11.0"
description = "library with cross-python path, ini-parsing, io, code, log facilities" description = "library with cross-python path, ini-parsing, io, code, log facilities"
category = "dev"
optional = false optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
files = [
[[package]] {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"},
name = "pyparsing" {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"},
version = "2.4.7" ]
description = "Python parsing module"
category = "dev"
optional = false
python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
[[package]] [[package]]
name = "pytest" name = "pytest"
version = "6.2.4" version = "6.2.5"
description = "pytest: simple powerful testing with Python" description = "pytest: simple powerful testing with Python"
category = "dev"
optional = false optional = false
python-versions = ">=3.6" python-versions = ">=3.6"
files = [
{file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"},
{file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"},
]
[package.dependencies] [package.dependencies]
atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""}
@@ -156,188 +185,47 @@ attrs = ">=19.2.0"
colorama = {version = "*", markers = "sys_platform == \"win32\""} colorama = {version = "*", markers = "sys_platform == \"win32\""}
iniconfig = "*" iniconfig = "*"
packaging = "*" packaging = "*"
pluggy = ">=0.12,<1.0.0a1" pluggy = ">=0.12,<2.0"
py = ">=1.8.2" py = ">=1.8.2"
toml = "*" toml = "*"
[package.extras] [package.extras]
testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"]
[[package]]
name = "pytest-forked"
version = "1.3.0"
description = "run tests in isolated forked subprocesses"
category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
[package.dependencies]
py = "*"
pytest = ">=3.10"
[[package]]
name = "pytest-xdist"
version = "2.3.0"
description = "pytest xdist plugin for distributed testing and loop-on-failing modes"
category = "dev"
optional = false
python-versions = ">=3.6"
[package.dependencies]
execnet = ">=1.1"
pytest = ">=6.0.0"
pytest-forked = "*"
[package.extras]
psutil = ["psutil (>=3.0)"]
testing = ["filelock"]
[[package]]
name = "regex"
version = "2021.7.6"
description = "Alternative regular expression module, to replace re."
category = "dev"
optional = false
python-versions = "*"
[[package]] [[package]]
name = "toml" name = "toml"
version = "0.10.2" version = "0.10.2"
description = "Python Library for Tom's Obvious, Minimal Language" description = "Python Library for Tom's Obvious, Minimal Language"
category = "dev"
optional = false optional = false
python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
files = [
[[package]]
name = "tomli"
version = "1.1.0"
description = "A lil' TOML parser"
category = "dev"
optional = false
python-versions = ">=3.6"
[metadata]
lock-version = "1.1"
python-versions = "^3.9"
content-hash = "991d2f869433756ef344750fdb04b61e3ec16722b60154c4efd59006ca56cfa4"
[metadata.files]
appdirs = [
{file = "appdirs-1.4.4-py2.py3-none-any.whl", hash = "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128"},
{file = "appdirs-1.4.4.tar.gz", hash = "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41"},
]
atomicwrites = [
{file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"},
{file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"},
]
attrs = [
{file = "attrs-21.2.0-py2.py3-none-any.whl", hash = "sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1"},
{file = "attrs-21.2.0.tar.gz", hash = "sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb"},
]
black = [
{file = "black-21.7b0-py3-none-any.whl", hash = "sha256:1c7aa6ada8ee864db745b22790a32f94b2795c253a75d6d9b5e439ff10d23116"},
{file = "black-21.7b0.tar.gz", hash = "sha256:c8373c6491de9362e39271630b65b964607bc5c79c83783547d76c839b3aa219"},
]
click = [
{file = "click-8.0.1-py3-none-any.whl", hash = "sha256:fba402a4a47334742d782209a7c79bc448911afe1149d07bdabdf480b3e2f4b6"},
{file = "click-8.0.1.tar.gz", hash = "sha256:8c04c11192119b1ef78ea049e0a6f0463e4c48ef00a30160c704337586f3ad7a"},
]
colorama = [
{file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"},
{file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"},
]
execnet = [
{file = "execnet-1.9.0-py2.py3-none-any.whl", hash = "sha256:a295f7cc774947aac58dde7fdc85f4aa00c42adf5d8f5468fc630c1acf30a142"},
{file = "execnet-1.9.0.tar.gz", hash = "sha256:8f694f3ba9cc92cab508b152dcfe322153975c29bda272e2fd7f3f00f36e47c5"},
]
iniconfig = [
{file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
{file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
]
mypy-extensions = [
{file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
{file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"},
]
packaging = [
{file = "packaging-21.0-py3-none-any.whl", hash = "sha256:c86254f9220d55e31cc94d69bade760f0847da8000def4dfe1c6b872fd14ff14"},
{file = "packaging-21.0.tar.gz", hash = "sha256:7dc96269f53a4ccec5c0670940a4281106dd0bb343f47b7471f779df49c2fbe7"},
]
pathspec = [
{file = "pathspec-0.9.0-py2.py3-none-any.whl", hash = "sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a"},
{file = "pathspec-0.9.0.tar.gz", hash = "sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1"},
]
pluggy = [
{file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"},
{file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"},
]
py = [
{file = "py-1.10.0-py2.py3-none-any.whl", hash = "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"},
{file = "py-1.10.0.tar.gz", hash = "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3"},
]
pyparsing = [
{file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"},
{file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"},
]
pytest = [
{file = "pytest-6.2.4-py3-none-any.whl", hash = "sha256:91ef2131a9bd6be8f76f1f08eac5c5317221d6ad1e143ae03894b862e8976890"},
{file = "pytest-6.2.4.tar.gz", hash = "sha256:50bcad0a0b9c5a72c8e4e7c9855a3ad496ca6a881a3641b4260605450772c54b"},
]
pytest-forked = [
{file = "pytest-forked-1.3.0.tar.gz", hash = "sha256:6aa9ac7e00ad1a539c41bec6d21011332de671e938c7637378ec9710204e37ca"},
{file = "pytest_forked-1.3.0-py2.py3-none-any.whl", hash = "sha256:dc4147784048e70ef5d437951728825a131b81714b398d5d52f17c7c144d8815"},
]
pytest-xdist = [
{file = "pytest-xdist-2.3.0.tar.gz", hash = "sha256:e8ecde2f85d88fbcadb7d28cb33da0fa29bca5cf7d5967fa89fc0e97e5299ea5"},
{file = "pytest_xdist-2.3.0-py3-none-any.whl", hash = "sha256:ed3d7da961070fce2a01818b51f6888327fb88df4379edeb6b9d990e789d9c8d"},
]
regex = [
{file = "regex-2021.7.6-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e6a1e5ca97d411a461041d057348e578dc344ecd2add3555aedba3b408c9f874"},
{file = "regex-2021.7.6-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:6afe6a627888c9a6cfbb603d1d017ce204cebd589d66e0703309b8048c3b0854"},
{file = "regex-2021.7.6-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:ccb3d2190476d00414aab36cca453e4596e8f70a206e2aa8db3d495a109153d2"},
{file = "regex-2021.7.6-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:ed693137a9187052fc46eedfafdcb74e09917166362af4cc4fddc3b31560e93d"},
{file = "regex-2021.7.6-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:99d8ab206a5270c1002bfcf25c51bf329ca951e5a169f3b43214fdda1f0b5f0d"},
{file = "regex-2021.7.6-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:b85ac458354165405c8a84725de7bbd07b00d9f72c31a60ffbf96bb38d3e25fa"},
{file = "regex-2021.7.6-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:3f5716923d3d0bfb27048242a6e0f14eecdb2e2a7fac47eda1d055288595f222"},
{file = "regex-2021.7.6-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e5983c19d0beb6af88cb4d47afb92d96751fb3fa1784d8785b1cdf14c6519407"},
{file = "regex-2021.7.6-cp36-cp36m-win32.whl", hash = "sha256:c92831dac113a6e0ab28bc98f33781383fe294df1a2c3dfd1e850114da35fd5b"},
{file = "regex-2021.7.6-cp36-cp36m-win_amd64.whl", hash = "sha256:791aa1b300e5b6e5d597c37c346fb4d66422178566bbb426dd87eaae475053fb"},
{file = "regex-2021.7.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:59506c6e8bd9306cd8a41511e32d16d5d1194110b8cfe5a11d102d8b63cf945d"},
{file = "regex-2021.7.6-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:564a4c8a29435d1f2256ba247a0315325ea63335508ad8ed938a4f14c4116a5d"},
{file = "regex-2021.7.6-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:59c00bb8dd8775473cbfb967925ad2c3ecc8886b3b2d0c90a8e2707e06c743f0"},
{file = "regex-2021.7.6-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:9a854b916806c7e3b40e6616ac9e85d3cdb7649d9e6590653deb5b341a736cec"},
{file = "regex-2021.7.6-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:db2b7df831c3187a37f3bb80ec095f249fa276dbe09abd3d35297fc250385694"},
{file = "regex-2021.7.6-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:173bc44ff95bc1e96398c38f3629d86fa72e539c79900283afa895694229fe6a"},
{file = "regex-2021.7.6-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:15dddb19823f5147e7517bb12635b3c82e6f2a3a6b696cc3e321522e8b9308ad"},
{file = "regex-2021.7.6-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2ddeabc7652024803666ea09f32dd1ed40a0579b6fbb2a213eba590683025895"},
{file = "regex-2021.7.6-cp37-cp37m-win32.whl", hash = "sha256:f080248b3e029d052bf74a897b9d74cfb7643537fbde97fe8225a6467fb559b5"},
{file = "regex-2021.7.6-cp37-cp37m-win_amd64.whl", hash = "sha256:d8bbce0c96462dbceaa7ac4a7dfbbee92745b801b24bce10a98d2f2b1ea9432f"},
{file = "regex-2021.7.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:edd1a68f79b89b0c57339bce297ad5d5ffcc6ae7e1afdb10f1947706ed066c9c"},
{file = "regex-2021.7.6-cp38-cp38-manylinux1_i686.whl", hash = "sha256:422dec1e7cbb2efbbe50e3f1de36b82906def93ed48da12d1714cabcd993d7f0"},
{file = "regex-2021.7.6-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:cbe23b323988a04c3e5b0c387fe3f8f363bf06c0680daf775875d979e376bd26"},
{file = "regex-2021.7.6-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:0eb2c6e0fcec5e0f1d3bcc1133556563222a2ffd2211945d7b1480c1b1a42a6f"},
{file = "regex-2021.7.6-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:1c78780bf46d620ff4fff40728f98b8afd8b8e35c3efd638c7df67be2d5cddbf"},
{file = "regex-2021.7.6-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:bc84fb254a875a9f66616ed4538542fb7965db6356f3df571d783f7c8d256edd"},
{file = "regex-2021.7.6-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:598c0a79b4b851b922f504f9f39a863d83ebdfff787261a5ed061c21e67dd761"},
{file = "regex-2021.7.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:875c355360d0f8d3d827e462b29ea7682bf52327d500a4f837e934e9e4656068"},
{file = "regex-2021.7.6-cp38-cp38-win32.whl", hash = "sha256:e586f448df2bbc37dfadccdb7ccd125c62b4348cb90c10840d695592aa1b29e0"},
{file = "regex-2021.7.6-cp38-cp38-win_amd64.whl", hash = "sha256:2fe5e71e11a54e3355fa272137d521a40aace5d937d08b494bed4529964c19c4"},
{file = "regex-2021.7.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6110bab7eab6566492618540c70edd4d2a18f40ca1d51d704f1d81c52d245026"},
{file = "regex-2021.7.6-cp39-cp39-manylinux1_i686.whl", hash = "sha256:4f64fc59fd5b10557f6cd0937e1597af022ad9b27d454e182485f1db3008f417"},
{file = "regex-2021.7.6-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:89e5528803566af4df368df2d6f503c84fbfb8249e6631c7b025fe23e6bd0cde"},
{file = "regex-2021.7.6-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:2366fe0479ca0e9afa534174faa2beae87847d208d457d200183f28c74eaea59"},
{file = "regex-2021.7.6-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:f9392a4555f3e4cb45310a65b403d86b589adc773898c25a39184b1ba4db8985"},
{file = "regex-2021.7.6-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:2bceeb491b38225b1fee4517107b8491ba54fba77cf22a12e996d96a3c55613d"},
{file = "regex-2021.7.6-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:f98dc35ab9a749276f1a4a38ab3e0e2ba1662ce710f6530f5b0a6656f1c32b58"},
{file = "regex-2021.7.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:319eb2a8d0888fa6f1d9177705f341bc9455a2c8aca130016e52c7fe8d6c37a3"},
{file = "regex-2021.7.6-cp39-cp39-win32.whl", hash = "sha256:eaf58b9e30e0e546cdc3ac06cf9165a1ca5b3de8221e9df679416ca667972035"},
{file = "regex-2021.7.6-cp39-cp39-win_amd64.whl", hash = "sha256:4c9c3155fe74269f61e27617529b7f09552fbb12e44b1189cebbdb24294e6e1c"},
{file = "regex-2021.7.6.tar.gz", hash = "sha256:8394e266005f2d8c6f0bc6780001f7afa3ef81a7a2111fa35058ded6fce79e4d"},
]
toml = [
{file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"},
{file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"},
] ]
tomli = [
{file = "tomli-1.1.0-py3-none-any.whl", hash = "sha256:f4a182048010e89cbec0ae4686b21f550a7f2903f665e34a6de58ec15424f919"}, [[package]]
{file = "tomli-1.1.0.tar.gz", hash = "sha256:33d7984738f8bb699c9b0a816eb646a8178a69eaa792d258486776a5d21b8ca5"}, name = "tomli"
version = "1.2.3"
description = "A lil' TOML parser"
optional = false
python-versions = ">=3.6"
files = [
{file = "tomli-1.2.3-py3-none-any.whl", hash = "sha256:e3069e4be3ead9668e21cb9b074cd948f7b3113fd9c8bba083f48247aab8b11c"},
{file = "tomli-1.2.3.tar.gz", hash = "sha256:05b6166bff487dc068d322585c7ea4ef78deed501cc124060e0f238e89a9231f"},
] ]
[[package]]
name = "typing-extensions"
version = "4.10.0"
description = "Backported and Experimental Type Hints for Python 3.8+"
optional = false
python-versions = ">=3.8"
files = [
{file = "typing_extensions-4.10.0-py3-none-any.whl", hash = "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475"},
{file = "typing_extensions-4.10.0.tar.gz", hash = "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb"},
]
[metadata]
lock-version = "2.0"
python-versions = "^3.9"
content-hash = "4376b03828d7c131717dc3f1353b5cd36b56b6681184b9bb490f8a992ac15e44"

View File

@@ -6,6 +6,7 @@ from distutils.spawn import find_executable
from typing import List, Text from typing import List, Text
from subprocess import run from subprocess import run
import pytest import pytest
import os
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
@@ -22,7 +23,7 @@ def in_shell_path(shell: Text, binary: Text) -> bool:
""" """
Check whether `binary` is in interactive shell's PATH Check whether `binary` is in interactive shell's PATH
""" """
command = f"{shell} -i -c 'command -v {binary}'" command = f"{shell} -c 'command -v {binary}'"
try: try:
result = run(command, shell=True) result = run(command, shell=True)
return result.returncode == 0 return result.returncode == 0
@@ -36,22 +37,20 @@ def in_shell_path(shell: Text, binary: Text) -> bool:
shells: List[Text] = [ shells: List[Text] = [
"sh", "sh",
"bash", "bash",
"fish", "zsh",
] ]
binaries: List[Text] = [ binaries: List[Text] = [
# extend shells # extend shells
*shells, *shells,
# tools # tools
"git", "git",
"gh", "gh",
"aws",
"gcloud",
"terraform", "terraform",
"kubectl", "docker" if not os.environ.get("SKIP_DOCKER_CONFIG") else None,
"docker", "neofetch",
"docker-compose",
"screenfetch",
# language: python # language: python
"pyenv", "pyenv",
"python", "python",
@@ -59,13 +58,14 @@ binaries: List[Text] = [
"pip", "pip",
"pip3", "pip3",
"poetry", "poetry",
# langauge: js # langauge: js
"node", "node",
"npm", "npm",
"yarn", "yarn",
# language: java
"java",
] ]
binaries = [binary for binary in binaries if binary is not None]
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #