Skip to main content

Pytest plugin to allow capturing SQLAlchemy queries.

Project description

pytest-capsqlalchemy

Release Build status codecov Commit activity License

Pytest plugin to allow capturing SQLAlchemy queries.

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_TOKEN by 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

pytest_capsqlalchemy-0.1.0.tar.gz (80.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_capsqlalchemy-0.1.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file pytest_capsqlalchemy-0.1.0.tar.gz.

File metadata

  • Download URL: pytest_capsqlalchemy-0.1.0.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

Hashes for pytest_capsqlalchemy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2175f3489cc7fc6f1ac7a23a1aeaf4bd23b0b43e973216852ae04a84deccc74a
MD5 8357826648cb878cc35e350f27c6b8d4
BLAKE2b-256 c593b621b21b34ef089679e0ac210568f176176a3617e5fd6244045414693c2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_capsqlalchemy-0.1.0.tar.gz:

Publisher: on-release-main.yml on softwareone-platform/pytest-capsqlalchemy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pytest_capsqlalchemy-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_capsqlalchemy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e1d5653d19b42c6bf945222fd19dbc55fe00bc63c250cb11fffea16e31aafd66
MD5 4edda04b1f8e445584c3ed1c036b79aa
BLAKE2b-256 b1bdad4c05214b19a6f976841c84feecfbe319b6934d3912e7978f2e86d9b2c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_capsqlalchemy-0.1.0-py3-none-any.whl:

Publisher: on-release-main.yml on softwareone-platform/pytest-capsqlalchemy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page