Skip to content

Commit

Permalink
Documentation: Prepare migration to "crate" organization
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Oct 7, 2024
1 parent b8a6f5b commit 16f5901
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 14 deletions.
54 changes: 46 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,65 @@
Pytest CrateDB
==============

.. image:: https://github.com/crate/pytest-cratedb/actions/workflows/tests.yml/badge.svg
:target: https://github.com/crate/pytest-cratedb/actions/workflows/tests.yml
:alt: Build status

.. image:: https://codecov.io/gh/crate/pytest-cratedb/branch/master/graph/badge.svg
:target: https://app.codecov.io/gh/crate/pytest-cratedb
:alt: Coverage

.. image:: https://img.shields.io/pypi/v/pytest-cratedb.svg
:target: https://pypi.org/project/pytest-cratedb/
:alt: PyPI Version

.. image:: https://img.shields.io/pypi/pyversions/pytest-cratedb.svg
:target: https://pypi.org/project/pytest-cratedb/
:alt: Python Version

.. image:: https://static.pepy.tech/badge/pytest-cratedb/month
:target: https://pepy.tech/project/pytest-cratedb
:alt: PyPI Downloads

.. image:: https://img.shields.io/pypi/status/pytest-cratedb.svg
:target: https://pypi.org/project/pytest-cratedb/
:alt: Status

.. image:: https://img.shields.io/pypi/l/pytest-cratedb.svg
:target: https://pypi.org/project/pytest-cratedb/
:alt: License

|
``pytest-cratedb`` is a plugin for pytest_ for writing integration tests that
interact with CrateDB_.

The CrateDB version can be specified using the ``--crate-version`` option when
running ``pytest``. By default, the latest stable version of CrateDB is used.

Usage
=====

``pytest-cratedb`` provides a ``crate`` session fixture which downloads, starts
and stops a CrateDB node.
``pytest-cratedb`` provides a pytest ``crate`` session fixture which downloads,
starts and stops a CrateDB node.

.. code-block:: python
>>> def test_database_access(crate):
... # perform database access
... ...
The CrateDB version can be specified using the ``--crate-version`` option when
running ``pytest``. By default, the latest stable version of CrateDB is used.

See `tests/test_layer.py <https://github.com/crate-workbench/pytest-cratedb/blob/main/tests/test_layer.py>`_
Examples
========
See `tests/test_layer.py <https://github.com/crate/pytest-cratedb/blob/main/tests/test_layer.py>`_
for further examples.

Migration Notes
===============
This package, `pytest-cratedb`_ is a drop-in replacement for its predecessor
package `pytest-crate`_.


.. _pytest: https://docs.pytest.org
.. _CrateDB: https://cratedb.com
.. _pytest: https://docs.pytest.org
.. _pytest-crate: https://pypi.org/project/pytest-crate/
.. _pytest-cratedb: https://pypi.org/project/pytest-cratedb/
10 changes: 4 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ keywords = [
license = { text = "Apache License 2.0" }
authors = [
{ name = "Christian Haudum", email = "[email protected]" },
{ name = "Andreas Motl", email = "andreas.motl@panodata.org" },
{ name = "Andreas Motl", email = "andreas.motl@crate.io" },
]
requires-python = ">=3.6"
classifiers = [
Expand Down Expand Up @@ -87,11 +87,9 @@ optional-dependencies.test = [
"pytest-cov<6",
"pytest-mock<4",
]
urls.Changelog = "https://github.com/crate-workbench/pytest-cratedb/blob/main/CHANGES.rst"
urls.Documentation = "https://github.com/crate-workbench/pytest-cratedb"
urls.Homepage = "https://github.com/crate-workbench/pytest-cratedb"
urls.Issues = "https://github.com/crate-workbench/pytest-cratedb/issues"
urls.Repository = "https://github.com/crate-workbench/pytest-cratedb"
urls.Changelog = "https://github.com/crate/pytest-cratedb/blob/main/CHANGES.rst"
urls.Issues = "https://github.com/crate/pytest-cratedb/issues"
urls.Repository = "https://github.com/crate/pytest-cratedb"

entry-points.pytest11.crate = "pytest_cratedb.plugin:crate"

Expand Down

0 comments on commit 16f5901

Please sign in to comment.