Skip to content

Commit

Permalink
test: add missing __init__ files, fix imports, fix rebase errors
Browse files Browse the repository at this point in the history
  • Loading branch information
adhtruong committed Sep 17, 2023
1 parent ad5a267 commit fb38107
Show file tree
Hide file tree
Showing 8 changed files with 160 additions and 6 deletions.
Empty file.
Empty file.
6 changes: 3 additions & 3 deletions docs/usage/library_factories/sqlalchemy_factory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SQLAlchemyFactory

Basic usage is like other factories

.. literalinclude:: /examples/library_factories/sqlalchemy/test_example_1.py
.. literalinclude:: /examples/library_factories/sqlalchemy_factory/test_example_1.py
:caption: Declaring a factory for a SQLAlchemy model
:language: python

Expand All @@ -12,7 +12,7 @@ Configurations

By default, relationships will not be set. This can be overridden via ``__set_relationships__``.

.. literalinclude:: /examples/library_factories/sqlalchemy/test_example_2.py
.. literalinclude:: /examples/library_factories/sqlalchemy_factory/test_example_2.py
:caption: Setting relationships
:language: python

Expand All @@ -25,7 +25,7 @@ Persistence

A handler is provided to allow persistence. This can be used by setting ``__session__`` attribute on a factory.

.. literalinclude:: /examples/library_factories/sqlalchemy/test_example_3.py
.. literalinclude:: /examples/library_factories/sqlalchemy_factory/test_example_3.py
:caption: Using persistence
:language: python

Expand Down
156 changes: 154 additions & 2 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ odmantic = { version = "*", optional = true }
pydantic = { version = "*", optional = true, extras = ["email"] }
typing-extensions = "*"
attrs = {version = ">=22.2.0", optional = true}
sqlalchemy = { version = ">=2", optional = true }

[tool.poetry.group.dev.dependencies]
hypothesis = "*"
Expand Down Expand Up @@ -76,12 +77,13 @@ ruff = '*'
sourcery = "*"

[tool.poetry.extras]
sqlalchemy = ["sqlalchemy"]
pydantic = ["pydantic"]
msgspec = ["msgspec"]
odmantic = ["odmantic", "pydantic"]
beanie = ["beanie", "pydantic"]
attrs = ["attrs"]
full = ["pydantic", "odmantic", "msgspec", "beanie", "attrs"]
full = ["pydantic", "odmantic", "msgspec", "beanie", "attrs", "sqlalchemy"]

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down

0 comments on commit fb38107

Please sign in to comment.