Skip to content

Commit 90552b3

Browse files
djs0109sbanoeon
andauthored
152 migrate to pydantic v2 (#167)
* style: updated pre commit to latest versions * feat: first migration to pydantic V2, using pydjantic for settings * chore: remove unused setup in wsgi/asgi * feat: use custom mapping for settings * fix: pydjantic base_dir * fix: rework pydjantic * fix: adding prefix to use same database env * fix: change env to alias for pydantic v2 * test: test logging settings * fix: include media folder * fix: fixed dependency conflict * fix: fixed error for class variable * chore: adapt pydantic changes in jsonschem parser * chore(entirety): update requirements * fix(entirety): error after updating filip * docs(sdm): examples for tested smart data models with new parser * fix(entity): invoking of get_context_data * chore(entity): remove ' from example json schema model * chore(entirety): update default login_url * fix(entirety): add work around for conflict of jsonschemaparser * chore(entity): use default as value while parsing data models * chore(entirety): update login url * fix(entirety): default attr value and datetime type * fix(semantic): migration error --------- Co-authored-by: Saira Bano <[email protected]>
1 parent 739e27e commit 90552b3

File tree

13 files changed

+270
-183
lines changed

13 files changed

+270
-183
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ pip
3030

3131
```bash
3232
cd ./app/Entirety
33+
pip install -e git+https://jugit.fz-juelich.de/iek-10/public/ict-platform/fiware-applications/[email protected]#egg=jsonschemaparser
3334
pip install -r requirements.txt
3435
```
36+
> **Note:** The jsonschemaparser is a package from a repository.
37+
> It might cause conflicts with other libs. Therefore, we install it separately.
38+
> Please ignore the relevant ERROR message.
3539
3640
pre-commit
3741

@@ -94,7 +98,7 @@ provide following settings in your env file.
9498

9599
For a full list of settings see [settings](./docs/SETTINGS.md).
96100

97-
## User and permissions model
101+
## User and permissions model
98102

99103
The user and permissions model of _Entirety_ is described in the [user model documentation](./docs/USERMODEL.md).
100104

@@ -118,14 +122,14 @@ See [changelog](./docs/CHANGELOG.md) for detailed overview of changes.
118122

119123
## Further project information
120124

121-
<a href="https://n5geh.de/"> <img alt="National 5G Energy Hub"
125+
<a href="https://n5geh.de/"> <img alt="National 5G Energy Hub"
122126
src="https://raw.githubusercontent.com/N5GEH/n5geh.platform/master/docs/logos/n5geh-logo.png" height="100"></a>
123127

124128
## Acknowledgments
125129

126-
We gratefully acknowledge the financial support of the Federal Ministry <br />
127-
for Economic Affairs and Climate Action (BMWK), promotional references
130+
We gratefully acknowledge the financial support of the Federal Ministry <br />
131+
for Economic Affairs and Climate Action (BMWK), promotional references
128132
03EN1030B and 03ET1561B.
129133

130-
<a href="https://www.bmwi.de/Navigation/EN/Home/home.html"> <img alt="BMWK"
134+
<a href="https://www.bmwi.de/Navigation/EN/Home/home.html"> <img alt="BMWK"
131135
src="https://raw.githubusercontent.com/N5GEH/n5geh.platform/master/docs/logos/BMWK-logo_en.png" height="100"> </a>

app/Entirety/.env.EXAMPLE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ LOKI_SRC_HOST=entirety
2828
LOKI_TIMEZONE=Europe/Berlin
2929

3030
LOCAL_AUTH=True
31-
LOGIN_URL=/
31+
LOGIN_URL=/accounts/login
3232
LOGIN_REDIRECT_URL=/
3333
LOGOUT_REDIRECT_URL=/
3434
# OIDC

app/Entirety/entirety/asgi.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
import os
1111

1212
from django.core.asgi import get_asgi_application
13-
from pydantic_settings import SetUp
1413

15-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "entirety.settings.Settings")
16-
SetUp().configure()
14+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "entirety.settings")
1715
application = get_asgi_application()

0 commit comments

Comments
 (0)