Skip to content

feat: add the system/python/storage information that's already at the top of config to the top of updatepackage#952

Open
jpagh wants to merge 1 commit into
jhpyle:masterfrom
jpagh:add-python-version-to-package-management
Open

feat: add the system/python/storage information that's already at the top of config to the top of updatepackage#952
jpagh wants to merge 1 commit into
jhpyle:masterfrom
jpagh:add-python-version-to-package-management

Conversation

@jpagh
Copy link
Copy Markdown
Contributor

@jpagh jpagh commented May 9, 2026

This is a small QOL change that I think would be nice, so that I can see from Package Management the same information that's already shown in Configuration. This is especially important for seeing which Python version I'm on when I'm installing packages that might have constraints.

I'm open to any/all changes. I tried to make this as direct a copy from config, but didn't do any helper functions or anything either. I really just wanted the system version and the python version to be on the updatepackage screen, but copied the whole thing for consistency.

Copilot AI review requested due to automatic review settings May 9, 2026 16:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the same environment/version header shown on the Configuration page to the Package Management (“updatepackage”) page so admins/developers can quickly see docassemble version, underlying Python version, and remaining disk space while managing packages.

Changes:

  • Display a top-of-page header on update_package.html with version/Python/disk information.
  • Compute and pass config_version, underlying_python_version, and free_disk_space from update_package() in server.py.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
docassemble_webapp/docassemble/webapp/templates/pages/update_package.html Adds a header line showing version/Python/disk info at the top of the Package Management page.
docassemble_webapp/docassemble/webapp/server.py Computes disk free space and version strings and passes them into the update package template.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

else:
flash(word('You need to supply a Git URL, upload a file, or supply the name of a package on PyPI.'), 'error')
package_list, package_auth = get_package_info()
(disk_total, disk_used, disk_free) = shutil.disk_usage(daconfig['config file']) # pylint: disable=unused-variable
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Comment on lines 10765 to +10770
python_version = daconfig.get('python version', word('Unknown'))
system_version = daconfig.get('system version', word('Unknown'))
if python_version == system_version:
config_version = word("Version") + " " + str(python_version)
else:
config_version = word("Version") + " " + str(python_version) + ' (Python); ' + str(system_version) + ' (' + word('system') + ')'
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

@jpagh
Copy link
Copy Markdown
Contributor Author

jpagh commented May 9, 2026

I'm letting copilot make the changes that I specifically said I didn't do. If you don't like them, then grab the first commit or let me know and I'll change appropriately.

This is really just me asking for a specific change without wanting to do it empty-handed.

EDIT: It seems that Copilot didn't do as I requested. Maybe due to repo permissions or something. Please let me know if you want me to make any changes, or feel free to do so yourself. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants