Skip to content

Commit

Permalink
Pydantic V2 blog (#4218)
Browse files Browse the repository at this point in the history
* first draft of pydantic V2 blog

* more blog

* blog rendering and formatting

* more section

* completing conversion table

* prompt build

* reviewing blog post

* more reviewing and extending

* recommendations from @Rabscuttler and @PrettyWood

* add implementation details and more suggestions

* comment about breaking changes

* convert namespae to table, more removals

* Apply suggestions from code review by @tiangolo

Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>

* feedback from @tiangolo's review

* changes from @adriangb's review

* Apply suggestions from code review

Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>

* convert namespace info to psuedo-code

* rename property, remove schema_json()

* adding validation context

* remove 'model_schema_json', take 2

* more tweaks while reviewing

* comment about pypy and tagged unions

* add thanks :prey:, prepare for release

* suggestions from @PrettyWood

* suggestions from @PrettyWood, model_dump_json comment

Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
  • Loading branch information
3 people committed Jul 10, 2022
1 parent a5edcb3 commit 80ec177
Show file tree
Hide file tree
Showing 7 changed files with 969 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- master
- 1.9.X-fixes
- pydantic-v2-blog
tags:
- '**'

Expand Down
945 changes: 945 additions & 0 deletions docs/blog/pydantic-v2.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion docs/extra/ad.js
Expand Up @@ -21,4 +21,5 @@ function main () {
document.head.appendChild(script)
}

main()
// ads disabled for now
// main()
13 changes: 13 additions & 0 deletions docs/extra/tweaks.css
Expand Up @@ -29,3 +29,16 @@
width: 75%;
border-radius: 5px;
}

/*blog post*/
aside.blog {
display: flex;
align-items: center;
}

aside.blog img {
width: 50px;
height: 50px;
border-radius: 25px;
margin-right: 20px;
}
Binary file added docs/img/samuelcolvin.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/theme/main.html
Expand Up @@ -3,7 +3,7 @@
{% block content %}
{# no ad on the home page #}
{% if not page.is_index %}
<div id="bsa-cpc"></div>
<!-- <div id="bsa-cpc"></div>-->
{% endif %}
{{ super() }}
{% endblock %}
8 changes: 7 additions & 1 deletion mkdocs.yml
Expand Up @@ -55,6 +55,8 @@ nav:
- usage/postponed_annotations.md
- 'Usage with mypy': usage/mypy.md
- 'Usage with devtools': usage/devtools.md
- Blog:
- blog/pydantic-v2.md
- Contributing to pydantic: contributing.md
- 'Mypy plugin': mypy_plugin.md
- 'PyCharm plugin': pycharm_plugin.md
Expand All @@ -64,14 +66,18 @@ nav:
- changelog.md

markdown_extensions:
- tables
- markdown_include.include:
base_path: docs
- toc:
permalink: 🔗
permalink: true
- admonition
- pymdownx.highlight
- pymdownx.extra
- mdx_truly_sane_lists
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg

plugins:
- search
Expand Down

0 comments on commit 80ec177

Please sign in to comment.