Skip to content

Commit

Permalink
📝(docs) add documentation for upgrade to 5.x
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
quitterie-lcs committed May 6, 2024
1 parent a43c06f commit 7be6d10
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ All instructions to upgrade this project from one release to the next will be do

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

### 4.x to 5.y

#### Upgrade learning events models

xAPI learning statements validator and converter are built with Pydantic. Ralph 5.x
is compatible with Pydantic 2.x. Please refer to [Pydantic migration
guide](https://docs.pydantic.dev/dev/migration/) if you are using Ralph `models`
feature.

> Most of fields in Pydantic models that are optional are set with `None` as
default value in Ralph 5.y. If you serialize some Pydantic models from ralph
and want to keep the same content in your serialization, please set
`exclude_none` to `True` in the serialization method `model_dump`.

### 3.x to 4.y

#### Upgrade user credentials
Expand Down
2 changes: 1 addition & 1 deletion docs/theme/announce.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- the following line is displayed in the announcement bar -->
<!-- keep length under 164 characters (less HTML tags) to fit on 1280px desktop window -->
🌟 Big News! Ralph v4 is here. Don't forget to check out our
🌟 Big News! Ralph v5 is here. Don't forget to check out our
<a href=https://github.com/openfun/ralph/blob/main/UPGRADE.md>migration guide</a>
for a seamless transition. 🚀

0 comments on commit 7be6d10

Please sign in to comment.