A Sphinx directive which enables testifying documentation by explicitly referencing test results
Project description
Sphinx-testify
sphinx-testify is an extension to the Sphinx documentation generator, that enables building testified documentation and, ultimately living documentation.
Testified documentation in a nutshell
Testified documentation means that the documentation source references test results, and these references are verified during the build process. As a result, we can keep every paragraph even every sentence of the documentation aligned with the code, as long as there is a test that "testifies" the described behaviour.
A simple example
Imagine you're working on a system access module. Even before writing any tests or code, you can briefly document the expected behavior and reference the (to-be-created) tests. Proceed with a TDD cycle, and once all the tests and implementation are ready, you’ll have testified and living documentation.
Here's how it looks like in a reStructuredText document:
System access
=============
Only a user with valid credentials: a username and a password can access
the system. If credentials are wrong, the system returns "Authentication failed"
error message.
.. testify::
test_a_user_can_access_system_with_username_and_password
test_system_returns_authentication_failed_error_when_username_is_not_found
test_system_returns_authentication_failed_error_when_password_is_wrong
Installation
pip install sphinx-testify
Links
Code: https://github.com/BasicWolf/sphinx-testify
Docs: https://sphinx-testify.readthedocs.io/en/latest/
License
GPLv3
Project details
Release history Release notifications | RSS feed
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 sphinx_testify-0.1.1.tar.gz.
File metadata
- Download URL: sphinx_testify-0.1.1.tar.gz
- Upload date:
- Size: 61.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b8bbdce54883ff262b8beee2315042938dfa8fa1fbe08c168af347232b1be7c
|
|
| MD5 |
45b17d5314df9e06d0f4b2519a40330c
|
|
| BLAKE2b-256 |
bc525a882581a912389d2149061ee6c98636b396893efd74bea51d15d554052b
|
Provenance
The following attestation bundles were made for sphinx_testify-0.1.1.tar.gz:
Publisher:
ci.yml on BasicWolf/sphinx-testify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_testify-0.1.1.tar.gz -
Subject digest:
6b8bbdce54883ff262b8beee2315042938dfa8fa1fbe08c168af347232b1be7c - Sigstore transparency entry: 157635619
- Sigstore integration time:
-
Permalink:
BasicWolf/sphinx-testify@f865f12bc3aa4874c29450ff28c709a0fc788f48 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/BasicWolf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@f865f12bc3aa4874c29450ff28c709a0fc788f48 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sphinx_testify-0.1.1-py3-none-any.whl.
File metadata
- Download URL: sphinx_testify-0.1.1-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bb4a299a463d39f46185df98e0be157647c40cc587694c513eebae8524d9ac8
|
|
| MD5 |
352ca555e4ff361689847f74e80e8db7
|
|
| BLAKE2b-256 |
805eb2e78d3c5ae43277c53f0277c6f769751a6b8fb6498ed28c29182fb1a2c0
|
Provenance
The following attestation bundles were made for sphinx_testify-0.1.1-py3-none-any.whl:
Publisher:
ci.yml on BasicWolf/sphinx-testify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_testify-0.1.1-py3-none-any.whl -
Subject digest:
7bb4a299a463d39f46185df98e0be157647c40cc587694c513eebae8524d9ac8 - Sigstore transparency entry: 157635620
- Sigstore integration time:
-
Permalink:
BasicWolf/sphinx-testify@f865f12bc3aa4874c29450ff28c709a0fc788f48 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/BasicWolf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@f865f12bc3aa4874c29450ff28c709a0fc788f48 -
Trigger Event:
push
-
Statement type: