pytest-databases 0.2.0__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. pytest_databases-0.2.2/.pre-commit-config.yaml +31 -0
  2. pytest_databases-0.2.2/.sourcery.yaml +42 -0
  3. pytest_databases-0.2.2/.vscode/settings.json +96 -0
  4. pytest_databases-0.2.2/CODEOWNERS +7 -0
  5. pytest_databases-0.2.2/CONTRIBUTING.rst +80 -0
  6. pytest_databases-0.2.2/Makefile +116 -0
  7. {pytest_databases-0.2.0 → pytest_databases-0.2.2}/PKG-INFO +5 -1
  8. {pytest_databases-0.2.0 → pytest_databases-0.2.2}/pyproject.toml +68 -79
  9. pytest_databases-0.2.2/requirements/requirements-dev.txt +443 -0
  10. pytest_databases-0.2.2/requirements/requirements-docs.txt +318 -0
  11. pytest_databases-0.2.2/requirements/requirements.txt +13 -0
  12. pytest_databases-0.2.2/scripts/build_docs.py +77 -0
  13. pytest_databases-0.2.2/scripts/convert_docs.sh +7 -0
  14. pytest_databases-0.2.2/sonar-project.properties +15 -0
  15. pytest_databases-0.2.2/src/pytest_databases/__init__.py +21 -0
  16. {pytest_databases-0.2.0 → pytest_databases-0.2.2/src}/pytest_databases/docker/cockroachdb.py +27 -5
  17. {pytest_databases-0.2.0 → pytest_databases-0.2.2/src}/pytest_databases/docker/docker-compose.yml +49 -49
  18. {pytest_databases-0.2.0 → pytest_databases-0.2.2/src}/pytest_databases/docker/dragonfly.py +2 -0
  19. {pytest_databases-0.2.0 → pytest_databases-0.2.2/src}/pytest_databases/docker/keydb.py +2 -0
  20. {pytest_databases-0.2.0 → pytest_databases-0.2.2/src}/pytest_databases/docker/mariadb.py +22 -2
  21. {pytest_databases-0.2.0 → pytest_databases-0.2.2/src}/pytest_databases/docker/mssql.py +21 -14
  22. {pytest_databases-0.2.0 → pytest_databases-0.2.2/src}/pytest_databases/docker/mysql.py +48 -4
  23. {pytest_databases-0.2.0 → pytest_databases-0.2.2/src}/pytest_databases/docker/oracle.py +24 -0
  24. {pytest_databases-0.2.0 → pytest_databases-0.2.2/src}/pytest_databases/docker/postgres.py +25 -0
  25. {pytest_databases-0.2.0 → pytest_databases-0.2.2/src}/pytest_databases/docker/redis.py +2 -0
  26. {pytest_databases-0.2.0 → pytest_databases-0.2.2/src}/pytest_databases/docker/spanner.py +61 -10
  27. pytest_databases-0.2.2/tests/__init__.py +21 -0
  28. pytest_databases-0.2.2/tests/conftest.py +40 -0
  29. pytest_databases-0.2.2/tests/docker/__init__.py +21 -0
  30. pytest_databases-0.2.2/tests/docker/test_cockroachdb.py +57 -0
  31. pytest_databases-0.2.2/tests/docker/test_dragonfly.py +51 -0
  32. pytest_databases-0.2.2/tests/docker/test_keydb.py +53 -0
  33. pytest_databases-0.2.2/tests/docker/test_mariadb.py +99 -0
  34. pytest_databases-0.2.2/tests/docker/test_mssql.py +112 -0
  35. pytest_databases-0.2.2/tests/docker/test_mysql.py +159 -0
  36. pytest_databases-0.2.2/tests/docker/test_oracle.py +105 -0
  37. pytest_databases-0.2.2/tests/docker/test_postgres.py +219 -0
  38. pytest_databases-0.2.2/tests/docker/test_redis.py +51 -0
  39. pytest_databases-0.2.2/tests/docker/test_spanner.py +68 -0
  40. pytest_databases-0.2.0/setup.py +0 -55
  41. {pytest_databases-0.2.0 → pytest_databases-0.2.2}/.gitignore +0 -0
  42. {pytest_databases-0.2.0 → pytest_databases-0.2.2}/LICENSE +0 -0
  43. {pytest_databases-0.2.0 → pytest_databases-0.2.2}/README.md +0 -0
  44. {pytest_databases-0.2.0/pytest_databases → pytest_databases-0.2.2/scripts}/__init__.py +0 -0
  45. {pytest_databases-0.2.0 → pytest_databases-0.2.2/src}/pytest_databases/__metadata__.py +0 -0
  46. {pytest_databases-0.2.0 → pytest_databases-0.2.2/src}/pytest_databases/docker/__init__.py +0 -0
  47. {pytest_databases-0.2.0 → pytest_databases-0.2.2/src}/pytest_databases/helpers.py +0 -0
  48. {pytest_databases-0.2.0 → pytest_databases-0.2.2/src}/pytest_databases/py.typed +0 -0
