commit | 06ccf2773591679229a201c0cfde175fe6ea7d82 | [log] [tgz] |
---|---|---|
author | Marcus Christie <machristie@apache.org> | Thu Jun 22 12:50:42 2023 -0400 |
committer | Marcus Christie <machristie@apache.org> | Thu Jun 22 12:50:42 2023 -0400 |
tree | a422f8cc4573f6fbfe5e646d9d3c92b7199e35bd | |
parent | cf15fd0b1dc0db9b9ad184415de45bb8e93f5d1a [diff] |
Bump version to 1.0.2
Utilities for working with dynamically loaded Django apps.
Install this package with pip
pip install airavata-django-portal-commons
import sys from airavata_django_portal_commons import dynamic_apps # Add any dynamic apps installed in the virtual environment dynamic_apps.load(INSTALLED_APPS) # (Optional) merge WEBPACK_LOADER settings from custom Django apps settings_module = sys.modules[__name__] dynamic_apps.merge_settings(settings_module)
'airavata_django_portal_commons.dynamic_apps.context_processors.custom_app_registry'
to the context_processors list:TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ... 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ ... 'airavata_django_portal_commons.dynamic_apps.context_processors.custom_app_registry', ], }, }, ]
urlpatterns = [ # ... path('', include('airavata_django_portal_commons.dynamic_apps.urls')), ]
See https://apache-airavata-django-portal.readthedocs.io/en/latest/dev/custom_django_app/ for the latest information.
Note that by default the cookiecutter template registers Django apps under the entry_point group name of airavata.djangoapp
, but you can change this. Just make sure that when you call dynamic_apps.load
that you pass as the second argument the name of the entry_point group.
Update the version in setup.cfg.
Commit the update to setup.cfg.
Tag the repo with the same version, with the format v${version_number}
. For example, if the version number in setup.cfg is “1.2” then tag the repo with “v1.2”.
VERSION=... git tag -m $VERSION $VERSION git push --follow-tags
In a clean checkout
cd /tmp/ git clone /path/to/airavata-django-portal-commons/ -b $VERSION cd airavata-django-portal-commons python3 -m venv venv source venv/bin/activate python3 -m pip install --upgrade pip build python3 -m build
Push to pypi.org. Optionally can push to test.pypi.org. See https://packaging.python.org/tutorials/packaging-projects/ for more info.
python3 -m pip install --upgrade twine python3 -m twine upload dist/*