Skip to content

Commit fe9bb3e

Browse files
Eyal-Danielidanielperezziguazio-cicdguylei-codeamitnGiniApps
authored
Cherry Pick from Development (#954)
* replace author to Iguazio manually (#905) * Organize CLI directory + new CLI for generating item.yaml files (#906) * create a CLI for generating item.yaml and organize the CLI directory * modify comments to module * PR fixes * Update cli/common/generate_item_yaml.py Co-authored-by: Eyal Danieli <eyal_danieli@mckinsey.com> --------- Co-authored-by: Eyal Danieli <eyal_danieli@mckinsey.com> * fill count events notebook (#908) * avoid noise reduction unit test (#909) * Add histogram-data-drift monitoring application module (without example) (#911) * histogram data drift module with empty example notebook * post review fixes * chore(readme): auto-update asset tables [skip ci] * Fill histogram-data-drift example notebook (#912) * fill data-drift nb * post review fixes * Add evidently demo app monitoring application module (without example) (#913) * sphinx build docs bug fix * add evidently demo app module (empty example notebook) * post review changes * chore(readme): auto-update asset tables [skip ci] * [Translate] Require torch>=2.6 for the translate function to work properly (#915) * lock torch valid version * edit the item.yaml and generated function.yaml * update mlrun version * [CLI] Generated READMEs are produced with broken links to the items (#918) * fix * test fix * test fix * test fix * test fix * final workflow * chore(readme): auto-update asset tables [skip ci] * OpenAI Module without notebook (#917) * First commit OpenAI Module * First commit OpenAI Module * Update example filename in item.yaml * Delete modules/src/openai_proxy/requirements.txt No need due to no unitest * Update item.yaml for OpenAI application configuration * Update modules/src/openai_proxy/openai.py Co-authored-by: Daniel Perez <100069700+danielperezz@users.noreply.github.com> * Change category name from 'GenAI' to 'genai' * Update package requirements with version constraints * Second commit adding notebook * Refactor OpenAI proxy to use base64 encoded script Refactor OpenAI proxy implementation to use base64 encoded script and update FastAPI app configuration. * Change deployment method to OpenAIModule * Third commit adding notebook * Third commit adding notebook * Remove package requirements from item.yaml Removed specific requirements for fastapi and requests. * Rename item and update kind in YAML * Update openai.py * Third commit adding notebook * Fix after review * Fix after review --------- Co-authored-by: Daniel Perez <100069700+danielperezz@users.noreply.github.com> * chore(readme): auto-update asset tables [skip ci] * [Evidently] Fill example notebook (#919) * add notebook + rename directory + correct evidently version * remove extra cell * chore(readme): auto-update asset tables [skip ci] * chore(readme): auto-update asset tables [skip ci] * [CLI + Modules] Fix time format in generate item yaml script (#922) * fix time format for evidently and hist * fix cli script * fix datetime format * chore(readme): auto-update asset tables [skip ci] * chore(readme): auto-update asset tables [skip ci] * Fix CMD first commit * Fix CMD second commit * remove max-width restriction from the main content (#929) * add test, requirement file and notebook * fix cli/utils/helpers.py * [Modules] Modify Evidently & Histogram monitoring apps example notebooks to the change in evaluate() (#934) * histogram_data_drift.ipynb * fix to histogram_data_drift.ipynb * fix to histogram_data_drift.ipynb * evidently_iris.ipynb * fix evidently_iris.ipynb * fix evidently_iris.ipynb * fix evidently dependency * add dependency * remove [ui] from evidently dependency * change notebook name to: openai_proxy_app * [Docs] Add guidelines for contributing new functions or modules (#931) * CONTRIBUTING.md * CONTRIBUTING.md * improvements * [Module] Updated the requirements for OpenAI module (#939) * Updated the requirements * Added Deafult model for credentials * Pin dependencies to specific versions in item.yaml * Update dependencies in openai_proxy_app.py * Specify versions for dependencies in requirements.txt * Fix environment variable access for OPENAI_DEFAULT_MODEL * change notebook name to: openai_proxy_app * [Module] agent_deployer module (#937) * first commit * added all modules * fixes from review and notebook adjustments * added unit tests and documentation * remove log * small fix * cr fixes * get_function fix * cr fixes working deployment * small fix notebook * chore(readme): auto-update asset tables [skip ci] * [Infra] Add 'Steps' to 'mlrun/hub-assets' and adjust CI/CD workflow to support it (#942) * first draft to support steps * correct branch name to test workflow * mlrun version * fix test * create a marketplace artifact * final workflow * add docstring to test the ui docs html * modify the readme to different colums set * no need for now * remove the dummy step files for now * chore(readme): auto-update asset tables [skip ci] * add default-handler to the step template (#947) * [AgentDeployer] Notebook prompt fix (#946) * Cherry Pick from Development (#941) * replace author to Iguazio manually (#905) * Organize CLI directory + new CLI for generating item.yaml files (#906) * create a CLI for generating item.yaml and organize the CLI directory * modify comments to module * PR fixes * Update cli/common/generate_item_yaml.py Co-authored-by: Eyal Danieli <eyal_danieli@mckinsey.com> --------- Co-authored-by: Eyal Danieli <eyal_danieli@mckinsey.com> * fill count events notebook (#908) * avoid noise reduction unit test (#909) * Add histogram-data-drift monitoring application module (without example) (#911) * histogram data drift module with empty example notebook * post review fixes * chore(readme): auto-update asset tables [skip ci] * Fill histogram-data-drift example notebook (#912) * fill data-drift nb * post review fixes * Add evidently demo app monitoring application module (without example) (#913) * sphinx build docs bug fix * add evidently demo app module (empty example notebook) * post review changes * chore(readme): auto-update asset tables [skip ci] * [Translate] Require torch>=2.6 for the translate function to work properly (#915) * lock torch valid version * edit the item.yaml and generated function.yaml * update mlrun version * [CLI] Generated READMEs are produced with broken links to the items (#918) * fix * test fix * test fix * test fix * test fix * final workflow * chore(readme): auto-update asset tables [skip ci] * OpenAI Module without notebook (#917) * First commit OpenAI Module * First commit OpenAI Module * Update example filename in item.yaml * Delete modules/src/openai_proxy/requirements.txt No need due to no unitest * Update item.yaml for OpenAI application configuration * Update modules/src/openai_proxy/openai.py Co-authored-by: Daniel Perez <100069700+danielperezz@users.noreply.github.com> * Change category name from 'GenAI' to 'genai' * Update package requirements with version constraints * Second commit adding notebook * Refactor OpenAI proxy to use base64 encoded script Refactor OpenAI proxy implementation to use base64 encoded script and update FastAPI app configuration. * Change deployment method to OpenAIModule * Third commit adding notebook * Third commit adding notebook * Remove package requirements from item.yaml Removed specific requirements for fastapi and requests. * Rename item and update kind in YAML * Update openai.py * Third commit adding notebook * Fix after review * Fix after review --------- Co-authored-by: Daniel Perez <100069700+danielperezz@users.noreply.github.com> * chore(readme): auto-update asset tables [skip ci] * [Evidently] Fill example notebook (#919) * add notebook + rename directory + correct evidently version * remove extra cell * chore(readme): auto-update asset tables [skip ci] * chore(readme): auto-update asset tables [skip ci] * [CLI + Modules] Fix time format in generate item yaml script (#922) * fix time format for evidently and hist * fix cli script * fix datetime format * chore(readme): auto-update asset tables [skip ci] * chore(readme): auto-update asset tables [skip ci] * Fix CMD first commit * Fix CMD second commit * remove max-width restriction from the main content (#929) * add test, requirement file and notebook * fix cli/utils/helpers.py * [Modules] Modify Evidently & Histogram monitoring apps example notebooks to the change in evaluate() (#934) * histogram_data_drift.ipynb * fix to histogram_data_drift.ipynb * fix to histogram_data_drift.ipynb * evidently_iris.ipynb * fix evidently_iris.ipynb * fix evidently_iris.ipynb * fix evidently dependency * add dependency * remove [ui] from evidently dependency * change notebook name to: openai_proxy_app * [Docs] Add guidelines for contributing new functions or modules (#931) * CONTRIBUTING.md * CONTRIBUTING.md * improvements * [Module] Updated the requirements for OpenAI module (#939) * Updated the requirements * Added Deafult model for credentials * Pin dependencies to specific versions in item.yaml * Update dependencies in openai_proxy_app.py * Specify versions for dependencies in requirements.txt * Fix environment variable access for OPENAI_DEFAULT_MODEL * change notebook name to: openai_proxy_app * [Module] agent_deployer module (#937) * first commit * added all modules * fixes from review and notebook adjustments * added unit tests and documentation * remove log * small fix * cr fixes * get_function fix * cr fixes working deployment * small fix notebook * chore(readme): auto-update asset tables [skip ci] --------- Co-authored-by: Daniel Perez <100069700+danielperezz@users.noreply.github.com> Co-authored-by: iguazio-cicd <iguaziocicd@gmail.com> Co-authored-by: guylei-code <guyleibu@gmail.com> Co-authored-by: amitnGiniApps <amitn@gini-apps.com> Co-authored-by: Roy Schossberger <85231212+royischoss@users.noreply.github.com> * chore(readme): auto-update asset tables [skip ci] * small fix notebook * remove changes in README.md * remove changes in README.md --------- Co-authored-by: Eyal Danieli <eyald@iguazio.com> Co-authored-by: Daniel Perez <100069700+danielperezz@users.noreply.github.com> Co-authored-by: iguazio-cicd <iguaziocicd@gmail.com> Co-authored-by: guylei-code <guyleibu@gmail.com> Co-authored-by: amitnGiniApps <amitn@gini-apps.com> * [Module] Add vLLM module application (#943) * vLLM module first commit * Chane the module name * Fix generationDate format in item.yaml Correct the format of the generationDate field. * Fix test assertion for vllm_proxy_app type * Add copyright and module description to vllm_module.py Added copyright information and module description. * Update modules/src/vllm_module/vllm_module.py Co-authored-by: Eyal Danieli <eyal_danieli@mckinsey.com> * Update modules/src/vllm_module/vllm-module.ipynb Co-authored-by: Eyal Danieli <eyal_danieli@mckinsey.com> * Enhance description of vLLM module Updated the description to provide more details about the vLLM module's functionality and configuration options. * Add docstring for VLLMModule class Added docstring to VLLMModule class to describe its purpose and functionality. * Add validation for tensor_parallel_size against gpus * Update item.yaml --------- Co-authored-by: Eyal Danieli <eyal_danieli@mckinsey.com> * chore(readme): auto-update asset tables [skip ci] * fix nb name (#948) * [Module] vLLM module with notebook (#952) * Cherry Pick from Development (#941) * replace author to Iguazio manually (#905) * Organize CLI directory + new CLI for generating item.yaml files (#906) * create a CLI for generating item.yaml and organize the CLI directory * modify comments to module * PR fixes * Update cli/common/generate_item_yaml.py Co-authored-by: Eyal Danieli <eyal_danieli@mckinsey.com> --------- Co-authored-by: Eyal Danieli <eyal_danieli@mckinsey.com> * fill count events notebook (#908) * avoid noise reduction unit test (#909) * Add histogram-data-drift monitoring application module (without example) (#911) * histogram data drift module with empty example notebook * post review fixes * chore(readme): auto-update asset tables [skip ci] * Fill histogram-data-drift example notebook (#912) * fill data-drift nb * post review fixes * Add evidently demo app monitoring application module (without example) (#913) * sphinx build docs bug fix * add evidently demo app module (empty example notebook) * post review changes * chore(readme): auto-update asset tables [skip ci] * [Translate] Require torch>=2.6 for the translate function to work properly (#915) * lock torch valid version * edit the item.yaml and generated function.yaml * update mlrun version * [CLI] Generated READMEs are produced with broken links to the items (#918) * fix * test fix * test fix * test fix * test fix * final workflow * chore(readme): auto-update asset tables [skip ci] * OpenAI Module without notebook (#917) * First commit OpenAI Module * First commit OpenAI Module * Update example filename in item.yaml * Delete modules/src/openai_proxy/requirements.txt No need due to no unitest * Update item.yaml for OpenAI application configuration * Update modules/src/openai_proxy/openai.py Co-authored-by: Daniel Perez <100069700+danielperezz@users.noreply.github.com> * Change category name from 'GenAI' to 'genai' * Update package requirements with version constraints * Second commit adding notebook * Refactor OpenAI proxy to use base64 encoded script Refactor OpenAI proxy implementation to use base64 encoded script and update FastAPI app configuration. * Change deployment method to OpenAIModule * Third commit adding notebook * Third commit adding notebook * Remove package requirements from item.yaml Removed specific requirements for fastapi and requests. * Rename item and update kind in YAML * Update openai.py * Third commit adding notebook * Fix after review * Fix after review --------- Co-authored-by: Daniel Perez <100069700+danielperezz@users.noreply.github.com> * chore(readme): auto-update asset tables [skip ci] * [Evidently] Fill example notebook (#919) * add notebook + rename directory + correct evidently version * remove extra cell * chore(readme): auto-update asset tables [skip ci] * chore(readme): auto-update asset tables [skip ci] * [CLI + Modules] Fix time format in generate item yaml script (#922) * fix time format for evidently and hist * fix cli script * fix datetime format * chore(readme): auto-update asset tables [skip ci] * chore(readme): auto-update asset tables [skip ci] * Fix CMD first commit * Fix CMD second commit * remove max-width restriction from the main content (#929) * add test, requirement file and notebook * fix cli/utils/helpers.py * [Modules] Modify Evidently & Histogram monitoring apps example notebooks to the change in evaluate() (#934) * histogram_data_drift.ipynb * fix to histogram_data_drift.ipynb * fix to histogram_data_drift.ipynb * evidently_iris.ipynb * fix evidently_iris.ipynb * fix evidently_iris.ipynb * fix evidently dependency * add dependency * remove [ui] from evidently dependency * change notebook name to: openai_proxy_app * [Docs] Add guidelines for contributing new functions or modules (#931) * CONTRIBUTING.md * CONTRIBUTING.md * improvements * [Module] Updated the requirements for OpenAI module (#939) * Updated the requirements * Added Deafult model for credentials * Pin dependencies to specific versions in item.yaml * Update dependencies in openai_proxy_app.py * Specify versions for dependencies in requirements.txt * Fix environment variable access for OPENAI_DEFAULT_MODEL * change notebook name to: openai_proxy_app * [Module] agent_deployer module (#937) * first commit * added all modules * fixes from review and notebook adjustments * added unit tests and documentation * remove log * small fix * cr fixes * get_function fix * cr fixes working deployment * small fix notebook * chore(readme): auto-update asset tables [skip ci] --------- Co-authored-by: Daniel Perez <100069700+danielperezz@users.noreply.github.com> Co-authored-by: iguazio-cicd <iguaziocicd@gmail.com> Co-authored-by: guylei-code <guyleibu@gmail.com> Co-authored-by: amitnGiniApps <amitn@gini-apps.com> Co-authored-by: Roy Schossberger <85231212+royischoss@users.noreply.github.com> * chore(readme): auto-update asset tables [skip ci] * Chane the vllm-module.ipynb output error ,vllm_app. * Chane the vllm-module.ipynb output error ,vllm_app. * Chane the vllm-module.ipynb output error ,vllm_app. * Remove tensor flag, and fix notebool --------- Co-authored-by: Eyal Danieli <eyald@iguazio.com> Co-authored-by: Daniel Perez <100069700+danielperezz@users.noreply.github.com> Co-authored-by: iguazio-cicd <iguaziocicd@gmail.com> Co-authored-by: amitnGiniApps <amitn@gini-apps.com> Co-authored-by: Roy Schossberger <85231212+royischoss@users.noreply.github.com> * chore(readme): auto-update asset tables [skip ci] --------- Co-authored-by: Daniel Perez <100069700+danielperezz@users.noreply.github.com> Co-authored-by: iguazio-cicd <iguaziocicd@gmail.com> Co-authored-by: guylei-code <guyleibu@gmail.com> Co-authored-by: amitnGiniApps <amitn@gini-apps.com> Co-authored-by: Roy Schossberger <85231212+royischoss@users.noreply.github.com>
1 parent 0fc22a9 commit fe9bb3e

File tree

14 files changed

+550
-104
lines changed

14 files changed

+550
-104
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
| awk -F'/' '
4949
/^functions\/src\// {print $1"/"$2"/"$3}
5050
/^modules\/src\// {print $1"/"$2"/"$3}
51+
/^steps\/src\// {print $1"/"$2"/"$3}
5152
' \
5253
| sort -u
5354
)

.github/workflows/test-all.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
| awk -F'/' '
4141
/^functions\/src\// {print $1"/"$2"/"$3}
4242
/^modules\/src\// {print $1"/"$2"/"$3}
43+
/^steps\/src\// {print $1"/"$2"/"$3}
4344
' \
4445
| sort -u
4546
)
@@ -134,7 +135,7 @@ jobs:
134135
- name: Regenerate README tables
135136
env:
136137
CHANNEL: ${{ steps.branch.outputs.branch }}
137-
run: python -m cli.cli update-readme -c $CHANNEL --asset functions --asset modules
138+
run: python -m cli.cli update-readme -c $CHANNEL --asset functions --asset modules --asset steps
138139
- name: Commit & push (if changed)
139140
env:
140141
USERNAME: ${{ secrets.USERNAME }}
@@ -146,7 +147,7 @@ jobs:
146147
fi
147148
git config --local user.name $USERNAME
148149
git config --local user.email $USEREMAIL
149-
git add functions/README.md modules/README.md || true
150+
git add functions/README.md modules/README.md steps/README.md || true
150151
git commit -m "chore(readme): auto-update asset tables [skip ci]"
151152
git push
152153
@@ -187,6 +188,7 @@ jobs:
187188
cd ..
188189
python -m cli.cli build-marketplace -s ./functions/src -sn functions -m marketplace -c $CHANNEL -v -f
189190
python -m cli.cli build-marketplace -s ./modules/src -sn modules -m marketplace -c $CHANNEL -v -f
191+
python -m cli.cli build-marketplace -s ./steps/src -sn steps -m marketplace -c $CHANNEL -v -f
190192
## Uncomment the following lines if you want to upload the built marketplace as an artifact
191193
# - name: Upload built marketplace as artifact
192194
# uses: actions/upload-artifact@v4
@@ -247,4 +249,4 @@ jobs:
247249
echo "Pushing [$BRANCH_NAME] to remote [$REMOTE]"
248250
git push -f $REMOTE $BRANCH_NAME
249251
echo "Submiting pull request..."
250-
gh pr create --title "Marketplace update from $BRANCH_NAME" --body "github-workflow" --base $BASE_BRANCH --head $BRANCH_NAME --repo $BASE_REPO/$REPO_PATH
252+
gh pr create --title "Marketplace update from $BRANCH_NAME" --body "github-workflow" --base $BASE_BRANCH --head $BRANCH_NAME --repo $BASE_REPO/$REPO_PATH

