richforms 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- richforms-0.3.0/.github/workflows/ci.yml +32 -0
- richforms-0.3.0/.github/workflows/docs.yml +33 -0
- richforms-0.3.0/.github/workflows/publish.yml +71 -0
- richforms-0.3.0/.github/workflows/release.yml +37 -0
- richforms-0.3.0/.gitignore +207 -0
- richforms-0.3.0/.pre-commit-config.yaml +18 -0
- richforms-0.3.0/.python-version +1 -0
- richforms-0.3.0/.release-please-config.json +18 -0
- richforms-0.3.0/.release-please-manifest.json +3 -0
- richforms-0.3.0/CHANGELOG.md +55 -0
- richforms-0.3.0/LICENSE +21 -0
- richforms-0.3.0/PKG-INFO +72 -0
- richforms-0.3.0/README.md +59 -0
- richforms-0.3.0/docs/cli.md +79 -0
- richforms-0.3.0/docs/contributing.md +67 -0
- richforms-0.3.0/docs/getting-started.md +104 -0
- richforms-0.3.0/docs/index.md +48 -0
- richforms-0.3.0/docs/integrations.md +79 -0
- richforms-0.3.0/docs/python-api.md +88 -0
- richforms-0.3.0/pyproject.toml +43 -0
- richforms-0.3.0/src/richforms/__init__.py +15 -0
- richforms-0.3.0/src/richforms/api.py +273 -0
- richforms-0.3.0/src/richforms/cli.py +91 -0
- richforms-0.3.0/src/richforms/config.py +52 -0
- richforms-0.3.0/src/richforms/drafts.py +40 -0
- richforms-0.3.0/src/richforms/example/__init__.py +3 -0
- richforms-0.3.0/src/richforms/example/model.py +58 -0
- richforms-0.3.0/src/richforms/exceptions.py +6 -0
- richforms-0.3.0/src/richforms/integrations/__init__.py +4 -0
- richforms-0.3.0/src/richforms/integrations/click.py +24 -0
- richforms-0.3.0/src/richforms/integrations/typer.py +20 -0
- richforms-0.3.0/src/richforms/introspection.py +116 -0
- richforms-0.3.0/src/richforms/io.py +18 -0
- richforms-0.3.0/src/richforms/prompts.py +188 -0
- richforms-0.3.0/src/richforms/render.py +174 -0
- richforms-0.3.0/src/richforms/schema.py +33 -0
- richforms-0.3.0/src/richforms/serializers.py +34 -0
- richforms-0.3.0/src/richforms/state.py +42 -0
- richforms-0.3.0/src/richforms/validate.py +32 -0
- richforms-0.3.0/tests/__init__.py +0 -0
- richforms-0.3.0/tests/cli_models.py +6 -0
- richforms-0.3.0/tests/golden/field_card.txt +6 -0
- richforms-0.3.0/tests/golden/path_radar.txt +8 -0
- richforms-0.3.0/tests/golden/validation_ledger.txt +7 -0
- richforms-0.3.0/tests/helpers.py +32 -0
- richforms-0.3.0/tests/models.py +76 -0
- richforms-0.3.0/tests/test_api_flow.py +166 -0
- richforms-0.3.0/tests/test_cli.py +99 -0
- richforms-0.3.0/tests/test_example_models.py +23 -0
- richforms-0.3.0/tests/test_integrations.py +39 -0
- richforms-0.3.0/tests/test_introspection.py +33 -0
- richforms-0.3.0/tests/test_render.py +96 -0
- richforms-0.3.0/tests/test_render_golden.py +55 -0
- richforms-0.3.0/tests/test_serializers.py +43 -0
- richforms-0.3.0/tests/test_validate.py +22 -0
- richforms-0.3.0/uv.lock +803 -0
- richforms-0.3.0/zensical.toml +352 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Continuous Integration
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
lint:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v5
|
|
13
|
+
- uses: astral-sh/setup-uv@v6
|
|
14
|
+
- run: uv sync --dev
|
|
15
|
+
- run: uv run ruff format --check .
|
|
16
|
+
- run: uv run ruff check .
|
|
17
|
+
|
|
18
|
+
typecheck:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v5
|
|
22
|
+
- uses: astral-sh/setup-uv@v6
|
|
23
|
+
- run: uv sync --dev
|
|
24
|
+
- run: uv run ty check --output-format github .
|
|
25
|
+
|
|
26
|
+
test:
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v5
|
|
30
|
+
- uses: astral-sh/setup-uv@v6
|
|
31
|
+
- run: uv sync --dev
|
|
32
|
+
- run: uv run pytest -q
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Docs Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pages: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: docs
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
deploy:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
environment:
|
|
21
|
+
name: github-pages
|
|
22
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v5
|
|
25
|
+
- uses: actions/configure-pages@v5
|
|
26
|
+
- uses: astral-sh/setup-uv@v6
|
|
27
|
+
- run: uv sync --dev
|
|
28
|
+
- run: uv run zensical build --clean
|
|
29
|
+
- uses: actions/upload-pages-artifact@v4
|
|
30
|
+
with:
|
|
31
|
+
path: site
|
|
32
|
+
- id: deployment
|
|
33
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: PyPI Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
repository_dispatch:
|
|
5
|
+
types: [pypi-release]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
pypi-release:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
concurrency:
|
|
14
|
+
group: pypi-${{ github.event.client_payload.tag_name }}
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
permissions:
|
|
17
|
+
id-token: write # Generate OIDC token for attestations
|
|
18
|
+
attestations: write # Attest the build provenance
|
|
19
|
+
environment:
|
|
20
|
+
name: pypi
|
|
21
|
+
url: https://pypi.org/p/richforms
|
|
22
|
+
steps:
|
|
23
|
+
- name: Harden Runner
|
|
24
|
+
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
|
|
25
|
+
with:
|
|
26
|
+
egress-policy: audit
|
|
27
|
+
-
|
|
28
|
+
name: Echo Build Dispatch
|
|
29
|
+
run: |
|
|
30
|
+
echo "PyPI Release Triggered"
|
|
31
|
+
echo "Event Payload: ${{ toJson(github.event.client_payload) }}"
|
|
32
|
+
-
|
|
33
|
+
name: Checkout Code
|
|
34
|
+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
|
|
35
|
+
with:
|
|
36
|
+
ref: ${{ github.event.client_payload.tag_name }}
|
|
37
|
+
-
|
|
38
|
+
name: Install uv
|
|
39
|
+
uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
|
|
40
|
+
with:
|
|
41
|
+
enable-cache: false
|
|
42
|
+
-
|
|
43
|
+
name: Set up Python
|
|
44
|
+
run: uv python install 3.13
|
|
45
|
+
-
|
|
46
|
+
name: Build release distributions
|
|
47
|
+
run: uv build
|
|
48
|
+
-
|
|
49
|
+
name: Publish release distributions to PyPI
|
|
50
|
+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
|
|
51
|
+
with:
|
|
52
|
+
attestations: true
|
|
53
|
+
packages-dir: dist/
|
|
54
|
+
verbose: true
|
|
55
|
+
print-hash: true
|
|
56
|
+
-
|
|
57
|
+
name: Attestations for PYPI Wheel
|
|
58
|
+
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2.4.0
|
|
59
|
+
with:
|
|
60
|
+
subject-path: |
|
|
61
|
+
dist/*.whl
|
|
62
|
+
subject-name: richforms-wheel
|
|
63
|
+
show-summary: true
|
|
64
|
+
-
|
|
65
|
+
name: Attestations for PYPI Source
|
|
66
|
+
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2.4.0
|
|
67
|
+
with:
|
|
68
|
+
subject-path: |
|
|
69
|
+
dist/*.tar.gz
|
|
70
|
+
subject-name: richforms-source
|
|
71
|
+
show-summary: true
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Release Automation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
issues: write
|
|
10
|
+
pull-requests: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
release-please:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
outputs:
|
|
16
|
+
release_created: ${{ steps.release.outputs.release_created }}
|
|
17
|
+
tag_name: ${{ steps.release.outputs.tag_name }}
|
|
18
|
+
steps:
|
|
19
|
+
- id: release
|
|
20
|
+
uses: googleapis/release-please-action@v4.4.0
|
|
21
|
+
with:
|
|
22
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
23
|
+
config-file: .release-please-config.json
|
|
24
|
+
manifest-file: .release-please-manifest.json
|
|
25
|
+
- name: Dispatch PYPI Release
|
|
26
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
27
|
+
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1
|
|
28
|
+
with:
|
|
29
|
+
repository: shinybrar/richforms
|
|
30
|
+
event-type: pypi-release
|
|
31
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
32
|
+
client-payload: |-
|
|
33
|
+
{
|
|
34
|
+
"releases_created": "${{ steps.release.outputs.releases_created }}",
|
|
35
|
+
"tag_name": "${{ steps.release.outputs.tag_name }}",
|
|
36
|
+
"sha": "${{ steps.release.outputs.sha }}"
|
|
37
|
+
}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
#poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
#pdm.lock
|
|
116
|
+
#pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
#pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# SageMath parsed files
|
|
135
|
+
*.sage.py
|
|
136
|
+
|
|
137
|
+
# Environments
|
|
138
|
+
.env
|
|
139
|
+
.envrc
|
|
140
|
+
.venv
|
|
141
|
+
env/
|
|
142
|
+
venv/
|
|
143
|
+
ENV/
|
|
144
|
+
env.bak/
|
|
145
|
+
venv.bak/
|
|
146
|
+
|
|
147
|
+
# Spyder project settings
|
|
148
|
+
.spyderproject
|
|
149
|
+
.spyproject
|
|
150
|
+
|
|
151
|
+
# Rope project settings
|
|
152
|
+
.ropeproject
|
|
153
|
+
|
|
154
|
+
# mkdocs documentation
|
|
155
|
+
/site
|
|
156
|
+
|
|
157
|
+
# mypy
|
|
158
|
+
.mypy_cache/
|
|
159
|
+
.dmypy.json
|
|
160
|
+
dmypy.json
|
|
161
|
+
|
|
162
|
+
# Pyre type checker
|
|
163
|
+
.pyre/
|
|
164
|
+
|
|
165
|
+
# pytype static type analyzer
|
|
166
|
+
.pytype/
|
|
167
|
+
|
|
168
|
+
# Cython debug symbols
|
|
169
|
+
cython_debug/
|
|
170
|
+
|
|
171
|
+
# PyCharm
|
|
172
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
173
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
174
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
175
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
176
|
+
#.idea/
|
|
177
|
+
|
|
178
|
+
# Abstra
|
|
179
|
+
# Abstra is an AI-powered process automation framework.
|
|
180
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
181
|
+
# Learn more at https://abstra.io/docs
|
|
182
|
+
.abstra/
|
|
183
|
+
|
|
184
|
+
# Visual Studio Code
|
|
185
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
186
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
188
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
189
|
+
# .vscode/
|
|
190
|
+
|
|
191
|
+
# Ruff stuff:
|
|
192
|
+
.ruff_cache/
|
|
193
|
+
|
|
194
|
+
# PyPI configuration file
|
|
195
|
+
.pypirc
|
|
196
|
+
|
|
197
|
+
# Cursor
|
|
198
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
199
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
200
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
201
|
+
.cursorignore
|
|
202
|
+
.cursorindexingignore
|
|
203
|
+
|
|
204
|
+
# Marimo
|
|
205
|
+
marimo/_static/
|
|
206
|
+
marimo/_lsp/
|
|
207
|
+
__marimo__/
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
rev: v0.15.1
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff-format
|
|
6
|
+
- id: ruff-check
|
|
7
|
+
- repo: local
|
|
8
|
+
hooks:
|
|
9
|
+
- id: ty-check
|
|
10
|
+
name: ty-check
|
|
11
|
+
entry: uv run ty check .
|
|
12
|
+
language: system
|
|
13
|
+
pass_filenames: false
|
|
14
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
15
|
+
rev: v5.0.0
|
|
16
|
+
hooks:
|
|
17
|
+
- id: end-of-file-fixer
|
|
18
|
+
- id: trailing-whitespace
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
|
|
3
|
+
"packages": {
|
|
4
|
+
".": {
|
|
5
|
+
"changelog-path": "CHANGELOG.md",
|
|
6
|
+
"extra-files": [
|
|
7
|
+
{
|
|
8
|
+
"jsonpath": "$.package[?(@.name.value=='richforms')].version",
|
|
9
|
+
"path": "uv.lock",
|
|
10
|
+
"type": "toml"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"include-component-in-tag": false,
|
|
14
|
+
"package-name": "richforms",
|
|
15
|
+
"release-type": "python"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.3.0](https://github.com/shinybrar/richforms/compare/v0.2.1...v0.3.0) (2026-02-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **release:** added automation for releasing richforms ([594b5d7](https://github.com/shinybrar/richforms/commit/594b5d7db2cea59df513e78d286b73fbe5bd1c21))
|
|
9
|
+
* **richforms:** initial implementation ([833258f](https://github.com/shinybrar/richforms/commit/833258fa5134ec6dad58bed6749bf01c92eb5088))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **actions:** removed release please action ([7a5bba7](https://github.com/shinybrar/richforms/commit/7a5bba76198c1bc4ac409979adfb542a3f574779))
|
|
15
|
+
* **ci:** actions ([573c432](https://github.com/shinybrar/richforms/commit/573c43243dfd44418e1688576d12be1d6b6b7da5))
|
|
16
|
+
* **ci:** files ([3948703](https://github.com/shinybrar/richforms/commit/394870370abc37813a8d1e546e049a2c48604ced))
|
|
17
|
+
* **ci:** fixed release-please action ([f85b696](https://github.com/shinybrar/richforms/commit/f85b696e51155fc607b77882a428a18d2be09bb6))
|
|
18
|
+
* **ci:** release action ([f9ad040](https://github.com/shinybrar/richforms/commit/f9ad040edab39d030c798de1813b199813e8e895))
|
|
19
|
+
* **deps:** removed click as a dep since it comes from typer ([c5b7fce](https://github.com/shinybrar/richforms/commit/c5b7fce9fb534eb5e8dd4e782f4900571df76864))
|
|
20
|
+
* **deps:** removed library from deps ([dacf997](https://github.com/shinybrar/richforms/commit/dacf997d6b8479307aec0bcc77f059e860f6d382))
|
|
21
|
+
* **package:** deps ([60f15ed](https://github.com/shinybrar/richforms/commit/60f15edb3175783f813218e2a505691ec5bf8289))
|
|
22
|
+
* **pypi:** release ([a8d2dc8](https://github.com/shinybrar/richforms/commit/a8d2dc83f84fe4410cd118c520478bdf9846809e))
|
|
23
|
+
* **release-please:** action ([a6c3e01](https://github.com/shinybrar/richforms/commit/a6c3e01f75db4d021d8b854b09498040cac5d4db))
|
|
24
|
+
* **release:** automations ([488de1b](https://github.com/shinybrar/richforms/commit/488de1b2835e86d26e9a0895ae348506bc5bda6b))
|
|
25
|
+
* **render:** styling ([cc50f1b](https://github.com/shinybrar/richforms/commit/cc50f1b0029854e1a5b64ed0008f12def670a947))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Documentation
|
|
29
|
+
|
|
30
|
+
* **zensical:** overhaul ([1d0f30c](https://github.com/shinybrar/richforms/commit/1d0f30c8630457b105630fd31d9293a6b5aed42f))
|
|
31
|
+
|
|
32
|
+
## [0.2.1](https://github.com/shinybrar/richforms/compare/richforms-v0.2.0...richforms-v0.2.1) (2026-02-20)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Documentation
|
|
36
|
+
|
|
37
|
+
* **zensical:** overhaul ([1d0f30c](https://github.com/shinybrar/richforms/commit/1d0f30c8630457b105630fd31d9293a6b5aed42f))
|
|
38
|
+
|
|
39
|
+
## [0.2.0](https://github.com/shinybrar/richforms/compare/richforms-v0.1.0...richforms-v0.2.0) (2026-02-19)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Features
|
|
43
|
+
|
|
44
|
+
* **richforms:** initial implementation ([833258f](https://github.com/shinybrar/richforms/commit/833258fa5134ec6dad58bed6749bf01c92eb5088))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### Bug Fixes
|
|
48
|
+
|
|
49
|
+
* **ci:** fixed release-please action ([f85b696](https://github.com/shinybrar/richforms/commit/f85b696e51155fc607b77882a428a18d2be09bb6))
|
|
50
|
+
* **deps:** removed library from deps ([dacf997](https://github.com/shinybrar/richforms/commit/dacf997d6b8479307aec0bcc77f059e860f6d382))
|
|
51
|
+
* **render:** styling ([cc50f1b](https://github.com/shinybrar/richforms/commit/cc50f1b0029854e1a5b64ed0008f12def670a947))
|
|
52
|
+
|
|
53
|
+
## Changelog
|
|
54
|
+
|
|
55
|
+
All notable changes to this project will be documented in this file.
|
richforms-0.3.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 shiny.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
richforms-0.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: richforms
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Rich terminal forms generated from Pydantic models.
|
|
5
|
+
Author-email: Shiny Brar <shiny.brar@nrc-cnrc.gc.ca>
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Requires-Dist: pydantic>=2.0
|
|
9
|
+
Requires-Dist: pyyaml>=6.0
|
|
10
|
+
Requires-Dist: rich>=14.0
|
|
11
|
+
Requires-Dist: typer>=0.20
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
|
|
14
|
+
# richforms
|
|
15
|
+
|
|
16
|
+
`richforms` turns Pydantic models into rich interactive terminal forms.
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
You can add `richforms` to your project with `uv`.
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
uv add richforms
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
You can start from Python in-process or from the bundled CLI.
|
|
29
|
+
|
|
30
|
+
### Python API
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
from richforms.example.model import Metadata
|
|
34
|
+
from richforms import fill
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
metadata = fill(Metadata)
|
|
38
|
+
print(metadata.model_dump_json(indent=2))
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### CLI
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
richforms fill richforms.example.model:Metadata --output project-metadata.json
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Integrations
|
|
48
|
+
|
|
49
|
+
You can integrate `richforms` directly into Click and Typer option callbacks.
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
import typer
|
|
53
|
+
|
|
54
|
+
from richforms.integrations.typer import form_callback
|
|
55
|
+
from richforms.example.model import Metadata
|
|
56
|
+
|
|
57
|
+
app = typer.Typer()
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
@app.command()
|
|
61
|
+
def release(
|
|
62
|
+
metadata: Metadata = typer.Option(
|
|
63
|
+
None,
|
|
64
|
+
callback=form_callback(Metadata),
|
|
65
|
+
),
|
|
66
|
+
) -> None:
|
|
67
|
+
print(metadata.model_dump())
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Documentation
|
|
71
|
+
|
|
72
|
+
For more information, see the [documentation](https://shinybrar.github.io/richforms/).
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# richforms
|
|
2
|
+
|
|
3
|
+
`richforms` turns Pydantic models into rich interactive terminal forms.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
You can add `richforms` to your project with `uv`.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
uv add richforms
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
You can start from Python in-process or from the bundled CLI.
|
|
16
|
+
|
|
17
|
+
### Python API
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
from richforms.example.model import Metadata
|
|
21
|
+
from richforms import fill
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
metadata = fill(Metadata)
|
|
25
|
+
print(metadata.model_dump_json(indent=2))
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### CLI
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
richforms fill richforms.example.model:Metadata --output project-metadata.json
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Integrations
|
|
35
|
+
|
|
36
|
+
You can integrate `richforms` directly into Click and Typer option callbacks.
|
|
37
|
+
|
|
38
|
+
```python
|
|
39
|
+
import typer
|
|
40
|
+
|
|
41
|
+
from richforms.integrations.typer import form_callback
|
|
42
|
+
from richforms.example.model import Metadata
|
|
43
|
+
|
|
44
|
+
app = typer.Typer()
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@app.command()
|
|
48
|
+
def release(
|
|
49
|
+
metadata: Metadata = typer.Option(
|
|
50
|
+
None,
|
|
51
|
+
callback=form_callback(Metadata),
|
|
52
|
+
),
|
|
53
|
+
) -> None:
|
|
54
|
+
print(metadata.model_dump())
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Documentation
|
|
58
|
+
|
|
59
|
+
For more information, see the [documentation](https://shinybrar.github.io/richforms/).
|