Package: aa-package-monitor
Package MonitorAn app for keeping track of installed packages and outstanding updates with Alliance Auth.ContentsOverviewScreenshotsInstallationUpdatingUser GuideSettingsPermissionsManagement CommandsChange LogOverviewPackage Monitor is an app for Alliance Auth that helps you keep your installation up-to-date. It shows you all installed distributions packages and will automatically notify you, when there are updates available.Features:Shows list of installed distributions packages with related Django apps (if any)Identifies new valid releases for installed packages on PyPINotifies user which installed packages are outdated and should be updatedShows the number of outdated packages as badge in the sidebarTakes into account the requirements of all installed packages and the current Python version when recommending updatesOption to add distribution pages to the monitor which are not related to Django appsOption to show all known distribution packages (as opposed to only the ones that belong to installed Django apps)Copy the respective command for a package update to your clipboard directly from the package listCan automatically notify admins when there is an update available for a currently installed packageSupported languages: English :us:, German :de: and Russian :ru:Hint: Update notifications are sent as AA notifications to all admins. We recommend usingDiscord Notifyto automatically forward those notifications to Discord as DMs.ScreenshotsInstallationStep 1 - Check PreconditionsPlease make sure you meet all preconditions before proceeding:Package Monitor is a plugin forAlliance Auth. If you don't have Alliance Auth running already, please install it first before proceeding. (see the officialAA installation guidefor details)Step 2 - Install appMake sure you are in the virtual environment (venv) of your Alliance Auth installation. Then install the newest release from PYPI:pipinstallaa-package-monitorStep 3 - Configure settingsAdd'package_monitor'toINSTALLED_APPS.Add the following lines to yourlocal.pyto enable regular checking for updates:CELERYBEAT_SCHEDULE['package_monitor_update_distributions']={'task':'package_monitor.tasks.update_distributions','schedule':crontab(minute='*/60'),}Step 4 - Finalize installationRun migrations & copy static filespythonmanage.pymigrate
pythonmanage.pycollectstaticRestart your supervisor services for AuthStep 5 - Initial data loadLast, but not least perform an initial data load of all distribution packages by running the following command:pythonmanage.pypackage_monitor_refreshUpdatingpipinstall-Uaa-package-monitor

pythonmanage.pycollectstatic

pythonmanage.pymigrateFinally restart your AA supervisor services.User GuideThis section explains how to use the app.TerminologyTo avoid any confusion here are our definitions of some important terms:App: A Django application. An app is always part of a distribution packageDistribution packageA Python package that can be installed via pip or setuptools. Distribution packages can contain several apps.Requirement: A requirement is a condition that distribution packages can define to specify dependencies to environments or other distribution packages with specific versions. For example the distribution package django-eveuniverse can have the requirement"django-esi>=2.0", which means is requires the package django-esi in at leasts version 2.0Operation modesYou can run Package Monitor in one of two modes:Keep everything updatedKeep apps and selected distribution packages updatedKeep everything updatedIn this mode Package Monitor will monitor all installed distribution packages. In this mode you will be informed you about updates to any of your distribution packages.This is the default operation mode.Keep apps and selected distribution packages updatedWith this mode Package Monitor will monitor only those distribution packages that contain actually installed Django apps. In this mode you will be informed if there is an update to any of your apps. Note that in mode A other installed distributions packages will not be shown.To activate this mode setPACKAGE_MONITOR_SHOW_ALL_PACKAGEStoFalsein your local settings.You can also add some additional distributions to be monitored. For example you might want to add celery.See alsoSettingsfor an overview of all settings.Latest versionPackage Monitor will automatically determine a latest version for a distribution package from PyPI. Note that this can differ from the latest version shown on PyPI, because of additional considerations:First, Package Monitor will take into account all requirements of all installed distribution packages. For example if the Alliance Auth has the requirement "Django<3", then it will only show Django 2.x as latest, since Django 3.x would not fullfil the requirement set by Alliance Auth.Second, Package Monitor will in general ignore pre-releases and consider stable releases for updates only. The only exception is if the current package also is a pre release. For example you may have Black installed as beta release, therefore the app will also suggest newer beta releases.SettingsHere is a list of available settings for this app. They can be configured by adding them to your AA settings file (local.py).Note that all settings are optional and the app will use the documented default settings if they are not used.NameDescriptionDefaultPACKAGE_MONITOR_CUSTOM_REQUIREMENTSList of custom requirements that all potential updates are checked against. Example:["Sphinx<6"][]PACKAGE_MONITOR_EXCLUDE_PACKAGESNames of distribution packages to excluded from monitoring.[]PACKAGE_MONITOR_INCLUDE_PACKAGESNames of additional distribution packages to be monitored, e.g.["celery", "redis]. This setting only makes sense when you are not monitoring all packages already.[]PACKAGE_MONITOR_NOTIFICATIONS_ENABLEDWhether to notify when an update is available for a currently installed distribution package. Notifications will be sent as AA notification to all admins.FalsePACKAGE_MONITOR_SHOW_ALL_PACKAGESWhether to monitor all distribution packages, as opposed to only monitoring packages that contain Django apps.TruePACKAGE_MONITOR_SHOW_EDITABLE_PACKAGESWhether to show distribution packages installed as editable. Since version information about editable packages is often outdated, this type of packages are not shown by default.FalsePermissionsThis is an overview of all permissions used by this app. Note that all permissions are in the "general" section.NamePurposeCodeCan access this app and viewUser can access the app and also request updates to the list of distribution packagesgeneral.basic_accessManagement CommandsThe following management commands are included in this app:CommandDescriptionpackage_monitor_refreshRefreshes all data about distribution packages. This command does functionally the same as the hourly update and is helpful to use after you have completed updating outdated packages to quickly see the result of your actions on the website.