Skip to content

Commit

Permalink
v0.6.2 (bump to Python 3.10)
Browse files Browse the repository at this point in the history
  • Loading branch information
open-risk committed Sep 21, 2023
1 parent 6ed3888 commit be4ddcc
Show file tree
Hide file tree
Showing 14 changed files with 133 additions and 38 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ ChangeLog
===========================
PLEASE NOTE THIS IS ONLY A BETA RELEASE. THE OPENNPL API IS STILL UNSTABLE

v0.6.2 (21-09-2023)
-------------------
* Dependencies: Upgrade to Python 3.10

v0.6.1 (03-04-2023)
-------------------
* Functionality: Complete SFLP Template Loading
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM python:3.9-slim
LABEL version="0.6"
FROM python:3.10-slim
LABEL version="0.6.1"
LABEL author="Open Risk <www.openriskmanagement.com>"
LABEL description="openNPL: Open Source Credit Portfolio Management"
LABEL maintainer="[email protected]"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Manual installation from the repository source files requires some familiarity w

### Prerequisites
- openNPL requires a working Python 3 installation (including pip)
- Python >= 3.9
- Python >= 3.10
- Django >= 4.0
- The precise python library dependencies are listed in the :doc:`requirements`.txt file.
- Note: The current User Interface (UI) is desktop oriented and might not work properly in smaller mobile screens
Expand Down
22 changes: 21 additions & 1 deletion createadmin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
#!/usr/bin/env python
"""Create a standard admin user for testing purposes"""
# Copyright (c) 2020 - 2023 Open Risk (https://www.openriskmanagement.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

import os

import django

os.environ['DJANGO_SETTINGS_MODULE'] = 'openNPL.settings'
Expand Down
20 changes: 20 additions & 0 deletions dashboard.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# Copyright (c) 2020 - 2023 Open Risk (https://www.openriskmanagement.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

"""
ATTN: Deprecated
Expand Down
16 changes: 15 additions & 1 deletion docs/source/description.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The openNPL distribution has the following structure:
+=========+===============+====================+=======================================+
| openNPL | | | The root directory |
+---------+---------------+--------------------+---------------------------------------+
| | npl_portfolio | | DIR: The core python files |
| | npl_portfolio | | DIR: EBA NPL portfolio app |
+---------+---------------+--------------------+---------------------------------------+
| | | models.py | Portfolio level models |
+---------+---------------+--------------------+---------------------------------------+
Expand All @@ -63,6 +63,12 @@ The openNPL distribution has the following structure:
+---------+---------------+--------------------+---------------------------------------+
| | | fixtures | DIR: Sample data in JSON format |
+---------+---------------+--------------------+---------------------------------------+
| | sflp_portfolio| | DIR: US Single Family loan app |
+---------+---------------+--------------------+---------------------------------------+
| | | models | DIR: model files |
+---------+---------------+--------------------+---------------------------------------+
| | | fixtures | DIR: Sample data in JSON format |
+---------+---------------+--------------------+---------------------------------------+
| | start | | DIR: Templates for the front end |
+---------+---------------+--------------------+---------------------------------------+
| | openNPL | | DIR: Application configuration files |
Expand All @@ -81,11 +87,19 @@ Core Data Models
----------------
The core data models currently implemented are:

EBA NPL Portfolio
~~~~~~~~~~~~~~~~~~

- **Portfolio** (Segments the loan level data into distinct portfolios)
- **Portfolio_Snapshot** (Segments the loan level data into temporal snapshots / cutoff dates)
- **8 NPL Tables** (Implementing the core European Banking Authority NPL template specification)
- **User** (Inheriting from Django User model)

US Single Family Portfolio
~~~~~~~~~~~~~~~~~~~~~~~~~~

.. TODO::

Installation Options
--------------------
The :doc:`/installation` page provides guidance with the current installation options
Expand Down
2 changes: 1 addition & 1 deletion docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Dependencies / Requirements
.. note:: A Linux based system is recommended but with minor tweaks it is in principle also possible to deploy in Windows systems

- openNPL requires a working Python 3 installation (including pip)
- Python >= 3.9
- Python >= 3.10
- Django >= 4.0
- The precise python library dependencies are listed in the :doc:`requirements`.txt file.
- openNPL may work with earlier versions of these packages but this has not been tested
Expand Down
21 changes: 20 additions & 1 deletion manage.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
#!/usr/bin/env python
"""openNPL / Django's command-line utility for administrative tasks."""
# Copyright (c) 2020 - 2023 Open Risk (https://www.openriskmanagement.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

