diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 545dd4002..d5ab766ad 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.3.14-alpha +current_version = 0.0.1-alpha tag = True commit = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)\-(?P.*) @@ -16,6 +16,10 @@ values = [bumpversion:file:passbook/__init__.py] +[bumpversion:file:passbook/core/__init__.py] + +[bumpversion:file:passbook/admin/__init__.py] + [bumpversion:file:passbook/captcha_factor/__init__.py] [bumpversion:file:passbook/oauth_client/__init__.py] diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 000000000..54ac95994 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,35 @@ +[run] +source = passbook +omit = + env/ + */wsgi.py + manage.py + */migrations/* + */apps.py + passbook/management/commands/nexus_upload.py + passbook/management/commands/web.py + passbook/management/commands/worker.py + docs/ + +[report] +sort = Cover +skip_covered = True +precision = 2 +exclude_lines = + pragma: no cover + + # Don't complain about missing debug-only code: + def __unicode__ + def __str__ + def __repr__ + if self\.debug + + # Don't complain if tests don't hit defensive assertion code: + raise AssertionError + raise NotImplementedError + + # Don't complain if non-runnable code isn't run: + if 0: + if __name__ == .__main__.: + +show_missing = True diff --git a/passbook/admin/__init__.py b/passbook/admin/__init__.py index 4b21b0d54..1b786e9d1 100644 --- a/passbook/admin/__init__.py +++ b/passbook/admin/__init__.py @@ -1,2 +1,2 @@ """passbook admin""" -default_app_config = 'passbook.admin.apps.PassbookAdminConfig' +__version__ = '0.0.1-alpha' diff --git a/passbook/api/__init__.py b/passbook/api/__init__.py index 2d5331ead..0d89de57c 100644 --- a/passbook/api/__init__.py +++ b/passbook/api/__init__.py @@ -1,2 +1,2 @@ """passbook api""" -default_app_config = 'passbook.api.apps.PassbookAPIConfig' +__version__ = '0.0.1-alpha' diff --git a/passbook/audit/__init__.py b/passbook/audit/__init__.py index f90622927..3e178f2a5 100644 --- a/passbook/audit/__init__.py +++ b/passbook/audit/__init__.py @@ -1,3 +1,2 @@ """passbook audit Header""" __version__ = '0.0.1-alpha' -default_app_config = 'passbook.audit.apps.PassbookAuditConfig' diff --git a/passbook/captcha_factor/__init__.py b/passbook/captcha_factor/__init__.py index 7aad72d49..ffa9b2783 100644 --- a/passbook/captcha_factor/__init__.py +++ b/passbook/captcha_factor/__init__.py @@ -1,3 +1,2 @@ """passbook captcha_factor Header""" __version__ = '0.0.1-alpha' -default_app_config = 'passbook.captcha_factor.apps.PassbookCaptchaFactorConfig' diff --git a/passbook/core/__init__.py b/passbook/core/__init__.py index e961898ae..828e4b121 100644 --- a/passbook/core/__init__.py +++ b/passbook/core/__init__.py @@ -1,2 +1,2 @@ """passbook core""" -default_app_config = 'passbook.core.apps.PassbookCoreConfig' +__version__ = '0.0.1-alpha' diff --git a/passbook/core/settings.py b/passbook/core/settings.py index 480029c7b..1b6b42bbd 100644 --- a/passbook/core/settings.py +++ b/passbook/core/settings.py @@ -66,17 +66,17 @@ INSTALLED_APPS = [ 'django.contrib.staticfiles', 'reversion', 'rest_framework', - 'passbook.core', - 'passbook.admin', - 'passbook.api', - 'passbook.audit', - 'passbook.lib', - 'passbook.ldap', - 'passbook.oauth_client', - 'passbook.oauth_provider', - 'passbook.saml_idp', - 'passbook.totp', - 'passbook.captcha_factor', + 'passbook.core.apps.PassbookCoreConfig', + 'passbook.admin.apps.PassbookAdminConfig', + 'passbook.api.apps.PassbookAPIConfig', + 'passbook.audit.apps.PassbookAuditConfig', + 'passbook.lib.apps.PassbookLibConfig', + 'passbook.ldap.apps.PassbookLdapConfig', + 'passbook.oauth_client.apps.PassbookOAuthClientConfig', + 'passbook.oauth_provider.apps.PassbookOAuthProviderConfig', + 'passbook.saml_idp.apps.PassbookSAMLIDPConfig', + 'passbook.totp.apps.PassbookTOTPConfig', + 'passbook.captcha_factor.apps.PassbookCaptchaFactorConfig', ] # Message Tag fix for bootstrap CSS Classes diff --git a/passbook/ldap/__init__.py b/passbook/ldap/__init__.py index b8c38e0a6..c9bca066a 100644 --- a/passbook/ldap/__init__.py +++ b/passbook/ldap/__init__.py @@ -1,3 +1,2 @@ """Passbook ldap app Header""" __version__ = '0.0.1-alpha' -default_app_config = 'passbook.ldap.apps.PassbookLdapConfig' diff --git a/passbook/lib/__init__.py b/passbook/lib/__init__.py index 428b865b5..d76187e1a 100644 --- a/passbook/lib/__init__.py +++ b/passbook/lib/__init__.py @@ -1,2 +1,2 @@ """passbook lib""" -default_app_config = 'passbook.lib.apps.PassbookLibConfig' +__version__ = '0.0.1-alpha' diff --git a/passbook/oauth_client/__init__.py b/passbook/oauth_client/__init__.py index 45a423754..c342a6301 100644 --- a/passbook/oauth_client/__init__.py +++ b/passbook/oauth_client/__init__.py @@ -1,3 +1,2 @@ """passbook oauth_client Header""" __version__ = '0.0.1-alpha' -default_app_config = 'passbook.oauth_client.apps.PassbookOAuthClientConfig' diff --git a/passbook/oauth_provider/__init__.py b/passbook/oauth_provider/__init__.py index 6d1becdd8..b3101dd97 100644 --- a/passbook/oauth_provider/__init__.py +++ b/passbook/oauth_provider/__init__.py @@ -1,3 +1,2 @@ """passbook oauth_provider Header""" __version__ = '0.0.1-alpha' -default_app_config = 'passbook.oauth_provider.apps.PassbookOAuthProviderConfig' diff --git a/passbook/saml_idp/__init__.py b/passbook/saml_idp/__init__.py index 8f7c6558c..1a5d136a4 100644 --- a/passbook/saml_idp/__init__.py +++ b/passbook/saml_idp/__init__.py @@ -1,3 +1,2 @@ """passbook saml_idp Header""" __version__ = '0.0.1-alpha' -default_app_config = 'passbook.saml_idp.apps.PassbookSAMLIDPConfig' diff --git a/passbook/saml_idp/urls.py b/passbook/saml_idp/urls.py index 051f8c490..ba8c54d33 100644 --- a/passbook/saml_idp/urls.py +++ b/passbook/saml_idp/urls.py @@ -1,11 +1,12 @@ """passbook SAML IDP URLs""" -from django.conf.urls import url +from django.urls import path from passbook.saml_idp import views urlpatterns = [ - url(r'^login/$', views.LoginBeginView.as_view(), name="saml_login_begin"), - url(r'^login/process/$', views.LoginProcessView.as_view(), name='saml_login_process'), - url(r'^logout/$', views.LogoutView.as_view(), name="saml_logout"), - url(r'^metadata/xml/$', views.DescriptorView.as_view(), name='metadata_xml'), + path('login/', views.LoginBeginView.as_view(), name="saml_login_begin"), + path('login/process/', views.LoginProcessView.as_view(), name='saml_login_process'), + path('logout/', views.LogoutView.as_view(), name="saml_logout"), + path('metadata//', + views.DescriptorDownloadView.as_view(), name='metadata_xml'), ] diff --git a/passbook/saml_idp/views.py b/passbook/saml_idp/views.py index 666f66c33..68f8f4f8b 100644 --- a/passbook/saml_idp/views.py +++ b/passbook/saml_idp/views.py @@ -178,7 +178,7 @@ class SLOLogout(CSRFExemptMixin, LoginRequiredMixin, View): return render(request, 'saml/idp/logged_out.html') -class DescriptorView(View): +class DescriptorDownloadView(View): """Replies with the XML Metadata IDSSODescriptor.""" def get(self, request, application_id): diff --git a/passbook/totp/__init__.py b/passbook/totp/__init__.py index e64737713..c1de0c7a4 100644 --- a/passbook/totp/__init__.py +++ b/passbook/totp/__init__.py @@ -1,3 +1,2 @@ """passbook totp Header""" __version__ = '0.0.1-alpha' -default_app_config = 'passbook.totp.apps.PassbookTOTPConfig'