machineconfig 3.82__py3-none-any.whl → 3.83__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of machineconfig might be problematic. Click here for more details.

@@ -0,0 +1,115 @@
1
+ # gotch1: make sure we are in the right directory: repo root. Solution: check if .pyproject.toml exists, otherwise stop.
2
+ if (!(Test-Path "./pyproject.toml")) {
3
+ Write-Host "Error: pyproject.toml not found in the current directory. Please run this script from the root of a Python project." -ForegroundColor Red
4
+ exit 1
5
+ }
6
+
7
+ # Color definitions (using ANSI escape sequences for cross-platform compatibility)
8
+ $RED = "`e[0;31m"
9
+ $GREEN = "`e[0;32m"
10
+ $YELLOW = "`e[1;33m"
11
+ $BLUE = "`e[0;34m"
12
+ $PURPLE = "`e[0;35m"
13
+ $CYAN = "`e[0;36m"
14
+ $WHITE = "`e[1;37m"
15
+ $BOLD = "`e[1m"
16
+ $UNDERLINE = "`e[4m"
17
+ $NC = "`e[0m" # No Color
18
+
19
+ # Box drawing functions
20
+ function Draw-Box {
21
+ param([string]$text, [string]$color)
22
+ $width = 60
23
+ $padding = [math]::Floor(($width - $text.Length) / 2)
24
+ $line = "─" * $width
25
+
26
+ Write-Host "${color}┌${line}┐${NC}"
27
+ Write-Host ("${color}│" + (" " * $padding) + $text + (" " * $padding) + "│${NC}")
28
+ Write-Host "${color}└${line}┘${NC}"
29
+ }
30
+
31
+ function Draw-Progress {
32
+ param([int]$current, [int]$total, [string]$description)
33
+ Write-Host "${CYAN}┌────────────────────────────────────────────────────────────┐${NC}"
34
+ $padding = 50 - $description.Length - 8
35
+ Write-Host ("${CYAN}│${NC} ${BOLD}${WHITE}Step ${current}/${total}:${NC} ${description}" + (" " * $padding) + "${CYAN}│${NC}")
36
+ Write-Host "${CYAN}└────────────────────────────────────────────────────────────┘${NC}"
37
+ }
38
+
39
+ $TOTAL_STEPS = 7
40
+ $CURRENT_STEP = 0
41
+
42
+ Draw-Box "🚀 LINTING & TYPE CHECKING SUITE 🚀" "${BOLD}${CYAN}"
43
+ Write-Host
44
+
45
+ $CURRENT_STEP++
46
+ Draw-Progress $CURRENT_STEP $TOTAL_STEPS "Environment Setup"
47
+ Write-Host "${BLUE}🔧 Installing and updating development dependencies...${NC}"
48
+ # uv add pylint pyright mypy pyrefly ruff ty --dev # linters and type checkers
49
+ # uv add --dev cleanpy pylint pyright mypy pyrefly --upgrade-package cleanpy pylint pyright mypy pyrefly
50
+ uv add --dev pyright --upgrade-package pyright
51
+ uv add --dev pylint --upgrade-package pylint
52
+ uv add --dev mypy --upgrade-package mypy
53
+ uv add --dev pyrefly --upgrade-package pyrefly
54
+ uv add --dev cleanpy --upgrade-package cleanpy
55
+
56
+ uv add types-requests types-toml types-PyYAML types-pytz types-paramiko types-urllib3 --dev
57
+ uv add types-mysqlclient types-SQLAlchemy --dev
58
+
59
+ Write-Host "${GREEN}✅ Environment setup complete!${NC}"
60
+ Write-Host
61
+
62
+ $CURRENT_STEP++
63
+ Draw-Progress $CURRENT_STEP $TOTAL_STEPS "Code Cleanup"
64
+ Write-Host "${YELLOW}🧹 Cleaning and formatting code...${NC}"
65
+ uv run -m cleanpy .
66
+ uv run -m ruff clean
67
+ # uv run -m ruff format .
68
+ uv run -m ruff check . --fix
69
+ uv run --no-dev --project $HOME/code/machineconfig -m machineconfig.scripts.python.ai.generate_files
70
+
71
+ New-Item -ItemType Directory -Force -Path .linters | Out-Null
72
+
73
+ Write-Host "${GREEN}🧹 Code cleanup complete!${NC}"
74
+ Write-Host
75
+
76
+ Draw-Box "🔍 TYPE CHECKERS & LINTERS 🔍" "${BOLD}${PURPLE}"
77
+
78
+ $CURRENT_STEP++
79
+ Draw-Progress $CURRENT_STEP $TOTAL_STEPS "Pyright Type Checker"
80
+ Write-Host "${BLUE}📋 Analyzing types with Pyright...${NC}"
81
+ Remove-Item ./.linters/pyright_result.md -ErrorAction SilentlyContinue
82
+ uv run pyright . | Out-File -FilePath ./.linters/pyright_result.md
83
+ Write-Host "${GREEN}✅ Results saved to ${UNDERLINE}./.linters/pyright_result.md${NC}"
84
+
85
+ $CURRENT_STEP++
86
+ Draw-Progress $CURRENT_STEP $TOTAL_STEPS "MyPy Type Checker"
87
+ Write-Host "${BLUE}📋 Analyzing types with MyPy...${NC}"
88
+ Remove-Item ./.linters/mypy_result.md -ErrorAction SilentlyContinue
89
+ uv run mypy . | Out-File -FilePath ./.linters/mypy_result.md
90
+ Write-Host "${GREEN}✅ Results saved to ${UNDERLINE}./.linters/mypy_result.md${NC}"
91
+
92
+ $CURRENT_STEP++
93
+ Draw-Progress $CURRENT_STEP $TOTAL_STEPS "Pylint Code Analysis"
94
+ Write-Host "${BLUE}📋 Analyzing code quality with Pylint...${NC}"
95
+ Remove-Item ./.linters/pylint_result.md -ErrorAction SilentlyContinue
96
+ uv run pylint ./src/ | Out-File -FilePath ./.linters/pylint_result.md
97
+ Write-Host "${GREEN}✅ Results saved to ${UNDERLINE}./.linters/pylint_result.md${NC}"
98
+
99
+ $CURRENT_STEP++
100
+ Draw-Progress $CURRENT_STEP $TOTAL_STEPS "Pyrefly Type Checker"
101
+ Write-Host "${BLUE}📋 Analyzing types with Pyrefly...${NC}"
102
+ Remove-Item ./.linters/pyrefly_result.md -ErrorAction SilentlyContinue
103
+ uv run pyrefly check . | Out-File -FilePath ./.linters/pyrefly_result.md
104
+ Write-Host "${GREEN}✅ Results saved to ${UNDERLINE}./.linters/pyrefly_result.md${NC}"
105
+
106
+ $CURRENT_STEP++
107
+ Draw-Progress $CURRENT_STEP $TOTAL_STEPS "Ruff Linter"
108
+ Write-Host "${BLUE}📋 Checking code style with Ruff...${NC}"
109
+ Remove-Item ./.linters/ruff_result.md -ErrorAction SilentlyContinue
110
+ uv run ruff check . | Out-File -FilePath ./.linters/ruff_result.md
111
+ Write-Host "${GREEN}✅ Results saved to ${UNDERLINE}./.linters/ruff_result.md${NC}"
112
+
113
+ Write-Host
114
+ Draw-Box "🎉 ALL CHECKS COMPLETED! 🎉" "${BOLD}${GREEN}"
115
+ Write-Host "${BOLD}${GREEN}📁 Check the ${UNDERLINE}.linters${NC}${BOLD}${GREEN} directory for detailed results.${NC}"
@@ -5,9 +5,50 @@ if [ ! -f "./pyproject.toml" ]; then
5
5
  exit 1
