-
Notifications
You must be signed in to change notification settings - Fork 41
Refactor UI #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor UI #28
Changes from all commits
2c992a8
37a5298
c4d3b9f
879ebaa
60a8fc4
d46f5dc
2eec691
1b7f485
72d7f48
3b3be77
b9720ab
4fe34a4
f62e96b
07b5bc6
5e5c5da
6d9c69d
48fc193
6595909
6ee1099
752ac37
7249743
f048dd1
fe17d3c
c66e8f4
6197375
02b7e5c
2d5ef1f
bb91851
c1ad4e8
5c97c9e
c93a6aa
204d376
3b774f3
9ad1abc
a581c3a
bb4f793
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| [ | ||
| { | ||
| "docstatus": 0, | ||
| "doctype": "App Version", | ||
| "modified": "2025-12-27 17:08:23.781012", | ||
| "name": "version-14", | ||
| "scrubbed_version": "version-14", | ||
| "version": "Version 14" | ||
| }, | ||
| { | ||
| "docstatus": 0, | ||
| "doctype": "App Version", | ||
| "modified": "2025-12-27 17:08:23.781478", | ||
| "name": "nightly", | ||
| "scrubbed_version": "nightly", | ||
| "version": "Nightly" | ||
| }, | ||
| { | ||
| "docstatus": 0, | ||
| "doctype": "App Version", | ||
| "modified": "2025-12-27 17:08:23.780453", | ||
| "name": "version-15", | ||
| "scrubbed_version": "version-15", | ||
| "version": "Version 15" | ||
| } | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,7 @@ | |
| "dt": "Custom DocPerm", | ||
| "filters": {"parent": ("in", ("Frappe Site", "Server", "Apps", "Custom Image", "Ansible Log"))}, | ||
| }, | ||
| {"dt": "App Version"}, | ||
| ] | ||
|
|
||
| # Includes in <head> | ||
|
|
@@ -68,7 +69,7 @@ | |
| # ---------- | ||
|
|
||
| # application home page (will override Website Settings) | ||
| # home_page = "login" | ||
| home_page = "index" | ||
|
|
||
| # website user home page (by Role) | ||
| # role_home_page = { | ||
|
|
@@ -151,13 +152,13 @@ | |
| # Scheduled Tasks | ||
| # --------------- | ||
|
|
||
| scheduler_events = { | ||
| "cron": { | ||
| "*/5 * * * *": [ | ||
| "nano_press.utils.ansible_runner.ping_server", | ||
| ], | ||
| } | ||
| } | ||
| # scheduler_events = { | ||
| # "cron": { | ||
| # "*/5 * * * *": [ | ||
| # "nano_press.utils.ansible_runner.ping_server", | ||
| # ], | ||
| # } | ||
| # } | ||
|
Comment on lines
+155
to
+161
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, let's examine the file and understand the context
find . -name "hooks.py" -type f | head -20Repository: BuildWithHussain/nano_press Length of output: 92 🏁 Script executed: # Search for the ping_server function to understand what it does
rg "def ping_server" -A 20Repository: BuildWithHussain/nano_press Length of output: 2336 🏁 Script executed: # Search for references to ping_server in the codebase
rg "ping_server" --type pyRepository: BuildWithHussain/nano_press Length of output: 352 🏁 Script executed: # Search for scheduler_events usage
rg "scheduler_events" --type pyRepository: BuildWithHussain/nano_press Length of output: 113 🏁 Script executed: # Search for health/status update mechanisms
rg "health|status|verify" --type py | grep -i "server\|scheduler" | head -30Repository: BuildWithHussain/nano_press Length of output: 1607 🏁 Script executed: # Search for where verify_status is modified/updated
rg "verify_status\s*=" --type py -B 2 -A 2Repository: BuildWithHussain/nano_press Length of output: 467 🏁 Script executed: # Check the Server doctype definition to understand verify_status
find . -path "*doctype/server*" -type f | head -20Repository: BuildWithHussain/nano_press Length of output: 324 🏁 Script executed: # Look at the full Server.py file to understand verify_status lifecycle
cat -n nano_press/nano_press/doctype/server/server.py | head -100Repository: BuildWithHussain/nano_press Length of output: 3190 🏁 Script executed: # Get the full Server.py file to understand all status changes
wc -l nano_press/nano_press/doctype/server/server.pyRepository: BuildWithHussain/nano_press Length of output: 121 🏁 Script executed: # Read the rest of the Server.py file
cat -n nano_press/nano_press/doctype/server/server.py | tail -200Repository: BuildWithHussain/nano_press Length of output: 8056 🏁 Script executed: # Search for all methods/functions that change verify_status or check it
ast-grep --pattern 'def $_($_) {
$$$
verify_status
$$$
}' --type pyRepository: BuildWithHussain/nano_press Length of output: 250 🏁 Script executed: # More targeted search for all verify-related methods
rg "def.*verify|verify_status|prepare" nano_press/nano_press/doctype/server/server.py -B 2 -A 10Repository: BuildWithHussain/nano_press Length of output: 4522 🏁 Script executed: # Check if ping_server actually updates the database/verify_status
rg "ping_server" -A 30 nano_press/utils/ansible_runner.py | grep -A 30 "def ping_server"Repository: BuildWithHussain/nano_press Length of output: 880 🏁 Script executed: # Look for any database/status updates in ping_server
rg "ping_server" -A 50 nano_press/api.py | head -80Repository: BuildWithHussain/nano_press Length of output: 1309 🏁 Script executed: # Check if there are other places where verify_status might be degraded or reset
rg 'verify_status\s*=' nano_press/nano_press/doctype/server/ -B 3 -A 3Repository: BuildWithHussain/nano_press Length of output: 1819 🏁 Script executed: # See if there's a separate verify method that might call ping_server and update status
rg "def.*verify" nano_press/nano_press/doctype/server/server.py -B 2 -A 20Repository: BuildWithHussain/nano_press Length of output: 53 🏁 Script executed: # Get the full ping_server function from ansible_runner.py
rg "def ping_server" -A 60 nano_press/utils/ansible_runner.pyRepository: BuildWithHussain/nano_press Length of output: 1642 🏁 Script executed: # Check if verify_status can be changed back from "Prepared" to something else
rg "verify_status.*=" nano_press/ -r --type py -B 2 -A 1Repository: BuildWithHussain/nano_press Length of output: 3349 🏁 Script executed: # Look at the git history to understand why the scheduler was commented out
git log --oneline -20 nano_press/hooks.pyRepository: BuildWithHussain/nano_press Length of output: 151 🏁 Script executed: # Check if there are any git diffs or comments about the scheduler removal
git log -p --all -S "scheduler_events" -- nano_press/hooks.py | head -100Repository: BuildWithHussain/nano_press Length of output: 53 Scheduler removal will cause verify_status to become stale without automatic refresh. The commented-out 🤖 Prompt for AI Agents |
||
|
|
||
|
|
||
| # Testing | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| { | ||
| "actions": [], | ||
| "autoname": "", | ||
| "creation": "2025-12-27 00:00:00", | ||
| "doctype": "DocType", | ||
| "engine": "InnoDB", | ||
| "field_order": ["version", "scrubbed_version"], | ||
| "fields": [ | ||
| { | ||
| "fieldname": "version", | ||
| "fieldtype": "Data", | ||
| "in_list_view": 1, | ||
| "label": "Version", | ||
| "reqd": 1, | ||
| "unique": 1 | ||
| }, | ||
| { | ||
| "fieldname": "scrubbed_version", | ||
| "fieldtype": "Data", | ||
| "hidden": 1, | ||
| "label": "Scrubbed Version" | ||
| } | ||
| ], | ||
| "links": [], | ||
| "modified": "2025-12-27 16:34:33.317253", | ||
| "modified_by": "Administrator", | ||
| "module": "Nano Press", | ||
| "name": "App Version", | ||
| "naming_rule": "By script", | ||
| "owner": "Administrator", | ||
| "permissions": [ | ||
| { | ||
| "create": 1, | ||
| "delete": 1, | ||
| "read": 1, | ||
| "role": "System Manager", | ||
| "write": 1 | ||
| }, | ||
| { | ||
| "read": 1, | ||
| "role": "Nano Press User" | ||
| } | ||
| ], | ||
| "row_format": "Dynamic", | ||
| "sort_field": "creation", | ||
| "sort_order": "DESC", | ||
| "states": [] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Copyright (c) 2025, Build With Hussain and contributors | ||
| # For license information, please see license.txt | ||
|
|
||
| from frappe.model.document import Document | ||
|
|
||
|
|
||
| class AppVersion(Document): | ||
| def autoname(self): | ||
| if self.version: | ||
| self.scrubbed_version = self.version.lower().replace(" ", "-") | ||
| self.name = self.scrubbed_version |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,39 @@ | ||
| # Copyright (c) 2025, Venkatesh M and contributors | ||
| # For license information, please see license.txt | ||
|
|
||
| # import frappe | ||
| import frappe | ||
| from frappe.model.document import Document | ||
|
|
||
|
|
||
| class Apps(Document): | ||
| # begin: auto-generated types | ||
| # This code is auto-generated. Do not modify anything in this block. | ||
|
|
||
| from typing import TYPE_CHECKING | ||
|
|
||
| if TYPE_CHECKING: | ||
| from frappe.types import DF | ||
|
|
||
| app_name: DF.Data | ||
| branch: DF.Data | ||
| enabled: DF.Check | ||
| frappe: DF.Check | ||
| is_custom: DF.Check | ||
| is_public: DF.Check | ||
| order: DF.Int | None | ||
| pat_token: DF.Password | None | ||
| repo_url: DF.Data | ||
| repository_owner: DF.Data | None | ||
| scrubbed_name: DF.Data | None | ||
|
|
||
| # end: auto-generated types | ||
|
|
||
| def before_insert(self): | ||
| self.scrubbed_name = self.app_name.replace(" ", "_").lower() | ||
|
|
||
| def validate(self): | ||
| if self.is_custom: | ||
| if self.pat_token: | ||
| self.is_public = 0 | ||
| else: | ||
| self.is_public = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
Python 3.14 release status January 2026💡 Result:
Status as of January 22, 2026:
Sources: official Python release page and PEP 745 (release schedule). [1] [2] [3]
🌐 Web query:
actions/setup-python v4 v5 Python 3.14 support compatibility💡 Result:
Short answer: use v5 (or later). actions/setup-python@v5 supports installing Python 3.14 (including free‑threaded builds / prereleases when needed) via the python-version input; v4 is older and may not handle newer Python releases/tooling the same way. See GitHub's setup-python docs and release notes for v5 and examples showing 3.14 usage. [1][2][3][4]
Relevant links:
If you want, I can paste the exact workflow snippet to set up Python 3.14 (regular or free‑threaded) with setup-python@v5.
🌐 Web query:
frappe-bench Python 3.14 compatibility💡 Result:
Short answer: Frappe/erpnext support for Python 3.14 is tied to the app version — Frappe/ERPNext v16 (and develop) require Python 3.14+, but older branches (v15 and earlier) do not accept 3.14. If your bench/apps are still on v15 or older, Python 3.14 will fail. [1][2][4]
Details and practical notes:
Sources: Frappe docs and community threads. [1][2][3][4]
Upgrade
actions/setup-pythonto v5 and verify Frappe version compatibility with Python 3.14.Python 3.14 (released October 2025) is stable as of January 2026. However:
actions/setup-python@v4does not support Python 3.14 properly—upgrade to@v5(or later), which explicitly supports Python 3.14.🧰 Tools
🪛 actionlint (1.7.10)
49-49: the runner of "actions/setup-python@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🤖 Prompt for AI Agents