cli/common/generate_item_yaml.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
TEMPLATES = {
88
"function": "cli/utils/function_item_template.yaml.j2",
99
"module": "cli/utils/module_item_template.yaml.j2",
10+
"step": "cli/utils/step_item_template.yaml.j2",
1011
}
1112

1213

cli/common/update_readme.py

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@
2222

2323
MARKER_START = "<!-- AUTOGEN:START"
2424
MARKER_END = "<!-- AUTOGEN:END -->"
25-
COLUMNS = ("Name", "Description", "Kind", "Categories")
25+
ASSET_COLUMNS = {
26+
"functions": ("Name", "Description", "Kind", "Categories"),
27+
"modules": ("Name", "Description", "Kind", "Categories"),
28+
"steps": ("Name", "Description", "Class Name", "Categories"),
29+
}
2630

2731
@click.command("update-readme")
2832
@click.option("-c", "--channel", default="master", help="Name of build channel")
@@ -31,7 +35,7 @@
3135
multiple=True,
3236
required=True,
3337
help="Asset types to process (e.g: functions). "
34-
"Pass multiple: --assets functions --assets modules",
38+
"Pass multiple: --asset functions --asset modules",
3539
)
3640
@click.option("--check", is_flag=True,
3741
help="Do not write; exit non‑zero if README(s) would change.")
@@ -45,21 +49,22 @@ def update_readme(channel: str, asset: Iterable[str],
4549
touched: list[str] = []
4650

4751
for t in asset_list:
52+
columns = ASSET_COLUMNS.get(t, ("Name", "Description", "Kind", "Categories"))
4853
if check:
4954
# simulate by reading/writing to a temp string, but easiest is: run update and revert if not checking
5055
# Instead: compute would-change by comparing strings without writing:
5156
root = Path(".").resolve()
5257
asset_dir = root / t
5358
readme = asset_dir / "README.md"
54-
rows = _rows_for_asset_type(channel, asset_dir)
55-
table_md = _build_table_md(rows)
59+
rows = _rows_for_asset_type(channel, asset_dir, columns)
60+
table_md = _build_table_md(rows, columns)
5661
old = readme.read_text() if readme.exists() else f"# {t.title()}\n\n"
5762
new = _replace_block(old, table_md)
5863
if new != old:
5964
changed_any = True
6065
touched.append(str(readme))
6166
else:
62-
if _update_one(channel, t):
67+
if _update_one(channel, t, columns):
6368
changed_any = True
6469
touched.append(str((Path(t) / "README.md").as_posix()))
6570

@@ -79,13 +84,13 @@ def update_readme(channel: str, asset: Iterable[str],
7984
click.echo("No README changes.")
8085

8186

82-
def _rows_for_asset_type(channel: str, asset_dir: Path) -> List[Tuple[str, str, str, str]]:
87+
def _rows_for_asset_type(channel: str, asset_dir: Path, columns) -> list:
8388
"""Scan <asset>/src/*/item.yaml and return table rows."""
8489
src = asset_dir / "src"
8590
if not src.exists():
8691
return []
8792

88-
rows: List[Tuple[str, str, str, str]] = []
93+
rows = []
8994
for item_yaml in sorted(src.glob("*/item.yaml")):
9095
asset_name = item_yaml.parent.name
9196
try:
@@ -95,24 +100,39 @@ def _rows_for_asset_type(channel: str, asset_dir: Path) -> List[Tuple[str, str,
95100

96101
desc = (data.get("description") or "").strip()
97102
kind = (data.get("spec", {}).get("kind", "")).strip()
103+
class_name = (data.get("className", "")).strip()
98104
cats = data.get("categories") or []
99105
cats_str = ", ".join(c.strip() for c in cats) if isinstance(cats, list) else str(cats).strip()
100106
# Link the name to its source directory
101107
# Construct the relative path from the repo root for the asset
102108
rel_path = asset_dir.relative_to(Path(".").resolve())
103109
link = f"[{asset_name}](https://github.com/mlrun/functions/tree/{channel}/{rel_path}/src/{asset_name})"
104-
rows.append((link, desc, kind, cats_str))
110+
row = []
111+
for col in columns:
112+
if col == "Name":
113+
row.append(link)
114+
elif col == "Description":
115+
row.append(desc)
116+
elif col == "Kind":
117+
row.append(kind)
118+
elif col == "Class Name":
119+
row.append(class_name)
120+
elif col == "Categories":
121+
row.append(cats_str)
122+
else:
123+
row.append("")
124+
rows.append(tuple(row))
105125

106126
rows.sort(key=lambda r: r[0].lower())
107127
return rows
108128

109129

110-
def _build_table_md(rows: List[Tuple[str, str, str, str]]) -> str:
130+
def _build_table_md(rows, columns) -> str:
111131
if not rows:
112132
return "_No items found_"
113133
lines = [
114-
"| " + " | ".join(COLUMNS) + " |",
115-
"| " + " | ".join("---" for _ in COLUMNS) + " |",
134+
"| " + " | ".join(columns) + " |",
135+
"| " + " | ".join("---" for _ in columns) + " |",
116136
]
117137
for r in rows:
118138
lines.append("| " + " | ".join((cell or "").replace("\n", " ").strip() for cell in r) + " |")
@@ -143,14 +163,14 @@ def _replace_block(readme_text: str, new_block: str) -> str:
143163
return readme_text[:start_close] + "\n" + new_block + "\n" + readme_text[ei:]
144164

145165

146-
def _update_one(channel: str, asset_type: str) -> bool:
166+
def _update_one(channel: str, asset_type: str, columns) -> bool:
147167
"""Generate/replace the table in <asset_type>/README.md. Return True if changed."""
148168
root = Path(".").resolve()
149169
asset_dir = root / asset_type
150170
readme = asset_dir / "README.md"
151171

152-
rows = _rows_for_asset_type(channel, asset_dir)
153-
table_md = _build_table_md(rows)
172+
rows = _rows_for_asset_type(channel, asset_dir, columns)
173+
table_md = _build_table_md(rows, columns)
154174
old = readme.read_text() if readme.exists() else f"# {asset_type.title()}\n\n"
155175
new = _replace_block(old, table_md)
156176

@@ -159,5 +179,3 @@ def _update_one(channel: str, asset_type: str) -> bool:
159179
readme.write_text(new)
160180
return True
161181
return False
162-
163-
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: v1
2+
categories: [] {# List of category names #}
3+
description: '' {# Short description #}
4+
example: {{ example|default('') }} {# Path to example notebook #}
5+
generationDate: {{ generationDate|default('') }} {# Automatically generated ISO8086 datetime #}
6+
hidden: false {# Hide item from the UI #}
7+
labels:
8+
author: Iguazio
9+
mlrunVersion: '' {# Item’s MLRun version requirement, should follow python’s versioning schema #}
10+
name: {{ name|default('') }} {# Step name #}
11+
className: {{ className|default('') }} {# Step class name #}
12+
defaultHandler: {{ defaultHandler|default('') }} {# Default handler name #}
13+
spec:
14+
filename: {{ filename|default('') }} {# Implementation file #}
15+
image: mlrun/mlrun {# Base image name #}
16+
requirements: [] {# List of Pythonic library requirements #}
17+
version: 1.0.0 {# Step version, should follow standard semantic versioning schema #}

0 commit comments

Comments
 (0)