Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generic readme generation #737

Merged
merged 5 commits into from
Dec 22, 2023

Conversation

PhilippeMoussalli
Copy link
Contributor

@PhilippeMoussalli PhilippeMoussalli commented Dec 19, 2023

Fixes #729

Copy link
Member

@RobbeSneyders RobbeSneyders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @PhilippeMoussalli! Some suggestions on how to make this even more clear.

Comment on lines 9 to 22
{% if consumes %}
**This component consumes:**

{% for field_name, field in consumes.items() %}
- {{ field.name }}: {{ field.type.value }}
{% endfor %}
{% else %}
**This component consumes no data.**
_**This component does not consume specific data.**_
{% endif %}

{% if is_consumes_generic %}
**This component consumes generic data**
- <field_name>: <mapped_field_name>
{% endif %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think "does not consume specific data", or "consumes generic data" is clear for users without deep knowledge about Fondant concepts. I think we can refactor this and update the messages to be more clear:

{% if consumes %}
**This component consumes:**

{% for field_name, field in consumes.items() %}
- {{ field.name }}: {{ field.type.value }}
{% endfor %}
{% elif is_consumes_generic %}
**This component can consume different data schemes**
See the usage example below on how to define a schema.
{% else %}
**This component does not consume data.**
{% endif %}

Comment on lines 27 to 40
{% if produces %}
**This component produces:**

{% for field_name, field in produces.items() %}
- {{ field.name }}: {{ field.type.value }}
{% endfor %}
{% else %}
**This component produces no data.**
_**This component does not produce specific data.**_
{% endif %}

### Arguments
{% if is_produces_generic %}
**This component produces generic data**
- <field_name>: <field_schema>
{% endif %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as proposal for consumes above.

scripts/component_readme/readme_template.md Outdated Show resolved Hide resolved
Copy link
Contributor

@mrchtr mrchtr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @PhilippeMoussalli. Left a few comments.

scripts/component_readme/generate_readme.py Show resolved Hide resolved
scripts/component_readme/readme_template.md Show resolved Hide resolved
scripts/component_readme/readme_template.md Outdated Show resolved Hide resolved
### Arguments
{% if is_produces_generic %}
**This component produces generic data**
- <field_name>: <field_schema>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The produce implementation can use both, a column mapping and a column/data type mapping. What you can use depends on the component implementation itself. Can we add a description for column name, data type mapping too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call! added a description based on the docs

@PhilippeMoussalli PhilippeMoussalli force-pushed the update-generic-component-readme-generation branch from 7d76bfb to c67ae37 Compare December 21, 2023 15:21
Copy link
Member

@RobbeSneyders RobbeSneyders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some formatting issues now. You can see them if you look at the generated website.

{% if consumes %}
**This component consumes:**

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This newline is needed for formatting the list correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

{% if produces %}
**This component produces:**

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This newline is needed for formatting the list correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Contributor

@mrchtr mrchtr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @PhilippeMoussalli. Lgtm

@PhilippeMoussalli PhilippeMoussalli merged commit 8f3563a into main Dec 22, 2023
6 checks passed
@PhilippeMoussalli PhilippeMoussalli deleted the update-generic-component-readme-generation branch December 22, 2023 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update generic component readme generation
3 participants