Skip to content

vueda.update

Overview

Interactive update workflow for vueda-server deployments.

Classes

ask

Ask the user a question, with a list of choices and a default.

Signature

ask(stdout, stderr, question, choices, default, non_interactive)

Parameters

NameTypeRequiredDescription
stdout<class 'typing.TextIO'>yes
stderr<class 'typing.TextIO'>yes
question<class 'str'>yes
choiceslist[str]yes
default<class 'str'>yes
non_interactive<class 'bool'>yes

Source

server/vueda/update.py:137

ask_tag

Ask the user which git tag they would like to check out. We should not show all tags because there are too many. We can show the last 5 tags and default to the latest tag. We should allow the user to enter a tag that is not in the list. We should allow HEAD as a tag, for development.

Signature

ask_tag(stdout, stderr, debug_mode)

Parameters

NameTypeRequiredDescription
stdout<class 'typing.TextIO'>yes
stderr<class 'typing.TextIO'>yes
debug_mode<class 'bool'>yes

Source

server/vueda/update.py:168

backup

Clean up backups older than a week. Create a new database backup.

Signature

backup(stdout, stderr, non_interactive)

Parameters

NameTypeRequiredDescription
stdout<class 'typing.TextIO'>yes
stderr<class 'typing.TextIO'>yes
non_interactive<class 'bool'>yes

Source

server/vueda/update.py:216

configure_django_settings

Configure Django settings from the correct directory so relative config lookups work.

Signature

configure_django_settings(manage_py_dir)

Parameters

NameTypeRequiredDescription
manage_py_diryes

Source

server/vueda/update.py:326

detect_package_manager

Auto-detect package manager based on lock files and availability. Works from anywhere within a git repository. Returns tuple of (package_manager, repo_root, manage_py_dir).

Results are cached to avoid repeated filesystem operations.

Signature

detect_package_manager()

Source

server/vueda/update.py:344

echo_and_eval

Print a command to stdout and then execute it.

Signature

echo_and_eval(stdout, stderr, command, extra_env, shell)

Parameters

NameTypeRequiredDescription
stdout<class 'typing.TextIO'>yes
stderr<class 'typing.TextIO'>yes
commandstr | list[str]yes
extra_envdict | Noneyes
shell<class 'bool'>yes

Source

server/vueda/update.py:203

echo_and_eval_with_cwd

Print a command to stdout and then execute it from specified directory.

Signature

echo_and_eval_with_cwd(stdout, stderr, command, cwd, extra_env, shell)

Parameters

NameTypeRequiredDescription
stdout<class 'typing.TextIO'>yes
stderr<class 'typing.TextIO'>yes
commandstr | list[str]yes
cwdstr | Noneyes
extra_envdict | Noneyes
shell<class 'bool'>yes

Source

server/vueda/update.py:390

find_manage_py

Find manage.py starting from start_dir (or current directory). Searches common locations: ., server/, src/, backend/, app/ Returns the directory containing manage.py, or None if not found.

Signature

find_manage_py(start_dir)

Parameters

NameTypeRequiredDescription
start_diryes

Source

server/vueda/update.py:302

find_repo_root

Find the git repository root directory. Returns None if not in a git repo.

Signature

find_repo_root()

Source

server/vueda/update.py:290

get_tag

Get the current git tag, if it exists.

Signature

get_tag()

Source

server/vueda/update.py:54

install

Install the latest requirements, supporting both uv and pipenv.

Auto-detects package manager or uses PACKAGE_MANAGER setting. Use sync so deploys get locked files, and so devs don't change the lock unintentionally.

Signature

install(stdout, stderr, non_interactive)

Parameters

NameTypeRequiredDescription
stdout<class 'typing.TextIO'>yes
stderr<class 'typing.TextIO'>yes
non_interactive<class 'bool'>yes

Source

server/vueda/update.py:421

migrate

Run Django management command 'migrate' and 'remove_stale_contenttypes'.

Signature

migrate(stdout, stderr, non_interactive)

Parameters

NameTypeRequiredDescription
stdout<class 'typing.TextIO'>yes
stderr<class 'typing.TextIO'>yes
non_interactive<class 'bool'>yes

Source

server/vueda/update.py:533

orange_char

Get single character input, but color it orange.

Signature

orange_char(stdout, stderr, default)

Parameters

NameTypeRequiredDescription
stdout<class 'typing.TextIO'>yes
stderr<class 'typing.TextIO'>yes
default<class 'str'>yes

Source

server/vueda/update.py:71

orange_input

Get user input, but color it orange.

Signature

orange_input(stdout, _stderr, default)

Parameters

NameTypeRequiredDescription
stdout<class 'typing.TextIO'>yes
_stderr<class 'typing.TextIO'>yes
default<class 'str'>yes

Source

server/vueda/update.py:94

post

Run post-update commands. This is historical at the moment.

Signature

post(stdout, stderr, non_interactive)

Parameters

NameTypeRequiredDescription
stdout<class 'typing.TextIO'>yes
stderr<class 'typing.TextIO'>yes
non_interactive<class 'bool'>yes

Source

server/vueda/update.py:558

pull

Pull the latest code from git. if on main, we ask the user if they want to check out a tag. if on a branch, we pull.

Signature

pull(stdout, stderr, non_interactive)

Parameters

NameTypeRequiredDescription
stdout<class 'typing.TextIO'>yes
stderr<class 'typing.TextIO'>yes
non_interactive<class 'bool'>yes

Source

server/vueda/update.py:263

static

Run Django management command 'collectstatic', if on a live site.

Signature

static(stdout, stderr, non_interactive)

Parameters

NameTypeRequiredDescription
stdout<class 'typing.TextIO'>yes
stderr<class 'typing.TextIO'>yes
non_interactive<class 'bool'>yes

Source

server/vueda/update.py:505

Source

server/vueda/update.py

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2