Skip to content

Commit

Permalink
nit wip
Browse files Browse the repository at this point in the history
  • Loading branch information
usrbinkat committed Nov 27, 2024
1 parent a78345e commit a757d24
Show file tree
Hide file tree
Showing 8 changed files with 6,090 additions and 450 deletions.
2 changes: 2 additions & 0 deletions .cursorignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ smce-cli
**/config
**/credentials
**/.gitconfig
.github/staging
.mypy_cache
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"redhat.vscode-yaml",
"esbenp.prettier-vscode",
"oderwat.indent-rainbow",
"ms-python.black-formatter",
"okteto.kubernetes-context",
"pulumi.pulumi-vscode-tools",
"ms-vsliveshare.vsliveshare",
Expand Down
12 changes: 6 additions & 6 deletions .github/bin/cloc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -euo pipefail
# Usage: ~$ cloc [-s] [-h]
# -s: silent mode, only outputs the number
# -h, --help: show this help message
# Description: Analyzes Python code in the ./pulumi directory, excluding:
# Description: Analyzes Python code in the ./ directory, excluding:
# - Comments (lines starting with #)
# - Empty lines and whitespace
# - Docstrings (multi-line strings between """ or ''')
Expand All @@ -21,7 +21,7 @@ print_help() {
echo " -h Show this help message"
echo ""
echo "Description:"
echo " Analyzes Python code in the ./pulumi directory, excluding:"
echo " Analyzes Python code in the ./ directory, excluding:"
echo " - Comments (lines starting with #)"
echo " - Empty lines and whitespace"
echo " - Docstrings (multi-line strings between \"\"\" or ''')"
Expand Down Expand Up @@ -58,17 +58,17 @@ done
# Ensure we're in the root directory
cd "$(dirname "$0")/../.." || exit 1

# Verify pulumi directory exists
if [[ ! -d "./pulumi" ]]; then
[[ "$SILENT" = false ]] && echo "Error: ./pulumi directory not found!" >&2
# Verify directory exists
if [[ ! -d "./" ]]; then
[[ "$SILENT" = false ]] && echo "Error: ./ directory not found!" >&2
exit 1
fi

[[ "$SILENT" = false ]] && echo "Analyzing Python code in Pulumi Infrastructure as Code (IaC) directory..."
[[ "$SILENT" = false ]] && echo "Excluding comments, docstrings, and blank lines..."

# Count lines across all Python files
total_lines=$(find ./pulumi -name "*.py" -type f -exec awk '
total_lines=$(find ./ -name "*.py" -type f -exec awk '
BEGIN {
in_docstring = 0
count = 0
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ smce-cli
**/.gitconfig
modules/aws.bak
.coverage
.mypy_cache
5,897 changes: 5,624 additions & 273 deletions .vscode/settings.json

Large diffs are not rendered by default.

285 changes: 285 additions & 0 deletions .vscode/settings.json.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,285 @@
{
"window.title": "${localWorkspaceFolderBasename}${separator}${activeEditorShort}",
"window.density.editorTabHeight": "compact",
"search.defaultViewMode": "list",
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/vendor": true,
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/.gitkeep": true,
"**/.gitignore": true,
"**/.gitattributes": true,
"**/.editorconfig": true,
"**/.vscode": true,
"**/.vscode-test": true
},
"vim.disableExtension": true,
"vim.useSystemClipboard": true,
"vim.useCtrlKeys": true,
"vim.easymotion": true,
"vim.incsearch": true,
"vim.hlsearch": true,
"vim.cursorStylePerMode": {
"normal": "block",
"insert": "line",
"visual": "underline",
"visualline": "underline",
"visualblock": "underline",
"replace": "block"
},
"vim.insertModeKeyBindings": [
{
"before": [
"j",
"j"
],
"after": [
"<esc>"
]
}
],
"vim.handleKeys": {
"<C-a>": false,
"<C-f>": false
},
"extensions.experimental.affinity.vscodevim.vim": 1,
"zenMode.restore": false,
"zenMode.fullScreen": false,
"zenMode.hideMinimap": true,
"zenMode.centerLayout": false,
"zenMode.hideStatusBar": true,
"zenMode.hideActivityBar": true,
"zenMode.showTabs": "multiple",
"zenMode.hideLineNumbers": false,
"zenMode.silentNotifications": true,
"zenMode.hideLineDecorations": false,
"zenMode.hideCursorInOverviewRuler": true,
"editor.tabSize": 4,
"editor.fontSize": 14,
"editor.autoSave": "onFocusChange",
"editor.wordWrap": "on",
"editor.showTabs": true,
"editor.showIcons": true,
"editor.tabSizing": "shrink",
"editor.lineHeight": 20,
"editor.autoIndent": "full",
"editor.lineNumbers": "relative",
"editor.formatOnSave": true,
"editor.insertSpaces": true,
"editor.tabScrolling": "auto",
"editor.tabCompletion": "on",
"editor.tabDecoration": true,
"editor.fontLigatures": true,
"editor.tabCloseButton": "right",
"editor.openPositioning": "right",
"editor.restoreViewState": true,
"editor.renderWhitespace": "all",
"editor.suggestSelection": "first",
"editor.closeOnFileDelete": true,
"editor.autoClosingQuotes": "always",
"editor.snippetSuggestions": "top",
"editor.autoClosingBrackets": "always",
"editor.tabHistoryNavigation": true,
"editor.quickSuggestionsDelay": 50,
"editor.autoImportCompletions": true,
"editor.scrollBeyondLastLine": true,
"editor.highlightModifiedTabs": true,
"editor.trimTrailingWhitespace": true,
"editor.lineHighlightBackground": "#30BFBF",
"editor.inlineSuggest.enabled": true,
"editor.parameterHints.enabled": true,
"editor.fontFamily": "'FiraMono Nerd Font Mono', monospace",
"editor.minimap.enabled": false,
"editor.gotoLocation": {
"multipleReferences": "goto",
"multipleDefinitions": "goto",
"multipleDeclarations": "goto",
"multipleImplementations": "goto",
"multipleTypeDefinitions": "goto"
},
"editor.scrollbar.alwaysConsumeMouseWheel": true,
"editor.bracketPairColorization.enabled": true,
"files.encoding": "utf8",
"files.autoSave": "onFocusChange",
"files.trimFinalNewlines": true,
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"git.enabled": true,
"git.autofetch": true,
"git.autoStash": true,
"git.autorefresh": true,
"git.gitProtocol": "https",
"git.ignoreSubmodules": true,
"git.enableSmartCommit": true,
"git.ignoreLegacyWarning": true,
"git.autoRepositoryDetection": "openEditors",
"git.defaultCloneParentDirectory": "/workspaces",
"git.path": "/usr/local/bin/git",
"git.scanRepositories": [
"/workspaces/konductor",
"/workspaces/devcontainer",
"/workspaces/kargo"
],
"python.analysis.typeCheckingMode": "strict",
"go.testTags": "all",
"go.vetOnSave": "off",
"go.buildTags": "all",
"go.lintOnSave": "off",
"go.formatTool": "goimports",
"go.testEnvVars": {
"GOFLAGS": "-count=1"
},
"go.generateTestsFlags": [
"-count=1"
],
"terminal.integrated.fontSize": 14,
"terminal.integrated.scrollback": 10000,
"terminal.integrated.cursorStyle": "block",
"terminal.integrated.hideOnStartup": "always",
"terminal.integrated.cursorBlinking": true,
"terminal.integrated.copyOnSelection": true,
"terminal.integrated.sendKeybindingsToShell": false,
"terminal.integrated.cursorStyleInactive": "line",
"terminal.integrated.fontFamily": "FiraMono Nerd Font Mono",
"terminal.integrated.scrollbar.alwaysConsumeMouseWheel": true,
"terminal.integrated.shell.linux": "/usr/bin/bash",
"terminal.integrated.commandsToSkipShell": [],
"vs-kubernetes.namespace": "*",
"vs-kubernetes.outputFormat": "yaml",
"vs-kubernetes.helm-path": "/usr/local/bin/helm",
"vs-kubernetes.kubeconfig": "/home/vscode/.kube/config",
"vs-kubernetes.kubectl-path": "/usr/local/bin/kubectl",
"vs-kubernetes.knownKubeconfigs": [
"/workspaces/*/.kube/config",
"/home/vscode/*/.kube/config",
"/home/vscode/.kube/config"
],
"remote.restoreForwardedPorts": true,
"remote.localPortHost": "localhost",
"2gua.rainbow-brackets": true,
"indentRainbow.indicatorStyle": "light",
"indentRainbow.colorOnWhiteSpaceOnly": true,
"indentRainbow.lightIndicatorStyleLineWidth": 12,
"indentRainbow.ignoreEmptyLines": true,
"indentRainbow.errorColor": "rgba(255, 20, 147, 0.3)",
"indentRainbow.tabmixColor": "rgba(128, 32, 96, 0.3)",
"indentRainbow.colors": [
"rgba(50, 150, 250, 0.1)",
"rgba(200, 50, 250, 0.1)",
"rgba(50, 250, 150, 0.1)",
"rgba(250, 50, 150, 0.1)",
"rgba(50, 200, 250, 0.1)",
"rgba(150, 50, 250, 0.1)",
"rgba(50, 250, 200, 0.1)",
"rgba(250, 150, 50, 0.1)"
],
"indentRainbow.ignoreErrorLanguages": [
"haskell",
"markdown",
"plaintext",
"shellscript",
"dockerfile",
"plaintext"
],
"workbench.colorTheme": "2077",
"explorer.openEditors.visible": 1,
"explorer.autoRevealExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/**": true,
"**/venv/**": true
},
"explorer.autoReveal": true,
"explorer.sortOrder": "filesFirst",
"[makefile]": {
"editor.tabSize": 4,
"editor.insertSpaces": false,
"editor.renderWhitespace": "selection"
},
"[yaml]": {
"editor.trimTrailingWhitespace": true,
"editor.insertFinalNewline": true,
"editor.wordWrap": "off",
"editor.lineNumbers": "relative",
"editor.renderWhitespace": "all",
"editor.autoSave": "onFocusChange",
"editor.formatOnSave": true,
"editor.insertSpaces": true,
"editor.tabSize": 4,
"editor.minimap.enabled": true,
"editor.scrollBeyondLastLine": true,
"editor.scrollbar.alwaysConsumeMouseWheel": true
},
"[markdown]": {
"editor.tabSize": 4,
"editor.wordWrap": "on",
"editor.autoSave": "onFocusChange",
"editor.lineNumbers": "relative",
"editor.formatOnSave": false,
"editor.insertSpaces": true,
"editor.minimap.enabled": false,
"editor.renderWhitespace": "all",
"editor.insertFinalNewline": true,
"editor.scrollBeyondLastLine": true,
"editor.trimTrailingWhitespace": false,
"editor.scrollbar.alwaysConsumeMouseWheel": true
},
"editor.guides.highlightActiveIndentation": true,
"zoma.vscode-auto-open-workspace.enableAutoOpenIfSingleWorkspace": false,
"zoma.vscode-auto-open-workspace.enableAutoOpenAlwaysFirst": false,
"settings.cycle": [
{
"id": "zenOn",
"overrideWorkspaceSettings": true,
"values": [
{
"workbench.activityBar.visible": false,
"workbench.statusBar.visible": false,
"workbench.editor.showTabs": false,
"window.menuBarVisibility": "hidden",
"workbench.layoutControl.enabled": false,
"breadcrumbs.enabled": false,
"workbench.tips.enabled": false,
"editor.overviewRulerBorder": false,
"window.commandCenter": false,
"workbench.sideBar.location": "right",
"window.title": "${folderName}${separator}${profileName}",
"workbench.startupEditor": "none",
"editor.minimap.enabled": false,
"workbench.editor.decorations.colors": false,
"workbench.editor.decorations.badges": false
}
]
},
{
"id": "zenOff",
"overrideWorkspaceSettings": true,
"values": [
{
"workbench.activityBar.visible": true,
"workbench.statusBar.visible": true,
"workbench.editor.showTabs": true,
"window.menuBarVisibility": "classic",
"workbench.layoutControl.enabled": true,
"breadcrumbs.enabled": true,
"workbench.tips.enabled": false,
"editor.overviewRulerBorder": true,
"window.commandCenter": true,
"workbench.sideBar.location": "right",
"window.title": "${folderName}${separator}${profileName}",
"workbench.startupEditor": "none",
"editor.minimap.enabled": false,
"workbench.editor.decorations.colors": false,
"workbench.editor.decorations.badges": false
}
]
}
],
"python.pythonPath": "/workspaces/konductor/.venv/bin/python"
}
6 changes: 3 additions & 3 deletions __main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@

import sys
from pulumi import log, export
import pulumi
from typing import NoReturn

from modules.core.initialization import initialize_pulumi
from modules.core.config import get_enabled_modules, get_stack_outputs
from modules.core.metadata import setup_global_metadata
from modules.core.deployment import DeploymentManager

def main() -> NoReturn:

def main() -> None:
"""
Main entry point for Konductor's Pulumi Python Infrastructure as Code (IaC).
Expand Down Expand Up @@ -45,5 +44,6 @@ def main() -> NoReturn:
log.error(f"Deployment failed: {str(e)}")
sys.exit(1)


if __name__ == "__main__":
main()
Loading

0 comments on commit a757d24

Please sign in to comment.