import os
import sys

Expand Down
20 changes: 20 additions & 0 deletions npl_portfolio/apps.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# Copyright (c) 2020 - 2023 Open Risk (https://www.openriskmanagement.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from django.apps import AppConfig


Expand Down
21 changes: 0 additions & 21 deletions openNPL/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,16 @@
"""

import os
# import grappelli
from django.utils.translation import gettext_lazy as _

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# Quick-start development settings - unsuitable for production

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '@e=)h@ikk@p6an)s-e_wpt57p6%h%g$*ra#*g+xg2xr+9xd9tg'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ['localhost', '0.0.0.0', '127.0.0.1', 'www.equinoxpoint.org']

INSTALLED_APPS = [
'jazzmin',
# 'grappelli',
# 'grappelli.dashboard',
'django.contrib.admin',
'django.contrib.admindocs',
'django.contrib.auth',
Expand Down Expand Up @@ -83,20 +74,15 @@
]

ROOT_URLCONF = 'openNPL.urls'

ROOT_VIEW = "http://localhost:8001"

SITE_ID = 1
SITE_URL = "http://127.0.0.1:8001/"

MEDIA_ROOT = os.path.join(BASE_DIR, 'uploads/')
MEDIA_URL = '/uploads/'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
# 'DIRS': [os.path.join(BASE_DIR, 'templates'), os.path.join(BASE_DIR, 'templates/admin'),
# os.path.dirname(grappelli.__file__)],
'DIRS': [os.path.join(BASE_DIR, 'templates'), os.path.join(BASE_DIR, 'templates/admin')],
'APP_DIRS': True,
'OPTIONS': {
Expand Down Expand Up @@ -159,25 +145,18 @@
)

DATA_UPLOAD_MAX_NUMBER_FIELDS = 10000

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True

# Debug-Toolbar
INTERNAL_IPS = [
'127.0.0.1',
]

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')

# GRAPPELLI_ADMIN_TITLE = 'openNPL'

JAZZMIN_SETTINGS = {
# Whether to show the UI customizer on the sidebar
# "show_ui_builder": False,
Expand Down
9 changes: 4 additions & 5 deletions openNPL/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, include, re_path

from . import npl_views, sflp_views, settings

from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi
from drf_yasg.views import get_schema_view
from rest_framework import permissions

from . import npl_views, settings

schema_view = get_schema_view(
openapi.Info(
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[metadata]
license_file = LICENSE
name = openNPL
version = 0.5
version = 0.6.2
description = Open source platform for the management of non-performing loans
long_description = file:description_short.rst
url = https://github.com/open-risk/openNPL
Expand All @@ -13,7 +13,7 @@ classifiers =
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: Implementation :: CPython
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: Information Analysis
Expand All @@ -36,7 +36,7 @@ max-complexity = 10

[options]
include_package_data = true
python_requires = >=3.9
python_requires = >=3.10
setup_requires =
setuptools >= 38.3.0
install_requires =
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

from setuptools import setup

__version__ = '0.5'
__version__ = '0.6.2'

ver = __version__

Expand Down Expand Up @@ -54,7 +54,7 @@
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Information Analysis'
]
Expand Down
20 changes: 20 additions & 0 deletions sflp_portfolio/apps.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# Copyright (c) 2020 - 2023 Open Risk (https://www.openriskmanagement.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from django.apps import AppConfig


Expand Down

0 comments on commit be4ddcc

Please sign in to comment.