Skip to content

Commit

Permalink
fix: incorporate cruft
Browse files Browse the repository at this point in the history
  • Loading branch information
billsioros committed Mar 4, 2024
1 parent 7fb9f59 commit 20865c4
Show file tree
Hide file tree
Showing 25 changed files with 1,635 additions and 1,515 deletions.
20 changes: 20 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"template": "https://github.com/billsioros/cookiecutter-pypackage",
"commit": "bc3d3a703911af1dabcbf711ddc779d33721c777",
"checkout": null,
"context": {
"cookiecutter": {
"project_name": "querpyable",
"package_name": "querpyable",
"project_description": "A Python implementation of LINQ",
"author": "Vasilis Sioros",
"email": "[email protected]",
"github_user": "billsioros",
"github_repository": "https://github.com/billsioros/querpyable",
"version": "2.0.0",
"license": "mit",
"_template": "https://github.com/billsioros/cookiecutter-pypackage"
}
},
"directory": null
}
47 changes: 47 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM mcr.microsoft.com/devcontainers/python:1-3.9-bullseye

# Set up zsh
RUN apt-get update && \
apt-get install -y zsh curl fonts-powerline fonts-firacode \
&& chsh -s /usr/bin/zsh

# Install Meslo Nerd Font
RUN mkdir -p /usr/share/fonts/truetype/meslo \
&& curl -sSL -o /usr/share/fonts/truetype/meslo/MesloLGS_NF-Regular.ttf https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf \
&& curl -sSL -o /usr/share/fonts/truetype/meslo/MesloLGS_NF-Bold.ttf https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf \
&& curl -sSL -o /usr/share/fonts/truetype/meslo/MesloLGS_NF-Italic.ttf https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf \
&& curl -sSL -o /usr/share/fonts/truetype/meslo/MesloLGS_NF-BoldItalic.ttf https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf \
&& fc-cache -f -v

# Set up Oh-my-Zsh
ENV ZSH="${HOME}/.oh-my-zsh"
RUN rm -rf ${ZSH}
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
RUN sed -i 's/ZSH_THEME=.*/ZSH_THEME="powerlevel10k\/powerlevel10k"/' ${HOME}/.zshrc

# Install Powerlevel10k theme
RUN git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $ZSH/themes/powerlevel10k

# Install zsh-autosuggestions
RUN git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions.git $ZSH/plugins/zsh-autosuggestions

# Install zsh-completions
RUN git clone --depth=1 https://github.com/zsh-users/zsh-completions.git $ZSH/plugins/zsh-completions

# Install zsh-syntax-highlighting
RUN git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH/plugins/zsh-syntax-highlighting

# Install additional plugins
RUN sed -i 's/^plugins=(\(.*\))/plugins=(git poetry docker zsh-autosuggestions zsh-completions zsh-syntax-highlighting)/' ${HOME}/.zshrc

# Set up Poetry
ENV PATH="${HOME}/.poetry/bin:${PATH}"
ENV POETRY_HOME=${HOME}/.poetry
ENV POETRY_NO_INTERACTION=1
ENV POETRY_VIRTUALENVS_CREATE=0
ENV POETRY_VERSION=1.2.2
RUN curl -sSL https://install.python-poetry.org | python -
RUN mkdir -p ${HOME}/.cache/pypoetry/virtualenvs
RUN touch ${HOME}/.cache/pypoetry/virtualenvs/envs.toml