@@ -0,0 +1,31 @@
1
+ exclude: "^docs/conf.py"
2
+
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v4.5.0
6
+ hooks:
7
+ - id: trailing-whitespace
8
+ - id: check-added-large-files
9
+ - id: check-ast
10
+ - id: check-json
11
+ - id: check-merge-conflict
12
+ - id: check-xml
13
+ - id: check-yaml
14
+ args: ["--unsafe"] # needed for !! tags in mkdocs.yml
15
+ - id: debug-statements
16
+ - id: end-of-file-fixer
17
+ - id: mixed-line-ending
18
+ args: ["--fix=auto"] # replace 'auto' with 'lf' to enforce Linux/Mac line endings or 'crlf' for Windows
19
+
20
+ # Ruff replaces black, flake8, autoflake and isort
21
+ - repo: https://github.com/charliermarsh/ruff-pre-commit
22
+ rev: "v0.3.5" # make sure this is always consistent with hatch configs
23
+ hooks:
24
+ - id: ruff
25
+ args: [--config, ./pyproject.toml]
26
+
27
+ - repo: https://github.com/pre-commit/mirrors-prettier
28
+ rev: v4.0.0-alpha.8
29
+ hooks:
30
+ - id: prettier
31
+ exclude: templates|migrations|scripts|docs|dist|.venv|public
@@ -0,0 +1,42 @@
1
+ ignore:
2
+ - .tox/
3
+ - .venv/
4
+ - dist/
5
+ - docs/_build/
6
+ - docs/_static/
7
+ - node_modules/
8
+ - vendor/
9
+ - venv/
10
+
11
+ rule_settings:
12
+ enable: [default]
13
+ disable: [dont-import-test-modules]
14
+ rule_types:
15
+ - refactoring
16
+ - suggestion
17
+ - comment
18
+ python_version: "3.8"
19
+
20
+ rules: []
21
+
22
+ metrics:
23
+ quality_threshold: 25.0
24
+
25
+ github:
26
+ ignore_labels:
27
+ - sourcery-ignore
28
+ - docs
29
+ labels:
30
+ - build-ignore
31
+ request_review:
32
+ origin: owner
33
+ forked: author
34
+ sourcery_branch: sourcery/{base_branch}
35
+
36
+ clone_detection:
37
+ min_lines: 3
38
+ min_duplicates: 2
39
+ identical_clones_only: false
40
+
41
+ proxy:
42
+ no_ssl_verify: false
@@ -0,0 +1,96 @@
1
+ {
2
+ "files.exclude": {
3
+ "**/._*": true,
4
+ "**/*.pyc": {
5
+ "when": "$(basename).py"
6
+ },
7
+ ".coverage.*": true,
8
+ ".mypy_cache": true,
9
+ "**/__pycache__": true,
10
+ ".venv": true,
11
+ ".direnv": true,
12
+ ".idea": true,
13
+ ".run": true,
14
+ ".pytest_cache": true,
15
+ ".cache": true,
16
+ ".dist": true,
17
+ "**/.pytest_cache": true,
18
+ "site": true,
19
+ ".angular": true,
20
+ ".ruff_cache": true,
21
+ ".astro": true,
22
+ ".unasyncd_cache": true,
23
+ ".coverage": true,
24
+ "node_modules": true,
25
+ ".terraform": true
26
+ },
27
+ "ruff.format.args": ["--config=${workspaceFolder}/pyproject.toml"],
28
+ "ruff.lint.run": "onType",
29
+ "ruff.lint.args": ["--config=${workspaceFolder}/pyproject.toml"],
30
+ "mypy-type-checker.importStrategy": "fromEnvironment",
31
+ "pylint.importStrategy": "fromEnvironment",
32
+ "python.autoComplete.extraPaths": ["${workspaceFolder}/src"],
33
+ "python.terminal.activateEnvInCurrentTerminal": true,
34
+ "python.terminal.executeInFileDir": true,
35
+ "python.testing.pytestEnabled": true,
36
+ "autoDocstring.guessTypes": false,
37
+ "python.analysis.autoImportCompletions": true,
38
+ "python.analysis.autoFormatStrings": true,
39
+ "python.analysis.extraPaths": ["${workspaceFolder}/src"],
40
+ "editor.formatOnSave": true,
41
+ "notebook.formatOnSave.enabled": true,
42
+ "black-formatter.args": ["--line-length=120"],
43
+ "evenBetterToml.formatter.reorderKeys": true,
44
+ "evenBetterToml.formatter.trailingNewline": true,
45
+ "evenBetterToml.formatter.columnWidth": 120,
46
+ "evenBetterToml.formatter.arrayAutoCollapse": true,
47
+ "python.globalModuleInstallation": false,
48
+ "python.testing.unittestEnabled": false,
49
+ "editor.codeActionsOnSave": {
50
+ "source.fixAll.ruff": "explicit",
51
+ "source.organizeImports.ruff": "explicit"
52
+ },
53
+ "[python]": {
54
+ "editor.formatOnSave": true,
55
+ "editor.formatOnSaveMode": "file",
56
+ "editor.insertSpaces": true,
57
+ "editor.tabSize": 4,
58
+ "editor.trimAutoWhitespace": true,
59
+ "editor.defaultFormatter": "charliermarsh.ruff",
60
+ "editor.codeActionsOnSave": {
61
+ "source.fixAll": "explicit",
62
+ "source.organizeImports": "explicit"
63
+ }
64
+ },
65
+ "python.analysis.fixAll": [
66
+ "source.unusedImports",
67
+ "source.convertImportFormat"
68
+ ],
69
+ "sqltools.disableReleaseNotifications": true,
70
+ "sqltools.disableNodeDetectNotifications": true,
71
+ "cloudcode.duetAI.enable": true,
72
+ "cloudcode.compute.sshInternalIp": true,
73
+ "python.testing.pytestArgs": ["tests"],
74
+ "markdownlint.run": "onSave",
75
+ "markdownlint.config": {
76
+ "default": true,
77
+ "MD046": {
78
+ "style": "fenced"
79
+ },
80
+ "MD007": {
81
+ "indent": 4
82
+ },
83
+ "no-hard-tabs": false
84
+ },
85
+ "yaml.schemas": {
86
+ "https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml"
87
+ },
88
+ "yaml.customTags": [
89
+ "!ENV scalar",
90
+ "!ENV sequence",
91
+ "!relative scalar",
92
+ "tag:yaml.org,2002:python/name:material.extensions.emoji.to_svg",
93
+ "tag:yaml.org,2002:python/name:material.extensions.emoji.twemoji",
94
+ "tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format"
95
+ ]
96
+ }
@@ -0,0 +1,7 @@
1
+ # Code owner settings for `litestar-org`
2
+ # @maintainers should be assigned to all reviews.
3
+ # Most specific assignment takes precedence though, so if you add a more specific thing than the `*` glob, you must also add @maintainers
4
+ # For more info about code owners see https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-file-example
5
+
6
+ # Global Assignment
7
+ * @litestar-org/maintainers @litestar-org/members
@@ -0,0 +1,80 @@
1
+ Contribution guide
2
+ ==================
3
+
4
+ Setting up the environment
5
+ --------------------------
6
+
7
+ 1. Install `PDM <https://pdm.fming.dev/latest/>`_
8
+ 2. Run ``pdm install -G:all`` to create a `virtual environment <https://docs.python.org/3/tutorial/venv.html>`_ and install
9
+ the dependencies
10
+ 3. If you're working on the documentation and need to build it locally, install the extra dependencies with ``pdm install -G:docs``
11
+ 4. Install `pre-commit <https://pre-commit.com/>`_
12
+ 5. Run ``pre-commit install`` to install pre-commit hooks
13
+
14
+ Code contributions
15
+ ------------------
16
+
17
+ Workflow
18
+ ++++++++
19
+
20
+ 1. `Fork <https://github.com/litestar-org/pytest-databases/fork>`_ the `Pytest Database Alchemy repository <https://github.com/litestar-org/pytest-databases>`_
21
+ 2. Clone your fork locally with git
22
+ 3. `Set up the environment <#setting-up-the-environment>`_
23
+ 4. Make your changes
24
+ 5. (Optional) Run ``pre-commit run --all-files`` to run linters and formatters. This step is optional and will be executed
25
+ automatically by git before you make a commit, but you may want to run it manually in order to apply fixes
26
+ 6. Commit your changes to git
27
+ 7. Push the changes to your fork
28
+ 8. Open a `pull request <https://docs.github.com/en/pull-requests>`_. Give the pull request a descriptive title
29
+ indicating what it changes. If it has a corresponding open issue, the issue number should be included in the title as
30
+ well. For example a pull request that fixes issue ``bug: Increased stack size making it impossible to find needle #100``
31
+ could be titled ``fix(#100): Make needles easier to find by applying fire to haystack``
32
+
33
+ .. tip:: Pull requests and commits all need to follow the
34
+ `Conventional Commit format <https://www.conventionalcommits.org>`_
35
+
36
+ .. note:: To run the integration tests locally, you will need the `ODBC Driver for SQL Server <https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server?view=sql-server-ver16>`_, one option is using `unixODBC <https://www.unixodbc.org/>`_.
37
+
38
+ Guidelines for writing code
39
+ ----------------------------
40
+
41
+ - All code should be fully `typed <https://peps.python.org/pep-0484/>`_. This is enforced via
42
+ `mypy <https://mypy.readthedocs.io/en/stable/>`_.
43
+ - All code should be tested. This is enforced via `pytest <https://docs.pytest.org/en/stable/>`_.
44
+ - All code should be properly formatted. This is enforced via `black <https://black.readthedocs.io/en/stable/>`_ and `Ruff <https://beta.ruff.rs/docs/>`_.
45
+
46
+ Writing and running tests
47
+ +++++++++++++++++++++++++
48
+
49
+ .. todo:: Write this section
50
+
51
+ Project documentation
52
+ ---------------------
53
+
54
+ The documentation is located in the ``/docs`` directory and is `ReST <https://docutils.sourceforge.io/rst.html>`_ and
55
+ `Sphinx <https://www.sphinx-doc.org/en/master/>`_. If you're unfamiliar with any of those,
56
+ `ReStructuredText primer <https://www.sphinx-doc.org/en/master/lib/usage/restructuredtext/basics.html>`_ and
57
+ `Sphinx quickstart <https://www.sphinx-doc.org/en/master/lib/usage/quickstart.html>`_ are recommended reads.
58
+
59
+ Running the docs locally
60
+ ++++++++++++++++++++++++
61
+
62
+ To run or build the docs locally, you need to first install the required dependencies:
63
+
64
+ ``pdm install -G:docs``
65
+
66
+ Then you can serve the documentation with ``make docs-serve``, or build them with ``make docs``.
67
+
68
+ Creating a new release
69
+ ----------------------
70
+
71
+ 1. Increment the version in `pyproject.toml <https://github.com/litestar-org/pytest-databases/blob/main/pyproject.toml>`_.
72
+ .. note:: The version should follow `semantic versioning <https://semver.org/>`_ and `PEP 440 <https://www.python.org/dev/peps/pep-0440/>`_.
73
+ 2. `Draft a new release <https://github.com/litestar-org/pytest-databases/releases/new>`_ on GitHub
74
+
75
+ * Use ``vMAJOR.MINOR.PATCH`` (e.g. ``v1.2.3``) as both the tag and release title
76
+ * Fill in the release description. You can use the "Generate release notes" function to get a draft for this
77
+ 3. Commit your changes and push to ``main``
78
+ 4. Publish the release
79
+ 5. Go to `Actions <https://github.com/litestar-org/pytest-databases/actions>`_ and approve the release workflow
80
+ 6. Check that the workflow runs successfully
@@ -0,0 +1,116 @@
1
+ .DEFAULT_GOAL:=help
2
+ .ONESHELL:
3
+ ENV_PREFIX =.venv/bin/
4
+ VENV_EXISTS = $(shell python3 -c "if __import__('pathlib').Path('.venv/bin/activate').exists(): print('yes')")
5
+ BUILD_DIR =dist
6
+ SRC_DIR =src
7
+ BASE_DIR =$(shell pwd)
8
+
9
+ .EXPORT_ALL_VARIABLES:
10
+
11
+ ifndef VERBOSE
12
+ .SILENT:
13
+ endif
14
+
15
+
16
+ help: ## Display this help
17
+ @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
18
+
19
+
20
+ # =============================================================================
21
+ # Developer Utils
22
+ # =============================================================================
23
+ install-pipx: ## Install pipx
24
+ @python3 -m pip install --upgrade --user pipx
25
+
26
+ install-hatch: ## Install Hatch, UV, and Ruff
27
+ @pipx install hatch --force
28
+ @pipx inject hatch ruff uv hatch-pip-compile hatch-vcs hatch-mypyc mypy --include-deps --include-apps --force
29
+
30
+ configure-hatch: ## Configure Hatch defaults
31
+ @hatch config set dirs.env.virtual .direnv
32
+ @hatch config set dirs.env.pip-compile .direnv
33
+
34
+ upgrade-hatch: ## Update Hatch, UV, and Ruff
35
+ @pipx upgrade hatch --include-injected
36
+
37
+ install: ## Install the project and all dependencies
38
+ @if [ "$(VENV_EXISTS)" ]; then echo "=> Removing existing virtual environment"; $(MAKE) destroy-venv; fi
39
+ @$(MAKE) clean
40
+ @if ! pipx --version > /dev/null; then echo '=> Installing `pipx`'; $(MAKE) install-pipx ; fi
41
+ @if ! hatch --version > /dev/null; then echo '=> Installing `hatch` with `pipx`'; $(MAKE) install-hatch ; fi
42
+ @if ! hatch-pip-compile --version > /dev/null; then echo '=> Updating `hatch` and installing plugins'; $(MAKE) upgrade-hatch ; fi
43
+ @echo "=> Creating Python environments..."
44
+ @$(MAKE) configure-hatch
45
+ @hatch env create local
46
+ @echo "=> Install complete! Note: If you want to re-install re-run 'make install'"
47
+
48
+
49
+ .PHONY: upgrade
50
+ upgrade: ## Upgrade all dependencies to the latest stable versions
51
+ @echo "=> Updating all dependencies"
52
+ @hatch-pip-compile --upgrade --all
53
+ @echo "=> Python Dependencies Updated"
54
+ @hatch run lint:pre-commit autoupdate
55
+ @echo "=> Updated Pre-commit"
56
+
57
+
58
+ .PHONY: clean
59
+ clean: ## remove all build, testing, and static documentation files
60
+ @echo "=> Cleaning working directory"
61
+ @rm -rf .pytest_cache .ruff_cache .hypothesis build/ dist/ .eggs/ .coverage coverage.xml coverage.json htmlcov/ .mypy_cache
62
+ @find . -name '*.egg-info' -exec rm -rf {} +
63
+ @find . -name '*.egg' -exec rm -f {} +
64
+ @find . -name '*.pyc' -exec rm -f {} +
65
+ @find . -name '*.pyo' -exec rm -f {} +
66
+ @find . -name '*~' -exec rm -f {} +
67
+ @find . -name '__pycache__' -exec rm -rf {} +
68
+ @find . -name '.pytest_cache' -exec rm -rf {} +
69
+ @find . -name '.ipynb_checkpoints' -exec rm -rf {} +
70
+ @echo "=> Source cleaned successfully"
71
+
72
+ deep-clean: clean destroy-venv ## Clean everything up
73
+ @hatch python remove all
74
+ @echo "=> Hatch environments pruned and python installations trimmed"
75
+ @uv cache clean
76
+ @echo "=> UV Cache cleaned successfully"
77
+
78
+ destroy-venv: ## Destroy the virtual environment
79
+ @hatch env prune
80
+ @hatch env remove lint
81
+ @rm -Rf .venv
82
+ @rm -Rf .direnv
83
+
84
+ .PHONY: build
85
+ build: clean ## Build and package the collectors
86
+ @echo "=> Building package..."
87
+ @hatch build
88
+ @echo "=> Package build complete..."
89
+
90
+
91
+ ###############
92
+ # docs #
93
+ ###############
94
+ .PHONY: serve-docs
95
+ serve-docs: ## Serve HTML documentation
96
+ @hatch run docs:serve
97
+
98
+ .PHONY: docs
99
+ docs: ## generate HTML documentation and serve it to the browser
100
+ @hatch run docs:build
101
+
102
+
103
+ # =============================================================================
104
+ # Tests, Linting, Coverage
105
+ # =============================================================================
106
+ .PHONY: lint
107
+ lint: ## Runs pre-commit hooks; includes ruff linting, codespell, black
108
+ @echo "=> Running pre-commit process"
109
+ @hatch run lint:fix
110
+ @echo "=> Pre-commit complete"
111
+
112
+ .PHONY: test
113
+ test: ## Run the tests
114
+ @echo "=> Running test cases"
115
+ @hatch run test:cov
116
+ @echo "=> Tests complete"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pytest-databases
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Reusable database fixtures for any and all databases.
5
5
  Project-URL: Documentation, https://github.com/litestar-org/pytest-databases#readme
6
6
  Project-URL: Issues, https://github.com/litestar-org/pytest-databases/issues
@@ -22,6 +22,10 @@ Requires-Python: >=3.8
22
22
  Requires-Dist: pytest
23
23
  Provides-Extra: cockroachdb
24
24
  Requires-Dist: psycopg; extra == 'cockroachdb'
25
+ Provides-Extra: dragonfly
26
+ Requires-Dist: redis; extra == 'dragonfly'
27
+ Provides-Extra: keydb
28
+ Requires-Dist: redis; extra == 'keydb'
25
29
  Provides-Extra: mssql
26
30
  Requires-Dist: aioodbc; extra == 'mssql'
27
31
  Provides-Extra: mysql
@@ -12,7 +12,7 @@ license = "MIT"
12
12
  name = "pytest-databases"
13
13
  readme = "README.md"
14
14
  requires-python = ">=3.8"
15
- version = "0.2.0"
15
+ version = "0.2.2"
16
16
  #
17
17
  authors = [{ name = "Cody Fincher", email = "cody.fincher@gmail.com" }]
18
18
  keywords = [
@@ -50,6 +50,8 @@ Source = "https://github.com/litestar-org/pytest-databases"
50
50
 
51
51
  [project.optional-dependencies]
52
52
  cockroachdb = ["psycopg"]
53
+ dragonfly = ["redis"]
54
+ keydb = ["redis"]
53
55
  mssql = ["aioodbc"]
54
56
  mysql = ["asyncmy>=0.2.9"]
55
57
  oracle = ["oracledb"]
@@ -61,85 +63,8 @@ sqlite = ["aiosqlite"]
61
63
  ######################
62
64
  # Build & Versioning #
63
65
  ######################
64
- [tool.hatch.metadata]
65
- # direct dependency references, e.g `pip @ git+https://github.com/pypa/pip.git@master`
66
- allow-direct-references = true
67
-
68
- [tool.hatch.build]
69
- dev-mode-dirs = ["src/"]
70
- include = ["src/pytest_databases/**/*.yml"]
71
- packages = ["src/pytest_databases"]
72
- sources = ["src"]
73
-
74
66
  [tool.hatch.build.targets.sdist]
75
- exclude = [".github", "./docs"]
76
- support-legacy = true # Create setup.py
77
-
78
- [tool.hatch.build.targets.wheel]
79
- packages = ["src/pytest_databases"]
80
-
81
- [tool.git-cliff.changelog]
82
- body = """
83
- {% if version %}\
84
- `Release [v{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} <https://github.com/litestar-org/pytest-databases/releases/tag/v{{ version | trim_start_matches(pat="v") }}>`_
85
- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
86
- * `See All commits in v{{ version | trim_start_matches(pat="v") }} <https://github.com/litestar-org/pytest-databases/commits/v{{ version | trim_start_matches(pat="v") }}>`_
87
- {% else %}\
88
- [unreleased]
89
- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
90
- {% endif %}\
91
- {% if previous %}\
92
- {% if previous.commit_id %}
93
- `{{ previous.commit_id | truncate(length=7, end="") }} <https://github.com/litestar-org/pytest-databases/commit/{{ previous.commit_id }}>`_ ... \
94
- `{{ commit_id | truncate(length=7, end="") }} <https://github.com/litestar-org/pytest-databases/commit/{{ commit_id }}>`_ \
95
- | `See diff for {{ version | trim_start_matches(pat="v") }} <https://github.com/litestar-org/pytest-databases/compare/{{ previous.commit_id }}...{{ commit_id }}>`_
96
- {% endif %}\
97
- {% endif %}\
98
- {% for group, commits in commits | group_by(attribute="group") %}
99
- {{ group | upper_first }}
100
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
101
- {% for commit in commits %}
102
- * (`{{ commit.id | truncate(length=7, end="") }} <https://github.com/litestar-org/pytest-databases/commit/{{ commit.id }}>`_) {% if commit.breaking %}[**breaking**] {% endif %} - {{ commit.message | upper_first }} ({{ commit.author.name }})\
103
- {% for footer in commit.footers -%}
104
- , {{ footer.token }}{{ footer.separator }}{{ footer.value }}\
105
- {% endfor %}\
106
- {% endfor %}
107
- {% endfor %}\n
108
- """
109
- footer = """
110
- Pytest Databases Changelog
111
- """
112
- header = """
113
- =========
114
- Changelog
115
- =========\n
116
- All commits to this project will be documented in this file.\n
117
- """
118
- trim = true
119
-
120
- [tool.git-cliff.git]
121
- commit_parsers = [
122
- { message = "^feat", group = "Features" },
123
- { message = "^fix", group = "Bug Fixes" },
124
- { message = "^doc", group = "Documentation" },
125
- { message = "^perf", group = "Performance" },
126
- { message = "^refactor", group = "Refactor" },
127
- { message = "^style", group = "Styling" },
128
- { message = "^test", group = "Testing" },
129
- { message = "^chore\\(release\\): prepare for", skip = true },
130
- { message = "^chore", group = "Miscellaneous Tasks" },
131
- { body = ".*security", group = "Security" },
132
- ]
133
- conventional_commits = true
134
- filter_commits = false
135
- filter_unconventional = true
136
- ignore_tags = ""
137
- protect_breaking_commits = false
138
- skip_tags = "v0.1.0-beta.1"
139
- sort_commits = "oldest"
140
- split_commits = false
141
- tag_pattern = "v[0-9]*"
142
- topo_order = false
67
+ exclude = ["/.github", "/docs"]
143
68
 
144
69
 
145
70
  #####################
@@ -345,6 +270,70 @@ skip = 'pdm.lock, package-lock.json'
345
270
  exclude = ["scripts", "docs"]
346
271
  include = ["src/pytest_databases", "tests"]
347
272
 
273
+
274
+ [tool.git-cliff.changelog]
275
+ body = """
276
+ {% if version %}\
277
+ `Release [v{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} <https://github.com/litestar-org/pytest-databases/releases/tag/v{{ version | trim_start_matches(pat="v") }}>`_
278
+ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
279
+ * `See All commits in v{{ version | trim_start_matches(pat="v") }} <https://github.com/litestar-org/pytest-databases/commits/v{{ version | trim_start_matches(pat="v") }}>`_
280
+ {% else %}\
281
+ [unreleased]
282
+ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
283
+ {% endif %}\
284
+ {% if previous %}\
285
+ {% if previous.commit_id %}
286
+ `{{ previous.commit_id | truncate(length=7, end="") }} <https://github.com/litestar-org/pytest-databases/commit/{{ previous.commit_id }}>`_ ... \
287
+ `{{ commit_id | truncate(length=7, end="") }} <https://github.com/litestar-org/pytest-databases/commit/{{ commit_id }}>`_ \
288
+ | `See diff for {{ version | trim_start_matches(pat="v") }} <https://github.com/litestar-org/pytest-databases/compare/{{ previous.commit_id }}...{{ commit_id }}>`_
289
+ {% endif %}\
290
+ {% endif %}\
291
+ {% for group, commits in commits | group_by(attribute="group") %}
292
+ {{ group | upper_first }}
293
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
294
+ {% for commit in commits %}
295
+ * (`{{ commit.id | truncate(length=7, end="") }} <https://github.com/litestar-org/pytest-databases/commit/{{ commit.id }}>`_) {% if commit.breaking %}[**breaking**] {% endif %} - {{ commit.message | upper_first }} ({{ commit.author.name }})\
296
+ {% for footer in commit.footers -%}
297
+ , {{ footer.token }}{{ footer.separator }}{{ footer.value }}\
298
+ {% endfor %}\
299
+ {% endfor %}
300
+ {% endfor %}\n
301
+ """
302
+ footer = """
303
+ Pytest Databases Changelog
304
+ """
305
+ header = """
306
+ =========
307
+ Changelog
308
+ =========\n
309
+ All commits to this project will be documented in this file.\n
310
+ """
311
+ trim = true
312
+
313
+ [tool.git-cliff.git]
314
+ commit_parsers = [
315
+ { message = "^feat", group = "Features" },
316
+ { message = "^fix", group = "Bug Fixes" },
317
+ { message = "^doc", group = "Documentation" },
318
+ { message = "^perf", group = "Performance" },
319
+ { message = "^refactor", group = "Refactor" },
320
+ { message = "^style", group = "Styling" },
321
+ { message = "^test", group = "Testing" },
322
+ { message = "^chore\\(release\\): prepare for", skip = true },
323
+ { message = "^chore", group = "Miscellaneous Tasks" },
324
+ { body = ".*security", group = "Security" },
325
+ ]
326
+ conventional_commits = true
327
+ filter_commits = false
328
+ filter_unconventional = true
329
+ ignore_tags = ""
330
+ protect_breaking_commits = false
331
+ skip_tags = "v0.1.0-beta.1"
332
+ sort_commits = "oldest"
333
+ split_commits = false
334
+ tag_pattern = "v[0-9]*"
335
+ topo_order = false
336
+
348
337
  [tool.mypy]
349
338
  disallow_untyped_defs = false
350
339
  files = ["src/pytest_databases", "tests"]