Documetatio from annotations
Project description
Douki
Documetatio from annotations
-
Software License: BSD 3 Clause
-
Documentation: https://osl-incubator.github.io/douki
Douki YAML Format
def add(a: int, b: int = 0) -> int:
"""
title: Add two integers
parameters:
a:
type: int
description: First value.
b:
type: int
description: Second value.
default: 0
returns:
- type: int
description: Sum of a and b.
"""
return a + b
Fields like visibility (default: public), mutability (default: mutable),
and scope (default: static for functions, instance for methods) are
omitted when they match their Python defaults.
CLI — douki sync / douki check
Synchronize Douki YAML docstrings with Python function signatures. Designed to run standalone or as a pre-commit hook.
# Show what would change (exit 1 if diffs exist)
douki check src/
# Apply changes in-place
douki sync src/
# Specific files
douki check path/to/file.py
Without arguments, both commands default to the current directory.
Migrating from NumPy docstrings
Convert existing NumPy-style docstrings to Douki YAML:
# Preview what the migration would look like
douki check --migrate numpy src/
# Apply the migration
douki sync --migrate numpy src/
Pre-commit integration
# .pre-commit-config.yaml
repos:
- repo: https://github.com/osl-incubator/douki
rev: v0.6.0 # pin to a release tag
hooks:
- id: douki-check
name: douki check
entry: douki check
language: python
types: [python]
Credits
This package was created with scicookie project template.
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 douki-0.7.0.tar.gz.
File metadata
- Download URL: douki-0.7.0.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.1 CPython/3.13.12 Linux/6.14.0-1017-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e52e957202bd664632308c423d2b8723eaff0260bd1bd5dfbbd89e5558275184
|
|
| MD5 |
d71d27b96d7a4da2b988ee39410cbe85
|
|
| BLAKE2b-256 |
1b7fcfbcbbd9566b343307eadd4b4f6d065cabc18b1a6ff710faec34de554c18
|
File details
Details for the file douki-0.7.0-py3-none-any.whl.
File metadata
- Download URL: douki-0.7.0-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.1 CPython/3.13.12 Linux/6.14.0-1017-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96b0ee6a1835a170ed90d53e2172b8ccb427d379aa506649335e6ab67b37b123
|
|
| MD5 |
7e96e80057c5ec324e1226d1c24bca4b
|
|
| BLAKE2b-256 |
1a8572a767983aaae60316aa7255a18e47afacd1ff5de01797115c378809e2d7
|