Skip to content

Commit 7be6d10

Browse files
committed
📝(docs) add documentation for upgrade to 5.x
Ralph V5 uses Pydantic V2. Users have to refer to the migration guide of Pydantic V2 to upgrade the use of Ralph `models` feature in their project.
1 parent a43c06f commit 7be6d10

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

UPGRADE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ All instructions to upgrade this project from one release to the next will be do
44

55
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
### 4.x to 5.y
8+
9+
#### Upgrade learning events models
10+
11+
xAPI learning statements validator and converter are built with Pydantic. Ralph 5.x
12+
is compatible with Pydantic 2.x. Please refer to [Pydantic migration
13+
guide](https://docs.pydantic.dev/dev/migration/) if you are using Ralph `models`
14+
feature.
15+
16+
> Most of fields in Pydantic models that are optional are set with `None` as
17+
default value in Ralph 5.y. If you serialize some Pydantic models from ralph
18+
and want to keep the same content in your serialization, please set
19+
`exclude_none` to `True` in the serialization method `model_dump`.
20+
721
### 3.x to 4.y
822

923
#### Upgrade user credentials

docs/theme/announce.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- the following line is displayed in the announcement bar -->
22
<!-- keep length under 164 characters (less HTML tags) to fit on 1280px desktop window -->
3-
🌟 Big News! Ralph v4 is here. Don't forget to check out our
3+
🌟 Big News! Ralph v5 is here. Don't forget to check out our
44
<a href=https://github.com/openfun/ralph/blob/main/UPGRADE.md>migration guide</a>
55
for a seamless transition. 🚀

0 commit comments

Comments
 (0)