Skip to main content

A Pre-commit hook for 'one sentence per line' documentation practices.

Project description

onesentence

Build Status Coverage Status Ruff uv Software DOI badge

A Pre-commit hook for checking 'one sentence per line' documentation practices.

One sentence per line is a practice where developers use only one line per sentence. This can make it easier to review or provide comments on in version control systems like git. That said, it can sometimes be difficult to remember or "debug" this style preference. We provide this linting tool to assist with finding and fixing areas of content where the style preference is one sentence per line.

Usage

The onesentence tool provides a command-line interface for checking and fixing files to ensure they follow the "one sentence per line" rule.

Commands

  onesentence check <file_path>

This command checks if the specified file adheres to the "one sentence per line" rule. It will return a non-zero exit code if any violations are found.

  onesentence fix <file_path> [<dest_path>]

This command corrects the specified file by splitting lines with multiple sentences into separate lines. If a dest_path is provided, the corrected file will be written to that path; otherwise, the original file will be overwritten.

Pre-commit

Install this pre-commit hook into your project with a block like the following:

repos:
  - repo: https://github.com/CU-DBMI/onesentence
    rev: v0.0.1
    hooks:
        # run checks
        - id: check
        # run checks and fixes where possible
        - id: fix

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

onesentence-0.0.3.tar.gz (35.7 kB view details)

Uploaded Source

Built Distribution

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

onesentence-0.0.3-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file onesentence-0.0.3.tar.gz.

File metadata

  • Download URL: onesentence-0.0.3.tar.gz
  • Upload date:
  • Size: 35.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for onesentence-0.0.3.tar.gz
Algorithm Hash digest
SHA256 22ab7d8531b7d1c299afe7d3ec46a4e900ab9ea90bef7ccc77726a4bfc6a57f2
MD5 7180fb154636c7d49904e86e38f41419
BLAKE2b-256 7e03d720697bf6e03df19ceeadae13dd8a219fb8a9f69ccb2053b3e67bc32839

See more details on using hashes here.

Provenance

The following attestation bundles were made for onesentence-0.0.3.tar.gz:

Publisher: publish-pypi.yml on d33bs/onesentence

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

File details

Details for the file onesentence-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: onesentence-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for onesentence-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 38fb8129a8ba1c178d3edbf01c882490a45850289b7eb1175bfca446095d38e3
MD5 72d9d3d3ddfed76a935f5eb5e9900064
BLAKE2b-256 798e7b86e499d965a20d454a419f58d537b8d2b9bb2ce3caec26e5f071bc3f5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for onesentence-0.0.3-py3-none-any.whl:

Publisher: publish-pypi.yml on d33bs/onesentence

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