6
6
  fi
7
7
 
8
- echo "Running linting and type checking..."
8
+ # Color definitions
9
+ RED='\033[0;31m'
10
+ GREEN='\033[0;32m'
11
+ YELLOW='\033[1;33m'
12
+ BLUE='\033[0;34m'
13
+ PURPLE='\033[0;35m'
14
+ CYAN='\033[0;36m'
15
+ WHITE='\033[1;37m'
16
+ BOLD='\033[1m'
17
+ UNDERLINE='\033[4m'
18
+ NC='\033[0m' # No Color
9
19
 
10
- echo "Setting up environment..."
20
+ # Box drawing functions
21
+ draw_box() {
22
+ local text="$1"
23
+ local color="$2"
24
+ local width=60
25
+ local padding=$(( (width - ${#text}) / 2 ))
26
+ local line=""
27
+ for ((i=0; i<width; i++)); do line="${line}─"; done
28
+
29
+ echo -e "${color}┌${line}┐${NC}"
30
+ printf "${color}│%*s%s%*s│${NC}\n" $padding "" "$text" $padding ""
31
+ echo -e "${color}└${line}┘${NC}"
32
+ }
33
+
34
+ draw_progress() {
35
+ local current="$1"
36
+ local total="$2"
37
+ local description="$3"
38
+ echo -e "${CYAN}┌────────────────────────────────────────────────────────────┐${NC}"
39
+ echo -e "${CYAN}│${NC} ${BOLD}${WHITE}Step ${current}/${total}:${NC} ${description}${CYAN}$(printf '%*s' $((50 - ${#description} - 8)) "")│${NC}"
40
+ echo -e "${CYAN}└────────────────────────────────────────────────────────────┘${NC}"
41
+ }
42
+
43
+ TOTAL_STEPS=7
44
+ CURRENT_STEP=0
45
+
46
+ draw_box "🚀 LINTING & TYPE CHECKING SUITE 🚀" "${BOLD}${CYAN}"
47
+ echo
48
+
49
+ ((CURRENT_STEP++))
50
+ draw_progress $CURRENT_STEP $TOTAL_STEPS "Environment Setup"
51
+ echo -e "${BLUE}🔧 Installing and updating development dependencies...${NC}"
11
52
  # uv add pylint pyright mypy pyrefly ruff ty --dev # linters and type checkers
12
53
  # uv add --dev cleanpy pylint pyright mypy pyrefly --upgrade-package cleanpy pylint pyright mypy pyrefly
13
54
  uv add --dev pyright --upgrade-package pyright
@@ -16,10 +57,15 @@ uv add --dev mypy --upgrade-package mypy
16
57
  uv add --dev pyrefly --upgrade-package pyrefly
17
58
  uv add --dev cleanpy --upgrade-package cleanpy
18
59
 
19
-
20
60
  uv add types-requests types-toml types-PyYAML types-pytz types-paramiko types-urllib3 --dev
21
61
  uv add types-mysqlclient types-SQLAlchemy --dev
22
62
 
63
+ echo -e "${GREEN}✅ Environment setup complete!${NC}"
64
+ echo
65
+
66
+ ((CURRENT_STEP++))
67
+ draw_progress $CURRENT_STEP $TOTAL_STEPS "Code Cleanup"
68
+ echo -e "${YELLOW}🧹 Cleaning and formatting code...${NC}"
23
69
  uv run -m cleanpy .
24
70
  uv run -m ruff clean
25
71
  # uv run -m ruff format .
@@ -28,25 +74,46 @@ uv run --no-dev --project $HOME/code/machineconfig -m machineconfig.scripts.pyth
28
74
 
29
75
  mkdir .linters
30
76
 
31
- echo "Running pyright..."
77
+ echo -e "${GREEN}🧹 Code cleanup complete!${NC}"
78
+ echo
79
+
80
+ draw_box "🔍 TYPE CHECKERS & LINTERS 🔍" "${BOLD}${PURPLE}"
81
+
82
+ ((CURRENT_STEP++))
83
+ draw_progress $CURRENT_STEP $TOTAL_STEPS "Pyright Type Checker"
84
+ echo -e "${BLUE}📋 Analyzing types with Pyright...${NC}"
32
85
  rm ./.linters/pyright_result.md || true
33
86
  uv run pyright . > ./.linters/pyright_result.md
34
- echo "Results of pyright are in ./.linters/pyright_result.md"
87
+ echo -e "${GREEN}✅ Results saved to ${UNDERLINE}./.linters/pyright_result.md${NC}"
35
88
 
89
+ ((CURRENT_STEP++))
90
+ draw_progress $CURRENT_STEP $TOTAL_STEPS "MyPy Type Checker"
91
+ echo -e "${BLUE}📋 Analyzing types with MyPy...${NC}"
36
92
  rm ./.linters/mypy_result.md || true
37
93
  uv run mypy . > ./.linters/mypy_result.md
38
- echo "Results of mypy are in ./.linters/mypy_result.md"
94
+ echo -e "${GREEN}✅ Results saved to ${UNDERLINE}./.linters/mypy_result.md${NC}"
39
95
 
96
+ ((CURRENT_STEP++))
97
+ draw_progress $CURRENT_STEP $TOTAL_STEPS "Pylint Code Analysis"
98
+ echo -e "${BLUE}📋 Analyzing code quality with Pylint...${NC}"
40
99
  rm ./.linters/pylint_result.md || true
41
100
  uv run pylint ./src/ > ./.linters/pylint_result.md
42
- echo "Results of pylint are in ./.linters/pylint_result.md"
101
+ echo -e "${GREEN}✅ Results saved to ${UNDERLINE}./.linters/pylint_result.md${NC}"
43
102
 
44
- rm ./.linters/pylint_result.md || true
103
+ ((CURRENT_STEP++))
104
+ draw_progress $CURRENT_STEP $TOTAL_STEPS "Pyrefly Type Checker"
105
+ echo -e "${BLUE}📋 Analyzing types with Pyrefly...${NC}"
106
+ rm ./.linters/pyrefly_result.md || true
45
107
  uv run pyrefly check . > ./.linters/pyrefly_result.md
46
- echo "Results of pyrefly are in ./.linters/pyrefly_result.md"
108
+ echo -e "${GREEN}✅ Results saved to ${UNDERLINE}./.linters/pyrefly_result.md${NC}"
47
109
 
110
+ ((CURRENT_STEP++))
111
+ draw_progress $CURRENT_STEP $TOTAL_STEPS "Ruff Linter"
112
+ echo -e "${BLUE}📋 Checking code style with Ruff...${NC}"
48
113
  rm ./.linters/ruff_result.md || true
49
114
  uv run ruff check . > ./.linters/ruff_result.md
50
- echo "Results of ruff are in ./.linters/ruff_result.md"
115
+ echo -e "${GREEN}✅ Results saved to ${UNDERLINE}./.linters/ruff_result.md${NC}"
51
116
 
52
- echo "All done! Please check the .linters directory for results."
117
+ echo
118
+ draw_box "🎉 ALL CHECKS COMPLETED! 🎉" "${BOLD}${GREEN}"
119
+ echo -e "${BOLD}${GREEN}📁 Check the ${UNDERLINE}.linters${NC}${BOLD}${GREEN} directory for detailed results.${NC}"
@@ -49,11 +49,12 @@ def route(args: FireJobArgs) -> None:
49
49
  ve_root_from_file, ipy_profile = get_ve_path_and_ipython_profile(choice_file)
50
50
  if ipy_profile is None:
51
51
  ipy_profile = "default"
52
- activate_ve_line = get_ve_activate_line(ve_root=args.ve or ve_root_from_file or "$HOME/code/machineconfig/.venv")
53
52
 
54
53
  if choice_file.suffix == ".py":
55
54
  kwargs = extract_kwargs(args)
55
+ activate_ve_line = get_ve_activate_line(ve_root=args.ve or ve_root_from_file or "$HOME/code/machineconfig/.venv")
56
56
  else:
57
+ activate_ve_line = ""
57
58
  kwargs = {}
58
59
 
59
60
  # ========================= choosing function to run
@@ -93,7 +94,6 @@ def route(args: FireJobArgs) -> None:
93
94
  if choice_file.suffix == ".py":
94
95
  if args.streamlit:
95
96
  import socket
96
-
97
97
  s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
98
98
  try:
99
99
  s.connect(("8.8.8.8", 1))
@@ -1,6 +1,5 @@
1
1
  from dataclasses import dataclass
2
- from typing import Optional, Annotated
3
- import typer
2
+ from typing import Optional
4
3
 
5
4
 
6
5
  @dataclass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: machineconfig
3
- Version: 3.82
3
+ Version: 3.83
4
4
  Summary: Dotfiles management package
5
5
  Author-email: Alex Al-Saffar <programmer@usa.com>
6
6
  License: Apache 2.0
@@ -179,8 +179,8 @@ machineconfig/scripts/python/fire_agents.py,sha256=_k1CcPaAp3B7h72tSczFDbLsqTg6F
179
179
  machineconfig/scripts/python/fire_agents_help_launch.py,sha256=sTdjNz2pDinDMMjUAMN7OqH-KAUeHh6Aihr_zUvtM6k,6128
180
180
  machineconfig/scripts/python/fire_agents_help_search.py,sha256=qIfSS_su2YJ1Gb0_lu4cbjlJlYMBw0v52NTGiSrGjk8,2991
181
181
  machineconfig/scripts/python/fire_agents_load_balancer.py,sha256=QPiCbQq9j5REHStPdYqQcGNkz_rp5CjotqOpMY3v5TM,2099
182
- machineconfig/scripts/python/fire_jobs.py,sha256=W7JDckAWrpHlB3WHpULpZP3M22ORxvLO-6lcnRloHX8,20119
183
- machineconfig/scripts/python/fire_jobs_args_helper.py,sha256=CeXmx0FJZlUSsQHcUmvHM2dQBmKcTNtTkha5PHaQQhc,1505
182
+ machineconfig/scripts/python/fire_jobs.py,sha256=M7JOW4f10t_f60-0f2KFgy3fc6FDnmIfbzpYEQVEjD4,20152
183
+ machineconfig/scripts/python/fire_jobs_args_helper.py,sha256=K1Q5v50qFv3-QD66_rpJhrAMPWwoQJ5KYHqSFTx-s3Q,1481
184
184
  machineconfig/scripts/python/fire_jobs_layout_helper.py,sha256=Hj77uKgmNKSEBtnW0oCdRBwdKEuhzPxX1p81mRTBibo,3314
185
185
  machineconfig/scripts/python/fire_jobs_streamlit_helper.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
186
186
  machineconfig/scripts/python/ftpx.py,sha256=vqwhfkg3jVaAdjlWvrcPms2pUD7_c370jn2W6o5XArM,10269
@@ -206,7 +206,8 @@ machineconfig/scripts/python/wsl_windows_transfer.py,sha256=ziq-LrTisXgD_gfZ-Bdx
206
206
  machineconfig/scripts/python/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
207
207
  machineconfig/scripts/python/ai/generate_files.py,sha256=Vfjgd0skJu-WTgqUxmOVFzaNMfSFBaFmY5oGGVY7MZY,2860
208
208
  machineconfig/scripts/python/ai/initai.py,sha256=yATpWMu_yrbhzXS7zP2Dm0Saz27AFktbi-gCGs5kKFc,2618
209
- machineconfig/scripts/python/ai/scripts/lint_and_type_check.sh,sha256=hkzP1b92aWPL_qFv5iIoQEXrIbWGI3ZSwsZ83CL1Ios,1976
209
+ machineconfig/scripts/python/ai/scripts/lint_and_type_check.ps1,sha256=FqoUSv1_DqWXUE5O7RxSo7L86FcNtPK1lYoytgOrf90,5124
210
+ machineconfig/scripts/python/ai/scripts/lint_and_type_check.sh,sha256=6dCznJmao9T0BQtltBEyGWkDTMmGAmTSmar8Vl791gY,4665
210
211
  machineconfig/scripts/python/ai/solutions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
211
212
  machineconfig/scripts/python/ai/solutions/_shared.py,sha256=QRT4Doe8aW8ULYq9OrlAIX2nVOLhwXdVuubkgnnSpgU,244
212
213
  machineconfig/scripts/python/ai/solutions/generic.py,sha256=dUSbqkEIYe27JZsJF_qEGcvr-ak8CpJ7lTGvAQS2MGk,1311
@@ -421,8 +422,8 @@ machineconfig/utils/schemas/fire_agents/fire_agents_input.py,sha256=CCs5ebomW1ac
421
422
  machineconfig/utils/schemas/installer/installer_types.py,sha256=iAzcALc9z_FAQE9iuGHfX6Z0B1_n3Gt6eC0d6heYik0,599
422
423
  machineconfig/utils/schemas/layouts/layout_types.py,sha256=OmiOX9xtakPz4l6IobWnpFHpbn95fitEE9q0YL1WxjQ,617
423
424
  machineconfig/utils/schemas/repos/repos_types.py,sha256=ECVr-3IVIo8yjmYmVXX2mnDDN1SLSwvQIhx4KDDQHBQ,405
424
- machineconfig-3.82.dist-info/METADATA,sha256=lBIY_Ul0cOylp78PYNbNbIlXyzPRfyYGrWbBtFsrGiI,6998
425
- machineconfig-3.82.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
426
- machineconfig-3.82.dist-info/entry_points.txt,sha256=RwV4BmImYKp4GrXGqb_YDEI25O2_5mhsbvjUD6a0hps,1138
427
- machineconfig-3.82.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
428
- machineconfig-3.82.dist-info/RECORD,,
425
+ machineconfig-3.83.dist-info/METADATA,sha256=Evt69F8Q-umg3nhbuBSHlFNuaXR73w6GQRtHw9m1QOU,6998
426
+ machineconfig-3.83.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
427
+ machineconfig-3.83.dist-info/entry_points.txt,sha256=RwV4BmImYKp4GrXGqb_YDEI25O2_5mhsbvjUD6a0hps,1138
428
+ machineconfig-3.83.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
429
+ machineconfig-3.83.dist-info/RECORD,,