RUN mkdir /workspaces
83 changes: 83 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"build": {
"dockerfile": "./Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.mypy-type-checker",
"ms-python.black-formatter",
"ms-python.isort",
"charliermarsh.ruff",
"njpwerner.autodocstring",
"teabyii.ayu",
"PKief.material-icon-theme",
"aaron-bond.better-comments",
"alefragnani.Bookmarks",
"streetsidesoftware.code-spell-checker",
"yzhang.markdown-all-in-one",
"davidanson.vscode-markdownlint",
"wayou.vscode-todo-highlight",
"editorconfig.editorconfig",
"christian-kohler.path-intellisense",
"eamodio.gitlens",
"bungcip.better-toml",
"redhat.vscode-yaml",
"almenon.arepl",
"ms-azuretools.vscode-docker"
],
"settings": {
"git.confirmForcePush": false,
"git.autofetch": true,
"git.allowForcePush": true,
"python.formatting.provider": "black",
"python.defaultInterpreterPath": "/usr/local/bin/python",
"python.terminal.activateEnvironment": false,
"python.languageServer": "Pylance",
"python.linting.enabled": true,
"python.linting.mypyEnabled": true,
"python.analysis.enabled": true,
"[python]": {
"editor.formatOnType": true,
"editor.defaultFormatter": "ms-python.black-formatter"
},
"files.autoSave": "afterDelay",
"files.trimTrailingWhitespace": true,
"files.trimFinalNewlines": true,
"terminal.integrated.fontSize": 17,
"terminal.integrated.defaultProfile.linux": "zsh",
"terminal.integrated.profiles.linux": {
"zsh": {
"path": "/usr/bin/zsh",
"icon": "terminal",
"env": {}
}
},
"terminal.integrated.cursorBlinking": true,
"terminal.integrated.cursorStyle": "line",
"editor.cursorBlinking": "smooth",
"editor.fontSize": 17,
"editor.formatOnPaste": true,
"editor.fontFamily": "'Fira Code', 'Source Code Pro', Consolas, 'Courier New', monospace",
"editor.suggestSelection": "first",
"editor.fontLigatures": true,
"editor.guides.indentation": true
}
}
},
"features": {
"ghcr.io/devcontainers/features/github-cli": {},
"ghcr.io/devcontainers/features/docker-in-docker": {
"version": "latest",
"moby": true,
"dockerDashComposeVersion": "v1"
}
},
"postCreateCommand": "poetry install && poetry run pre-commit install --install-hooks",
"forwardPorts": [
8000
],
"remoteUser": "root"
}
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,3 @@ indent_size = unset

[*.txt]
indent_size = unset

[.all-contributorsrc]
indent_size = unset
32 changes: 32 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"labels": [
":game_die: dependencies"
],
"extends": [
"config:base",
"schedule:nonOfficeHours"
],
"packageRules": [
{
"matchUpdateTypes": [
"minor",
"patch",
"pin",
"digest"
],
"autoApprove": true,
"automerge": true
},
{
"matchDepTypes": [
"devDependencies"
],
"autoApprove": true,
"automerge": true
}
],
"assigneesFromCodeOwners": true,
"vulnerabilityAlerts": {
"enabled": true
}
}
17 changes: 0 additions & 17 deletions .github/stale.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: relekang/python-semantic-release@v7.33.5
- uses: relekang/python-semantic-release@v7.34.6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pypi_token: ${{ secrets.PYPI_TOKEN }}
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,28 @@ on:
push:
branches: [master]
paths:
- 'src/**/*.py'
- 'tests/**/*.py'
- 'pyproject.toml'
- "src/**/*.py"
- "tests/**/*.py"
- "pyproject.toml"
pull_request:
branches: [master]
paths:
- 'src/**/*.py'
- 'tests/**/*.py'
- 'pyproject.toml'
- "src/**/*.py"
- "tests/**/*.py"
- "pyproject.toml"
jobs:
test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: abatilo/[email protected]
with:
Expand All @@ -32,7 +36,7 @@ jobs:
uses: actions/[email protected]
with:
path: .venv
key: venv-${{ hashFiles('**/poetry.lock') }}
key: venv-${{ runner.os }}-${{ matrix.platform }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: |
poetry install
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/dependency_review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 'Dependency Review'
on: [pull_request]
permissions:
contents: read
jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
14 changes: 0 additions & 14 deletions .github/workflows/fossa.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v3.2.0
uses: crazy-max/ghaction-github-labeler@v3.1.1
24 changes: 24 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'
permissions:
contents: write
issues: write
pull-requests: write
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
with:
days-before-stale: 7
days-before-close: 7
exempt-issue-labels: ':pushpin: pinned'
exempt-pr-labels: ':pushpin: pinned'
stale-issue-label: ':skull: stale'
stale-pr-label: ':skull: stale'
stale-issue-message: 'This issue has been marked stale, as it had no activity in the last 7 days. If the issue remains stale for an additional 7 days (a total of two weeks with no activity), it will be automatically closed.'
stale-pr-message: 'This issue has been marked stale, as it had no activity in the last 7 days. If the issue remains stale for an additional 7 days (a total of two weeks with no activity), it will be automatically closed.'
close-issue-message: 'Closing the issue due to inactivity.'
close-pr-message: 'Closing the issue due to inactivity.'
24 changes: 0 additions & 24 deletions .gitpod.Dockerfile

This file was deleted.

40 changes: 0 additions & 40 deletions .gitpod.yml

This file was deleted.

Loading

0 comments on commit 20865c4

Please sign in to comment.