This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import yaml | |
| from pathlib import Path | |
| import re | |
| import argparse | |
| import os | |
| import sys | |
| class Args(argparse.Namespace): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| repos: | |
| - repo: https://github.com/psf/black | |
| rev: 23.1.0 | |
| hooks: | |
| - id: black | |
| args: [--config=./pyproject.toml] | |
| - repo: https://github.com/python-poetry/poetry | |
| rev: 1.3.0 | |
| hooks: | |
| - id: poetry-check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: cockroachdb | |
| spec: | |
| selector: | |
| app: cockroachdb | |
| type: ClusterIP | |
| ports: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: postgres | |
| spec: | |
| selector: | |
| app: postgres | |
| ports: | |
| - port: 5432 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Builder container uses pdm to install dependencies | |
| FROM python:3.10 AS builder | |
| ENV PDM_VERSION=1.13.4 | |
| WORKDIR /build | |
| COPY pdm.lock pyproject.toml ./ | |
| RUN python -m pip install --upgrade pip setuptools wheel | |
| RUN pip install pdm && pdm install --prod --no-lock --no-editable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [tool.black] | |
| line-length = 100 | |
| include = '\.pyi?$' | |
| exclude = ''' | |
| /( | |
| \.git | |
| | \.mypy_cache | |
| | \.tox | |
| | \.venv | |
| | venv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [flake8] | |
| # Specify a list of codes to ignore. | |
| ignore = | |
| E203, # whitespace before ‘:’ (conflicts with black) | |
| E501, # line too long (black will fix this) | |
| W503, # line break before binary operator (conflicts with black) | |
| F821, # undefined name error, (bug in pyflakes) | |
| max-line-length = 100 | |
| max-complexity = 12 | |
| # Specify the list of error codes you wish Flake8 to report. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Apply to all files without committing: | |
| # pre-commit run --all-files | |
| # Update this file: | |
| # pre-commit autoupdate | |
| repos: | |
| # format markdown files | |
| - repo: https://github.com/pre-commit/mirrors-prettier | |
| rev: "v2.6.1" | |
| hooks: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| prefixes = ["", "SCHEMA_REGISTRY", "SCHEMA_REGISTRY_SCHEMA_REGISTRY"] | |
| middle = ["CONFLUENT", "KAFKASTORE", "ACL", "TOPIC"] | |
| suffix = ["GROUP_ID", "GROUPID", "CONSUMER_GROUP_ID", "CONSUMER_GROUPID", "GROUP"] | |
| from itertools import permutations | |
| middle_choices = [] | |
| for a in range(len(middle)+1): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Significantly reduces the size of the repository | |
| # The scripts can be converted back into notebooks, but the cache will be lost | |
| # Excludes the directory ./venv and any directory with a . prefix such as .git | |
| # Converts all jupyter notebooks to python scripts recursively starting from $(pwd) | |
| find . -path ./venv -prune -false -o -name '*.ipynb' | xargs -0 jupyter nbconvert --to script |
NewerOlder