Skip to content

Refactor to add more tests and mac global searches #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,716 changes: 1,716 additions & 0 deletions .devcontainer/.p10k.zsh

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions .devcontainer/alpine-arm64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM arm64v8/python:3.11-alpine
RUN apk add gcc libc-dev linux-headers musl-dev zlib zlib-dev python3-dev curl
RUN python3 -m pip install ipykernel
RUN sh -c "$(curl -fsSL https://github.com/deluan/zsh-in-docker/releases/download/v1.1.5/zsh-in-docker.sh)" -- \
-t powerlevel10k/powerlevel10k \
-p git \
-p git-extras \
-p https://github.com/zsh-users/zsh-completions
RUN git clone https://github.com/romkatv/powerlevel10k $HOME/.oh-my-zsh/custom/themes/powerlevel10k
RUN curl https://raw.githubusercontent.com/DonJayamanne/vscode-jupyter/containerChanges/.devcontainer/.p10k.zsh > ~/.p10k.zsh
RUN echo "# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh." >> ~/.zshrc
RUN echo "[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh" >> ~/.zshrc
# Install Rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
ENV PATH="/root/.cargo/bin:${PATH}"
18 changes: 18 additions & 0 deletions .devcontainer/alpine-arm64/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "alpine-arm64",
"build": {
"context": "../..",
"dockerfile": "./Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python@prerelease",
"esbenp.prettier-vscode",
"rust-lang.rust-analyzer",
"EditorConfig.EditorConfig"
]
}
},
"workspaceFolder": "/workspaces/python-environment-tools"
}
16 changes: 16 additions & 0 deletions .devcontainer/alpine-x64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM amd64/python:3.11-alpine
RUN apk add gcc libc-dev linux-headers musl-dev zlib zlib-dev python3-dev curl
RUN python -m pip install ipykernel
RUN sh -c "$(curl -fsSL https://github.com/deluan/zsh-in-docker/releases/download/v1.1.5/zsh-in-docker.sh)" -- \
-t powerlevel10k/powerlevel10k \
-p git \
-p git-extras \
-p https://github.com/zsh-users/zsh-completions
RUN git clone https://github.com/romkatv/powerlevel10k $HOME/.oh-my-zsh/custom/themes/powerlevel10k
RUN curl https://raw.githubusercontent.com/DonJayamanne/vscode-jupyter/containerChanges/.devcontainer/.p10k.zsh > ~/.p10k.zsh
RUN echo "# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh." >> ~/.zshrc
RUN echo "[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh" >> ~/.zshrc
# Install Rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
ENV PATH="/root/.cargo/bin:${PATH}"
18 changes: 18 additions & 0 deletions .devcontainer/alpine-x64/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "alpine-x64",
"build": {
"context": "../..",
"dockerfile": "./Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python@prerelease",
"esbenp.prettier-vscode",
"rust-lang.rust-analyzer",
"EditorConfig.EditorConfig"
]
}
},
"workspaceFolder": "/workspaces/python-environment-tools"
}
14 changes: 14 additions & 0 deletions .devcontainer/fedora/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM fedora

# Setup Python
# https://developer.fedoraproject.org/tech/languages/python/multiple-pythons.html
RUN sudo dnf install python3.9 python3.11 -y
# zsh
RUN sudo dnf install zsh git -y
RUN sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" -y
# Install Homebrew
# Not supported on arm64
# Install pyenv
# Install Rust
# https://developer.fedoraproject.org/tech/languages/rust/rust-installation.html
RUN sudo dnf install rust cargo rustup -y
18 changes: 18 additions & 0 deletions .devcontainer/fedora/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "fedora",
"build": {
"context": "../..",
"dockerfile": "./Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python@prerelease",
"esbenp.prettier-vscode",
"rust-lang.rust-analyzer",
"EditorConfig.EditorConfig"
]
}
},
"workspaceFolder": "/workspaces/python-environment-tools"
}
23 changes: 23 additions & 0 deletions .devcontainer/linux-arm64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM arm64v8/ubuntu

