Skip to content
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
41 changes: 16 additions & 25 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,34 @@
# Contributing to this project

Thank you for your interest in contributing! We welcome contributions of all kinds, from
bug reports to new features. This document outlines our guidelines to make the process
smooth and effective.
Thank you for your interest in contributing! We welcome contributions of all kinds, from bug reports to new
features. This document outlines our guidelines to make the process smooth and effective.

## Code of Conduct

We are committed to providing a welcoming and respectful community for everyone. We
expect all contributors to adhere to a high standard of conduct. **Harassment, abusive
language, discrimination (including but not limited to racism, sexism, homophobia,
transphobia, ableism, or any other form of prejudice) will not be tolerated.**
Violations may result in removal from the project and/or reporting.
We are committed to providing a welcoming and respectful community for everyone. We expect all contributors to
adhere to a high standard of conduct. **Harassment, abusive language, discrimination (including but not
limited to racism, sexism, homophobia, transphobia, ableism, or any other form of prejudice) will not be
tolerated.** Violations may result in removal from the project and/or reporting.

## How to contribute

1. **Discuss first:** Before tackling a significant change or feature, please open an
issue to discuss your idea. This helps ensure it aligns with the project's goals and
avoids wasted effort.
1. **Discuss first:** Before tackling a significant change or feature, please open an issue to discuss your
idea. This helps ensure it aligns with the project's goals and avoids wasted effort.

2. **Code style & formatting:** We aim for consistent code style throughout the project.

- Please run any automated formatting tools included in this repository (e.g.,
`pre-commit`, `prettier`, `ruff`, `go fmt`). Check the `.editorconfig` or build
scripts for details.
- Please run any automated formatting tools included in this repository (e.g., `pre-commit`, `prettier`,
`ruff`, `go fmt`). Check the `.editorconfig` or build scripts for details.
- Try to follow existing coding conventions within the codebase.

3. **Submit a pull request:** When you're ready to contribute:

- Create a pull request against the `main` branch.
- In your PR description, _clearly explain_:
- **What changed?** A concise summary of your changes.
- **Why did you make this change?** What problem does it solve or what improvement
does it offer?
- **Output Changes (if applicable):** If your changes affect the output of the
project (e.g., UI, logs), please include screenshots _before and after_ to
illustrate the impact.

4. **Be patient:** We are a small team with limited time dedicated to managing this
repository. We will review pull requests as quickly as possible, but it may take some
time. Your patience is greatly appreciated!
- **Why did you make this change?** What problem does it solve or what improvement does it offer?
- **Output Changes (if applicable):** If your changes affect the output of the project (e.g., UI, logs),
please include screenshots _before and after_ to illustrate the impact.

4. **Be patient:** We are a small team with limited time dedicated to managing this repository. We will review
pull requests as quickly as possible, but it may take some time. Your patience is greatly appreciated!

Thanks again for your contribution!
36 changes: 18 additions & 18 deletions .github/workflows/build-and-upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Log in to the Container registry
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}

- name: Set up Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: "3.13"

- name: Install regctl
run: |
Expand Down Expand Up @@ -65,7 +77,7 @@ jobs:
image: "tonistiigi/binfmt@sha256:66e11bea77a5ea9d6f0fe79b57cd2b189b5d15b93a2bdb925be22949232e4e55"

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1

- name: Setup custom builder
run: |
Expand All @@ -74,25 +86,13 @@ jobs:
- name: Run local Docker registry
run: docker run -d -p 5000:5000 --name registry --network=host registry:2

- name: Set up Python
uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4.6.1
with:
python-version: 3.9

- name: Install Poetry
run: pip install poetry

- name: Install dependencies
run: poetry install
- name: Install Dibber
run: pip install dibber

- name: Build images
run: poetry run build_multiplatform --parallel 8
run: dibber build-multiplatform --parallel 8

- name: Upload images
if: success()
run: |
echo "$PASSWORD" | docker login ghcr.io --username "$USERNAME" --password-stdin
poetry run upload
env:
PASSWORD: ${{ secrets.GHCR_PAT }}
USERNAME: ${{ secrets.GHCR_USERNAME }}
dibber upload
2 changes: 1 addition & 1 deletion .github/workflows/keepalive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Keepalive
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Prepare git
run: |
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ jobs:
# added or changed files to the repository.
contents: write
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Set up Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: "3.10"
python-version: "3.13"

# Run pre-commit --all-files
- uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507 # v3.0.0
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1

# Commit all changed files back to the repository
- uses: stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a # v4.16.0
- uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1
if: always()
19 changes: 8 additions & 11 deletions .github/workflows/scan-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,21 @@ jobs:
name: Build docker images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: 3.9
python-version: "3.13"

- name: Install Poetry
run: pip install poetry

- name: Install dependencies
run: poetry install
- name: Install Dibber
run: pip install dibber

- name: Build images
run: poetry run build --parallel 8
run: dibber build --parallel 8

- name: List images
run: poetry run list
run: dibber list

- name: Install Trivy
run: |
Expand All @@ -51,4 +48,4 @@ jobs:
trivy image --download-db-only

- name: Trivy security scan
run: poetry run scan
run: dibber scan
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,5 @@ cython_debug/
.idea
.vscode
.DS_Store

.python-version
37 changes: 16 additions & 21 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
rev: v0.11.0.1
hooks:
# Run shellcheck for all .sh files
- id: shellcheck

- repo: https://github.com/pycqa/isort
rev: 6.0.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.12
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 25.1.0
hooks:
# Format Python files
- id: black
language_version: python3
- id: ruff
name: ruff lint
args: [--fix]
- id: ruff
name: ruff sort imports
args: ["--select", "I", "--fix"]
- id: ruff-format
name: ruff format

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
# Clean up trailing whitespace
- id: trailing-whitespace
Expand Down Expand Up @@ -53,27 +53,22 @@ repos:
- id: check-added-large-files

- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
rev: 1.8.6
hooks:
# Do a security scan with Bandit
- id: bandit
args: ["--ini", ".bandit", "-r"]
args: ["--configfile", "bandit.yaml"]
exclude: |
(?x)^(
.*/tests/.*
)$

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
- repo: https://github.com/rbubley/mirrors-prettier/
rev: v3.6.2
hooks:
# Run prettier to format non-Python files
- id: prettier

- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8

- repo: https://github.com/twu/skjold
rev: v0.6.2
hooks:
Expand Down
18 changes: 0 additions & 18 deletions .prettierrc.js

This file was deleted.

13 changes: 13 additions & 0 deletions .prettierrc.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
printWidth = 110
trailingComma = "es5"
useTabs = false
tabWidth = 2
semi = false
singleQuote = false
endOfLine = "lf"
proseWrap = 'always'

[[overrides]]
files = "*.{yaml,yml}"
[overrides.options]
proseWrap = "preserve"
Loading
Loading