Benjamin Sitruk
e00dba322b
Docs: Add validators to dynamic model ( #1963 )
...
* Add dynamic validators to doc
* Update models_dynamic_validators.py
* Update models_dynamic_validators.py
* Adding example (success and error)
* Update models_dynamic_validators.py
2020-10-25 17:57:08 +00:00
Tyler Wozniak
3e4c1b5714
Adding deque to valid field types ( #1935 )
...
* Adding deque to valid field types
* Added missing type example
* Fix bad copy-paste
Co-authored-by: PrettyWood <em.jolibois@gmail.com >
* correct enum validator name
* correct enum validator name, take2
Co-authored-by: PrettyWood <em.jolibois@gmail.com >
Co-authored-by: Samuel Colvin <s@muelcolvin.com >
2020-10-25 17:52:34 +00:00
Gabriel
d14731f16c
schema ref_template ( #1480 )
...
* ignore Pipfile, .lock files
* add ref_template option
use a string.Template instead of a ref_prefix to allow for more varied`$ref`s to be created.
Template string is expected to have $model_name `identifier `
* formatting / linting
* add changes
* typo
* use string.format instead of string.Template
* remove ref_prefix default
if no `ref_prefix` provided, use the `template_default`
* use ref_template in field_singleton_schema
* fix test_schema_with_ref_template
* add parameters for `test_schema_with_refs`
test name change
test for key error
* provide ref_template default argument
* fix linting
* fix mypy and coverage
* docs and correct model_schema usage
* fastAPI tests actualy caught an error
* linting
Co-authored-by: Samuel Colvin <s@muelcolvin.com >
2020-10-25 16:24:37 +00:00
Noel Evans
5da8b9cded
Parse time with tz ( #1814 )
...
* Parse timezone information in time str
* Add description of change fixing issue 1744
* Guard against TZ over 24 hours
* Parse timezone information in time str
* Datetime and time TZ parsed in separate fn
* Sharpen annotation, many return statements
* Fix mypy errors raised on datetime_parse
* fix type hints
* update docs and correct types
Co-authored-by: Samuel Colvin <s@muelcolvin.com >
2020-10-25 16:08:38 +00:00
Samuel Colvin
a25aba26b5
linting as a separate CI step ( #2030 )
...
* linting as a separate ci step
* CI and docs improvements
* fix docs preview
* fix docs, benchmarks fastapi tests
* fix formatting and docs build
* tweak publishing docs
* fix for new download-artifact action
* skip check tag to check docs build
* prepare for merge
2020-10-25 15:03:33 +00:00
dependabot[bot]
c4986ded1c
Bump markdown from 3.3 to 3.3.1 ( #2016 )
...
Bumps [markdown](https://github.com/Python-Markdown/markdown ) from 3.3 to 3.3.1.
- [Release notes](https://github.com/Python-Markdown/markdown/releases )
- [Commits](https://github.com/Python-Markdown/markdown/compare/3.3...3.3.1 )
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-25 12:16:28 +00:00
dependabot[bot]
893fb8b6a0
Bump mkdocs-material from 6.0.2 to 6.1.0 ( #2015 )
...
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material ) from 6.0.2 to 6.1.0.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases )
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/docs/changelog.md )
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/6.0.2...6.1.0 )
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-25 12:16:14 +00:00
PrettyWood
ab671a3670
feat(field): add Enum and IntEnum as valid types for fields ( #1737 )
...
* feat(field): add Enum type support
closes #1735
* test: add extra cases and rename to be more explicit
* refactor: rename enum_validator
* feat: add Enum and IntEnum types support
* docs: add new types
* chore: update change message
2020-10-18 20:53:29 +01:00
Samuel Colvin
8ccc5708f1
remove data.json, fix #1992 ( #1994 )
2020-10-11 19:34:37 +01:00
Jason Wu
130c9903d7
docs: fix typo ( #1959 )
2020-10-09 13:06:47 +01:00
Stefan Götz
9d4ba6d4b5
- fix typo in docs/index.md ( #1921 )
2020-10-09 12:52:08 +01:00
Brian Maissy
dbb1ed0aaa
remove strict_optional from sample mypy.ini in doc ( #1830 )
...
Really not critical, but strict_optional=True is the default for mypy since 0.600, so its presence in the sample mypy.ini in the docs seems redundant.
https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-no-strict-optional
2020-10-09 11:28:42 +01:00
Geon Kim - KimMachineGun
be8ef63a33
docs: Fix incorrect description of copy method ( #1821 )
...
* docs: Fix typo
* docs: Fix incorrect description of copy method
* changes: Add changes description file
* docs: Add space before parentheses
Co-authored-by: PrettyWood <em.jolibois@gmail.com >
Co-authored-by: PrettyWood <em.jolibois@gmail.com >
2020-10-09 11:28:04 +01:00
PrettyWood
75859a9d58
feat(tools): add parse_raw_as util ( #1813 )
...
closes #1812
2020-10-09 10:35:07 +01:00
Samuel Colvin
c5fc921620
combined uprev of dependencies ( #1978 )
2020-10-09 10:20:36 +01:00
Matthew Davis
094da94da9
clarify argument type to parse_file ( #1795 )
...
Co-authored-by: Matthew Davis <Matthew.Davis.2@team.telstra.com >
2020-10-08 21:10:09 +01:00
PrettyWood
55e78cc106
fix(schema): add basic support of Pattern type in schema generation ( #1768 )
...
closes #1767
2020-10-08 20:42:14 +01:00
Samuel Colvin
9c4860ce96
Valdiate arguments config ( #1663 )
...
* add `configs` to validate_arguments
* simplify `validate_arguments` and add annotation for parameter `configs`
* change double quotes to single quotes
* reformat code
* fix mypy error
* fix mypy 'maximum semantic analysis' error
* rename 'configs' > 'config_params'
* change name and usage, start tests
* prevent setting fields on custom config
* add docs and fix mypy
* tweak docs
* add change
Co-authored-by: quantpy <quantpy@qq.com >
2020-09-06 23:17:52 +01:00
Samuel Colvin
296d929904
updating all deps ( #1907 )
...
* updating all deps
* uprev github actions docs
2020-09-06 13:04:41 +01:00
Jordan Côté
f1f944fbc1
Update datamode_code_generator:typo in pip install ( #1713 )
...
As seen in https://koxudaxi.github.io/datamodel-code-generator , the correct command is
`pip install datamodel-code-generator`
not
`pip install datamodel-code-generato`
2020-07-13 18:33:48 +01:00
Lordran
527c35a856
remove duplicate "an" ( #1708 )
2020-07-11 11:23:29 +01:00
Patrick Wang
dca98559d5
Add conset ( #1627 )
...
* Add conset
* Add changes doc
* Fix too-long lines
* bump
* Update conset change doc formatting
Co-authored-by: Samuel Colvin <samcolvin@gmail.com >
* Robustify test_conset
* Move conlist and conset tests to test_types
Co-authored-by: Samuel Colvin <s@muelcolvin.com >
Co-authored-by: Samuel Colvin <samcolvin@gmail.com >
2020-07-03 20:51:23 +01:00
beezee
e3c5e1d3cd
aggregate root validation errors ( #1586 )
...
* aggregate root validation errors
* add changelog
* update language in docs around root validators and prior failure
* factor out unique_list
2020-07-03 20:47:04 +01:00
dependabot-preview[bot]
dc72ae00a3
Bump mkdocs-material from 5.3.3 to 5.4.0 ( #1672 )
...
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material ) from 5.3.3 to 5.4.0.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases )
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG )
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/5.3.3...5.4.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-03 20:44:47 +01:00
Yuri Khan
259a1a0ff8
Fix typo ( #1631 ) ( #1674 )
2020-07-01 14:47:44 +01:00
Yuri Khan
908f6edb72
Document default regex anchoring semantics ( #1631 ) ( #1648 )
2020-06-27 19:16:32 +01:00
Yuri Khan
d5e1c88fda
Document schema_extra calling convention ( #1645 )
2020-06-27 18:53:59 +01:00
Mlbiche
113921c6c5
Update datetime parser to support negative timestamps ( #1605 )
...
- Negative timestamps corresponds to dates before 1970/1/1
2020-06-27 14:52:20 +01:00
Samuel Eklund
7bd635c21c
Subclass validator each item docs ( #1592 )
...
* add description of subclass each_item scenario
* add example of subclass validator with each_item
* each_item causes validator to not run when parent class has List field #1566
2020-06-27 14:51:18 +01:00
PrettyWood
c59db275dc
fix(field): remove some side effects of default_factory ( #1504 )
...
* Avoid some side effects of default factory
- by calling it only once if possible (fix #1491 )
- by not setting the default value in the schema (fix #1520 )
* refactor: ensure type is set when using default_factory
2020-06-27 14:02:29 +01:00
Samuel Colvin
f85afab8cf
tiny correction to docs
2020-06-27 13:58:23 +01:00
Samuel Colvin
d122b1dbdc
remove RedisDsn.user_required = True ( #1658 )
...
* remove RedisDsn.user_required = True
* update docs
2020-06-26 12:02:57 +01:00
Samuel Colvin
8e00077cc4
uprev test dependencies ( #1657 )
2020-06-25 21:40:34 +01:00
Fredrik Jonsén
97b6b46268
docs: add missing period and capitalize where appropriate ( #1653 )
2020-06-23 18:47:39 +01:00
PrettyWood
0cee311be5
feat(settings): allow custom encoding for dotenv files ( #1620 )
...
closes #1615
2020-06-11 11:04:08 +01:00
Koudai Aono
6e29848608
Add datamodel-code-generator link in pydantic document site ( #1532 )
...
* Add datamodel-code-generator link in pydantic document site.
* tweak menu
* fix blank lines
Co-authored-by: Samuel Colvin <samcolvin@gmail.com >
Co-authored-by: Samuel Colvin <s@muelcolvin.com >
2020-05-31 15:23:20 +01:00
Samuel Colvin
63ec6fffe3
update docs on generics, fix #1547 ( #1584 )
2020-05-31 15:08:57 +01:00
Samuel Colvin
2a5914c841
closes #1534 ( #1559 )
2020-05-31 15:08:32 +01:00
Shawn Wall
4f9e77d213
1541 UUID bytes support for 16 byte strings / BINARY(16) ( #1542 )
...
* [1541] add fallback to UUID instantiation through bytes
* [1541] added changes md file
* Update UUID docs for bytes/bytearray
Co-authored-by: Shawn Wall <shawn@civicscience.com >
2020-05-31 15:05:53 +01:00
dependabot-preview[bot]
0c39cc429c
Bump mkdocs-material from 5.1.7 to 5.2.2 ( #1567 )
...
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material ) from 5.1.7 to 5.2.2.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases )
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG )
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/5.1.7...5.2.2 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-31 15:05:27 +01:00
Samuel Colvin
dc094f1211
fix blank lines in docs
2020-05-31 15:05:06 +01:00
Stephen Brown II
ba2cc5c557
Make assertion match message ( #1533 )
2020-05-31 14:57:37 +01:00
Stephen Brown II
ec1dca9126
Add linting for docs/examples ( #1530 )
2020-05-31 14:54:12 +01:00
Luka Peschke
1bff80459d
Add an example to documentation for reserved ORM field names ( #1474 )
...
Signed-off-by: Luka Peschke <mail@lukapeschke.com >
2020-05-31 14:44:23 +01:00
Alexander Hultnér
2eb62a3b2f
Added a "Talks and video tutorials" section ( #1499 )
...
* Added a "Talks and video tutorials" section
Added my "Python pydantic Introduction – Give your data classes super powers" talk YouTube video based on the talk for Python Pizza.
* Add changelog entry for video change
Did this after creating the pr so I would have the number to use as a reference.
* Moved video into a discussion subsection
Now placed under testimonials
* Updated change log entry to reflect changes.
2020-05-26 07:50:56 +01:00
Mike Grima
28c2ac7a43
Added docs on dumping dataclasses to JSON ( #1487 )
2020-05-18 21:55:49 +01:00
Samuel Colvin
c8906ce810
uprev all test and docs dependencies ( #1528 )
2020-05-18 21:31:23 +01:00
Selim Belhaouane
881df8bde7
move const validator to post validators. fixes #1410 ( #1446 )
2020-04-30 19:05:42 +01:00
Jerry
9b2310a7d3
Fixed typo ( #1456 )
...
stictness -> strictness
2020-04-30 13:06:53 +01:00
dependabot-preview[bot]
de24ae968b
Bump mkdocs-material from 5.1.1 to 5.1.3 ( #1440 )
...
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material ) from 5.1.1 to 5.1.3.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases )
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG )
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/5.1.1...5.1.3 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-30 13:05:25 +01:00