RUN apt-get update
# zsh
RUN apt-get install wget -y
RUN sh -c "$(wget -qO- https://github.com/deluan/zsh-in-docker/releases/download/v1.1.5/zsh-in-docker.sh)" -- \
-t powerlevel10k/powerlevel10k \
-p git \
-p git-extras \
-p https://github.com/zsh-users/zsh-completions
RUN git clone https://github.com/romkatv/powerlevel10k $HOME/.oh-my-zsh/custom/themes/powerlevel10k
RUN wget -O ~/.p10k.zsh https://raw.githubusercontent.com/DonJayamanne/vscode-jupyter/containerChanges/.devcontainer/.p10k.zsh
RUN echo "# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh." >> ~/.zshrc
RUN echo "[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh" >> ~/.zshrc
# Install Rust
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
ENV PATH="/root/.cargo/bin:${PATH}"
# Install Python
RUN apt-get install -y build-essential
RUN apt-get install -y --no-install-recommends software-properties-common build-essential
RUN add-apt-repository -y ppa:deadsnakes/ppa
RUN apt-get install python3.9 python3.10 python3-pip -y
18 changes: 18 additions & 0 deletions .devcontainer/linux-arm64/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "linux-arm64",
"build": {
"context": "../..",
"dockerfile": "./Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python@prerelease",
"esbenp.prettier-vscode",
"rust-lang.rust-analyzer",
"EditorConfig.EditorConfig"
]
}
},
"workspaceFolder": "/workspaces/python-environment-tools"
}
10 changes: 10 additions & 0 deletions .devcontainer/linux-armhf/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# FROM arm32v7/ubuntu
FROM arm32v7/python
RUN apt-get update
RUN apt-get install libatomic1
# Install Rust
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
ENV PATH="/root/.cargo/bin:${PATH}"
# Install Python
# This image seems to come with Python 3.11 and 3.12
18 changes: 18 additions & 0 deletions .devcontainer/linux-armhf/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "linux-armhf",
"build": {
"context": "../..",
"dockerfile": "./Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python@prerelease",
"esbenp.prettier-vscode",
"rust-lang.rust-analyzer",
"EditorConfig.EditorConfig"
]
}
},
"workspaceFolder": "/workspaces/python-environment-tools"
}
37 changes: 37 additions & 0 deletions .devcontainer/linux-x64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM amd64/ubuntu

# Setup Python
RUN apt-get update && \
apt-get install -y --no-install-recommends software-properties-common && \
add-apt-repository -y ppa:deadsnakes/ppa
RUN apt-get install python3.9 python3.10 python3-pip -y
# RUN apt install zsh -y
# RUN chsh -s $(which zsh)
# RUN sh -c "$(curl -fsSL https://github.com/deluan/zsh-in-docker/releases/download/v1.1.5/zsh-in-docker.sh)"
# RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.1.1/zsh-in-docker.sh)" -- \
RUN apt install curl -y
RUN sh -c "$(curl -fsSL https://github.com/deluan/zsh-in-docker/releases/download/v1.1.5/zsh-in-docker.sh)" -- \
-t powerlevel10k/powerlevel10k \
-p git \
-p git-extras \
-p https://github.com/zsh-users/zsh-completions
RUN git clone https://github.com/romkatv/powerlevel10k $HOME/.oh-my-zsh/custom/themes/powerlevel10k
RUN curl https://raw.githubusercontent.com/DonJayamanne/vscode-jupyter/containerChanges/.devcontainer/.p10k.zsh > ~/.p10k.zsh
RUN echo "# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh." >> ~/.zshrc
RUN echo "[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh" >> ~/.zshrc
# Install Linuxbrew
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
USER root
ENV PATH="/home/linuxbrew/.linuxbrew/bin:${PATH}"
RUN /home/linuxbrew/.linuxbrew/bin/brew install [email protected] -q
RUN /home/linuxbrew/.linuxbrew/bin/brew install [email protected] -q
# Install pyenv
RUN sh -c "$(curl https://pyenv.run)"
RUN echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
RUN echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
RUN echo 'eval "$(pyenv init -)"' >> ~/.zshrc
# RUN pyenv install 3.10.11
# Install Rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
ENV PATH="/root/.cargo/bin:${PATH}"
18 changes: 18 additions & 0 deletions .devcontainer/linux-x64/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "linux-x64",
"build": {
"context": "../..",
"dockerfile": "./Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python@prerelease",
"esbenp.prettier-vscode",
"rust-lang.rust-analyzer",
"EditorConfig.EditorConfig"
]
}
},
"workspaceFolder": "/workspaces/python-environment-tools"
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ target/
*.pdb

# Directory with generated environments (generally created on CI)
tmp
tmp
.DS_Store
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"rust-lang.rust-analyzer",
"EditorConfig.EditorConfig"
]
}
22 changes: 22 additions & 0 deletions .vscode/shared.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
// Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. The scope defines in watch languages the snippet is applicable. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted.Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
"MSFT Copyright Header": {
"scope": "rust",
"prefix": [
"header",
"copyright",
"lic"
],
"body": [
"// Copyright (c) Microsoft Corporation.",
"// Licensed under the MIT License.",
"",
"$2"
],
"description": "License Header"
}
}
Loading