@@ -20,24 +20,13 @@ Cloning repository
20
20
git clone https://github.com/mansenfranzen/autodoc_pydantic.git
21
21
cd autodoc_pydantic
22
22
23
- .. note ::
24
-
25
- In June 2023, **pydantic v2 ** was released. This introduced backwards
26
- incompatible API and behavioral changes in comparison to pydantic v1. Hence,
27
- **autodoc_pydantic ** required substantial adjustments, too. In order to keep
28
- the codebase clean and concise, separate versions for v1 and v2 were
29
- created. The v2 branch will eventually become the new `main `_ branch while
30
- the code for v1 remains in the `main-1.x `_ branch.
31
-
32
- In a nutshell, if you want to work on v1, please checkout the corresponding
33
- `main-1.x `_ branch. Otherwise, refer to the `main `_ branch.
34
23
35
24
Creating environment
36
25
--------------------
37
26
38
27
.. code-block :: bash
39
28
40
- poetry install -E dev -E erdantic
29
+ poetry install --all-extras
41
30
42
31
-----------------------
43
32
Running & writing tests
@@ -52,14 +41,24 @@ with pytest, run ``poetry run pytest``.
52
41
tox
53
42
---
54
43
55
- For more sophisticated testing, you can use tox for different test
56
- environments. A test environment is characterized by varying versions of
57
- *autodoc_pydantic *'s dependencies like pydantic, sphinx and sphinx-tabs:
44
+ For more sophisticated testing, use `tox <https://tox.wiki/en/latest >`_
45
+ for different test environments. Test environments are characterized
46
+ by varying versions of python and *autodoc_pydantic *'s dependencies
47
+ like pydantic and sphinx. This is critical for ensuring library
48
+ compatibility across different versions of python and pydantic and
49
+ sphinx.
50
+
51
+ **Usage: **
52
+
53
+ First, make sure you have tox installed globally via ``pipx `` or ``pip ``
54
+ (see `here <https://tox.wiki/en/latest/installation.html >`_):
55
+
56
+ Second, to invoke the test suite with tox, run one of the following commands:
58
57
59
- - Test a specific environment: ``poetry run tox -e py38-pydantic17-sphinx34 ``
60
- - Test the latest stable versions from pypi: ``poetry run tox -e latest ``
61
- - Test the current developer versions from git repositories: ``poetry run tox -e development ``
62
- - Test all available environments: ``poetry run tox `` (not recommended)
58
+ - Test a specific environment: ``tox -e py311-pydantic26-sphinx71 ``
59
+ - Test the latest stable versions from pypi: ``tox -e latest ``
60
+ - Test the current developer versions from git repositories: ``tox -e development ``
61
+ - Test all available environments: ``tox `` (not recommended)
63
62
64
63
Please visit the ``tox.ini `` for all available test environments.
65
64
@@ -73,6 +72,7 @@ Please visit the ``tox.ini`` for all available test environments.
73
72
4. run tests within virtual environment via pytest
74
73
5. provide test coverage report
75
74
75
+ This approach is chosen in the corresponding CI/CD pipeline.
76
76
77
77
-----------------------
78
78
Building & writing docs
0 commit comments