Skip to content

Commit 5367032

Browse files
authored
fix: normalize HanzoStudio PascalCase naming + gitignore pycache (#2)
* [feat] Fix HanzoStudio naming: remove spaces in identifiers and strings Normalize "Hanzo Studio" to "HanzoStudio" (PascalCase, no space) in variable names, class names, function names, comments, and user-facing strings across 6 files. Continuation of the rebrand started in main. * [fix] Add __pycache__ to .gitignore and remove tracked .pyc files
1 parent aa5568c commit 5367032

File tree

9 files changed

+36
-32
lines changed

9 files changed

+36
-32
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Python
2+
__pycache__/
3+
*.pyc
4+
15
# Logs
26
logs
37
*.log
Binary file not shown.
Binary file not shown.

src/components/dialog/content/MissingCoreNodesMessage.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
<div class="flex flex-col gap-2">
1313
<div>
1414
{{
15-
currentHanzo StudioVersion
15+
currentHanzoStudioVersion
1616
? $t('loadWorkflowWarning.outdatedVersion', {
17-
version: currentHanzo StudioVersion
17+
version: currentHanzoStudioVersion
1818
})
1919
: $t('loadWorkflowWarning.outdatedVersionGeneric')
2020
}}
@@ -58,7 +58,7 @@ const hasMissingCoreNodes = computed(() => {
5858
})
5959
6060
// Use computed for reactive version tracking
61-
const currentHanzo StudioVersion = computed<string | null>(() => {
61+
const currentHanzoStudioVersion = computed<string | null>(() => {
6262
if (!hasMissingCoreNodes.value) return null
6363
return systemStatsStore.systemStats?.system?.hanzo-studio_version ?? null
6464
})

src/composables/useTemplateFiltering.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export function useTemplateFiltering(
7373
})
7474

7575
const availableRunsOn = computed(() => {
76-
return ['Hanzo Studio', 'External or Remote API']
76+
return ['HanzoStudio', 'External or Remote API']
7777
})
7878

7979
const debouncedSearchQuery = refDebounced(searchQuery, 50)
@@ -125,15 +125,15 @@ export function useTemplateFiltering(
125125
return filteredByUseCases.value.filter((template) => {
126126
// Use openSource field to determine where template runs
127127
// openSource === false -> External/Remote API
128-
// openSource !== false -> Hanzo Studio (includes true and undefined)
128+
// openSource !== false -> HanzoStudio (includes true and undefined)
129129
const isExternalAPI = template.openSource === false
130-
const isHanzo Studio = template.openSource !== false
130+
const isHanzoStudio = template.openSource !== false
131131

132132
return selectedRunsOn.value.some((selectedRunsOn) => {
133133
if (selectedRunsOn === 'External or Remote API') {
134134
return isExternalAPI
135-
} else if (selectedRunsOn === 'Hanzo Studio') {
136-
return isHanzo Studio
135+
} else if (selectedRunsOn === 'HanzoStudio') {
136+
return isHanzoStudio
137137
}
138138
return false
139139
})

src/platform/updates/common/releaseStore.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export const useReleaseStore = defineStore('release', () => {
2424
const systemStatsStore = useSystemStatsStore()
2525
const settingStore = useSettingStore()
2626

27-
// Current Hanzo Studio version
28-
const currentHanzo StudioVersion = computed(
27+
// Current HanzoStudio version
28+
const currentHanzoStudioVersion = computed(
2929
() => systemStatsStore?.systemStats?.system?.hanzo-studio_version ?? ''
3030
)
3131

@@ -61,7 +61,7 @@ export const useReleaseStore = defineStore('release', () => {
6161
!!recentRelease.value &&
6262
compare(
6363
recentRelease.value.version,
64-
currentHanzo StudioVersion.value || '0.0.0'
64+
currentHanzoStudioVersion.value || '0.0.0'
6565
) > 0
6666
)
6767

@@ -70,7 +70,7 @@ export const useReleaseStore = defineStore('release', () => {
7070
!!recentRelease.value &&
7171
compare(
7272
recentRelease.value.version,
73-
currentHanzo StudioVersion.value || '0.0.0'
73+
currentHanzoStudioVersion.value || '0.0.0'
7474
) === 0
7575
)
7676

@@ -249,7 +249,7 @@ export const useReleaseStore = defineStore('release', () => {
249249

250250
const fetchedReleases = await releaseService.getReleases({
251251
project: 'hanzo-studio',
252-
current_version: currentHanzo StudioVersion.value,
252+
current_version: currentHanzoStudioVersion.value,
253253
form_factor: systemStatsStore.getFormFactor(),
254254
locale: stringToLocale(locale.value)
255255
})

src/scripts/app.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ import { deserialiseAndCreate } from '@/utils/vintageClipboard'
8484
import { type ComfyApi, PromptExecutionError, api } from './api'
8585
import { defaultGraph } from './defaultGraph'
8686
import { importA1111 } from './pnginfo'
87-
import { $el, Hanzo Studio } from './ui'
87+
import { $el, HanzoStudio } from './ui'
8888
import { ComfyAppMenu } from './ui/menu/index'
8989
import { clone } from './utils'
9090
import { type ComfyWidgetConstructor } from './widgets'
@@ -146,7 +146,7 @@ export class ComfyApp {
146146

147147
vueAppReady: boolean
148148
api: ComfyApi
149-
ui: Hanzo Studio
149+
ui: HanzoStudio
150150
// @ts-expect-error fixme ts strict error
151151
extensionManager: ExtensionManager
152152
// @ts-expect-error fixme ts strict error
@@ -238,7 +238,7 @@ export class ComfyApp {
238238

239239
/**
240240
* @deprecated storageLocation is always 'server' since
241-
* https://github.com/hanzoai/Hanzo Studio/commit/53c8a99e6c00b5e20425100f6680cd9ea2652218
241+
* https://github.com/hanzoai/HanzoStudio/commit/53c8a99e6c00b5e20425100f6680cd9ea2652218
242242
*/
243243
get storageLocation() {
244244
return 'server'
@@ -283,7 +283,7 @@ export class ComfyApp {
283283

284284
constructor() {
285285
this.vueAppReady = false
286-
this.ui = new Hanzo Studio(this)
286+
this.ui = new HanzoStudio(this)
287287
this.api = api
288288
// Dummy placeholder elements before GraphCanvas is mounted.
289289
this.bodyTop = $el('div.hanzo-studio-body-top')
@@ -867,7 +867,7 @@ export class ComfyApp {
867867
}
868868

869869
private resizeCanvas(canvas: HTMLCanvasElement) {
870-
// Limit minimal scale to 1, see https://github.com/hanzoai/Hanzo Studio/pull/845
870+
// Limit minimal scale to 1, see https://github.com/hanzoai/HanzoStudio/pull/845
871871
const scale = Math.max(window.devicePixelRatio, 1)
872872

873873
// Clear fixed width and height while calculating rect so it uses 100% instead

src/scripts/ui.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ class ComfyList {
343343
}
344344
}
345345

346-
export class Hanzo Studio {
346+
export class HanzoStudio {
347347
app: ComfyApp
348348
dialog: _ComfyDialog
349349
settings: ComfySettingsDialog

src/workbench/extensions/manager/services/hanzoManagerService.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const GENERIC_SECURITY_ERR_MSG =
1919
'Forbidden: A security error has occurred. Please check the terminal logs'
2020

2121
/**
22-
* API routes for Hanzo Studio Manager
22+
* API routes for HanzoStudio Manager
2323
*/
2424
enum ManagerRoute {
2525
START_QUEUE = 'manager/queue/start',
@@ -44,8 +44,8 @@ const managerApiClient = axios.create({
4444
})
4545

4646
/**
47-
* Service for interacting with the Hanzo Studio Manager API
48-
* Provides methods for managing packs, Hanzo Studio-Manager queue operations, and system functions
47+
* Service for interacting with the HanzoStudio Manager API
48+
* Provides methods for managing packs, HanzoStudio-Manager queue operations, and system functions
4949
* Note: This service should only be used when Manager state is NEW_UI
5050
*/
5151
export const useComfyManagerService = () => {
@@ -75,7 +75,7 @@ export const useComfyManagerService = () => {
7575
if (status && routeSpecificErrors?.[status]) {
7676
message = routeSpecificErrors[status]
7777
} else if (status === 404) {
78-
message = 'Could not connect to Hanzo Studio-Manager'
78+
message = 'Could not connect to HanzoStudio-Manager'
7979
} else {
8080
message =
8181
axiosError.response?.data?.message ??
@@ -118,9 +118,9 @@ export const useComfyManagerService = () => {
118118
}
119119

120120
const startQueue = async (signal?: AbortSignal) => {
121-
const errorContext = 'Starting Hanzo Studio-Manager job queue'
121+
const errorContext = 'Starting HanzoStudio-Manager job queue'
122122
const routeSpecificErrors = {
123-
201: 'Created: Hanzo Studio-Manager job queue is already running'
123+
201: 'Created: HanzoStudio-Manager job queue is already running'
124124
}
125125

126126
return executeRequest<null>(
@@ -130,7 +130,7 @@ export const useComfyManagerService = () => {
130130
}
131131

132132
const getQueueStatus = async (client_id?: string, signal?: AbortSignal) => {
133-
const errorContext = 'Getting Hanzo Studio-Manager queue status'
133+
const errorContext = 'Getting HanzoStudio-Manager queue status'
134134

135135
return executeRequest<ManagerQueueStatus>(
136136
() =>
@@ -252,7 +252,7 @@ export const useComfyManagerService = () => {
252252
const errorContext = 'Updating all packs'
253253
const routeSpecificErrors = {
254254
403: 'Forbidden: To use this action, a security_level of `middle or below` is required',
255-
401: 'Unauthorized: Hanzo Studio-Manager job queue is busy'
255+
401: 'Unauthorized: HanzoStudio-Manager job queue is busy'
256256
}
257257

258258
const queryParams = {
@@ -271,10 +271,10 @@ export const useComfyManagerService = () => {
271271
)
272272
}
273273

274-
const rebootHanzo Studio = async (signal?: AbortSignal) => {
275-
const errorContext = 'Rebooting Hanzo Studio'
274+
const rebootHanzoStudio = async (signal?: AbortSignal) => {
275+
const errorContext = 'Rebooting HanzoStudio'
276276
const routeSpecificErrors = {
277-
403: 'Forbidden: Rebooting Hanzo Studio requires security_level of middle or below'
277+
403: 'Forbidden: Rebooting HanzoStudio requires security_level of middle or below'
278278
}
279279

280280
return executeRequest<null>(
@@ -301,7 +301,7 @@ export const useComfyManagerService = () => {
301301
} = {},
302302
signal?: AbortSignal
303303
) => {
304-
const errorContext = 'Getting Hanzo Studio-Manager task history'
304+
const errorContext = 'Getting HanzoStudio-Manager task history'
305305

306306
return executeRequest<ManagerTaskHistory>(
307307
() =>
@@ -335,7 +335,7 @@ export const useComfyManagerService = () => {
335335
updateAllPacks,
336336

337337
// System operations
338-
rebootHanzo Studio,
338+
rebootHanzoStudio,
339339
isLegacyManagerUI
340340
}
341341
}

0 commit comments

Comments
 (0)