Pytest plugin to allow capturing SQLAlchemy queries.
Project description
pytest-capsqlalchemy
Pytest plugin to allow capturing SQLAlchemy queries.
- Github repository: https://github.com/softwareone-platform/pytest-capsqlalchemy/
- Documentation https://softwareone-platform.github.io/pytest-capsqlalchemy/
Getting Started
1. Clone the repository
First, clone the repository from GitHub:
git clone https://github.com/softwareone-platform/pytest-capsqlalchemy
2. Set Up Your Development Environment
Then, install the environment and the pre-commit hooks with
make install
This will also generate your uv.lock file
3. Run the pre-commit hooks
Initially, the CI/CD pipeline might be failing due to formatting issues. To resolve those run:
uv run pre-commit run -a
4. Run the tests
The tests require a Postgres database to be running. If you prefer to use a local database you need to edit the .env file with
the connection options for it. Alternatively, you can use the provided docker-compose.yaml to run it within docker -- all you
need to do is run:
docker compose up test_postgres -d
And after that to run the tests:
make test
5. Commit the changes
Lastly, commit the changes made by the two steps above to your repository.
git add .
git commit -m 'Fix formatting issues'
git push origin main
You are now ready to start development on your project! The CI/CD pipeline will be triggered when you open a pull request, merge to main, or when you create a new release.
To finalize the set-up for publishing to PyPI, see here. For activating the automatic documentation with MkDocs, see here.
Releasing a new version
- Create an API Token on PyPI.
- Add the API Token to your projects secrets with the name
PYPI_TOKENby visiting this page. - Create a new release on Github.
- Create a new tag in the form
*.*.*.
For more details, see here.
Repository initiated with fpgmaas/cookiecutter-uv.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest_capsqlalchemy-0.1.3.tar.gz.
File metadata
- Download URL: pytest_capsqlalchemy-0.1.3.tar.gz
- Upload date:
- Size: 80.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f5d7fd3258a235e52b84384856de6fed6c9f2a11156b7047171b6911684d55d
|
|
| MD5 |
3dbe526a389537c3128a4f8cf4e0d7a1
|
|
| BLAKE2b-256 |
c906efe819e3e65a118f8e77c01058b0df7a3cd35180b0deaed584222f593bde
|
Provenance
The following attestation bundles were made for pytest_capsqlalchemy-0.1.3.tar.gz:
Publisher:
on-release-main.yml on softwareone-platform/pytest-capsqlalchemy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_capsqlalchemy-0.1.3.tar.gz -
Subject digest:
8f5d7fd3258a235e52b84384856de6fed6c9f2a11156b7047171b6911684d55d - Sigstore transparency entry: 179808668
- Sigstore integration time:
-
Permalink:
softwareone-platform/pytest-capsqlalchemy@9f86a1e99ca2927fabda0159d7ad0d540fc72d2d -
Branch / Tag:
refs/tags/0.1.3 - Owner: https://github.com/softwareone-platform
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
on-release-main.yml@9f86a1e99ca2927fabda0159d7ad0d540fc72d2d -
Trigger Event:
release
-
Statement type:
File details
Details for the file pytest_capsqlalchemy-0.1.3-py3-none-any.whl.
File metadata
- Download URL: pytest_capsqlalchemy-0.1.3-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e388d85371955a00681e1035c6a5feddec9a7b2136bb64971d1d9ea4b871725
|
|
| MD5 |
a4b97f6e687dae09108bee2b11a96c1a
|
|
| BLAKE2b-256 |
d96955447ad05d1d58401c1cc5e0276ae4784d143551df298c74f0a202c8739e
|
Provenance
The following attestation bundles were made for pytest_capsqlalchemy-0.1.3-py3-none-any.whl:
Publisher:
on-release-main.yml on softwareone-platform/pytest-capsqlalchemy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_capsqlalchemy-0.1.3-py3-none-any.whl -
Subject digest:
5e388d85371955a00681e1035c6a5feddec9a7b2136bb64971d1d9ea4b871725 - Sigstore transparency entry: 179808671
- Sigstore integration time:
-
Permalink:
softwareone-platform/pytest-capsqlalchemy@9f86a1e99ca2927fabda0159d7ad0d540fc72d2d -
Branch / Tag:
refs/tags/0.1.3 - Owner: https://github.com/softwareone-platform
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
on-release-main.yml@9f86a1e99ca2927fabda0159d7ad0d540fc72d2d -
Trigger Event:
release
-
Statement type: