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

Add wordcloud #1552

Merged
merged 16 commits into from
Dec 13, 2024
Merged

Add wordcloud #1552

merged 16 commits into from
Dec 13, 2024

Conversation

reytakop
Copy link
Contributor

@reytakop reytakop commented Nov 30, 2024

The wordcloud.xml, macros.xml, and.shed.yml files were added.

@reytakop reytakop changed the title The wordcloud.xml, macros.xml, and.shed.yml files were added Add wordcloud Nov 30, 2024
@bgruening
Copy link
Owner

The output file seems to be missing.

Comment on lines 7 to 28
<requirement type="package" version="2.7.0">codecov</requirement>
<requirement type="package" version="7.3.2">coverage</requirement>
<requirement type="package" version="3.8.0">flake8</requirement>
<requirement type="package" version="7.4.3">pytest</requirement>
<requirement type="package" version="4.1.0">pytest-cov</requirement>
<requirement type="package" version="0.9.7">pytest-sugar</requirement>
<requirement type="package" version="28.0.0">setuptools</requirement>
<requirement type="package" version="4.0.2">twine</requirement>
<requirement type="package" version="0.38.1">wheel</requirement>
<requirement type="package" version="1.5.1">numpydoc</requirement>
<requirement type="package" version="2.31.1">imageio</requirement>
<requirement type="package" version="7.2.3">sphinx</requirement>
<requirement type="package" version="1.2.2">sphinx_rtd_theme</requirement>
<requirement type="package" version="0.8.2">sphinx_gallery</requirement>
<requirement type="package" version="0.4.0">sphinx-argparse</requirement>
<requirement type="package" version="3.0.1">sphinx-issues</requirement>
<requirement type="package" version="3.8.0">matplotlib</requirement>
<requirement type="package" version="6.0.4">multidict</requirement>
<requirement type="package" version="0.42.1">jieba</requirement>
<requirement type="package" version="1.11.3">scipy</requirement>
<requirement type="package" version="2.0.2">python-bidi</requirement>
<requirement type="package" version="3.0.0">arabic_reshaper</requirement>
Copy link
Owner

Choose a reason for hiding this comment

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

Why is this all needed? I would assume that only wordcloud as dependency works?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why is this all needed? I would assume that only wordcloud as dependency works?

Yes, it works with only Wordclous as a requirement.

<param argument="--random_state" type="integer" label="Random seed"/>
<param argument="--no_normalize_plurals" value="True" type="boolean" optional="True" label="Whether to remove trailing s from words"/>
<param argument="--repeat" type="boolean" truevalue="True" falsevalue="False" value="False" label="Whether to repeat words and phrases until max_words or min_font_size is reached"/>
<param argument="--version" type="boolean" truevalue="True" falsevalue="False" value="False" label="Show program's version number"/>
Copy link
Owner

Choose a reason for hiding this comment

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

version should not be offered to the user, but you should add a <version_command> tag to the tool.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

version should not be offered to the user, but you should add a <version_command> tag to the tool.

Thanks, I deleted this line.

@bgruening
Copy link
Owner

I see this error here:

wordcloud_cli: error: argument --color: expected one argument

@reytakop
Copy link
Contributor Author

reytakop commented Dec 6, 2024

The wordcloud.xml file was updated.

@bgruening
Copy link
Owner

@reytakop It seems that there is a problem in your command section.

NameMapper.NotFound: cannot find 'color'

<validator type="regex" message="Please select a valid RGB color">[#][0-9A-Fa-f]{6}</validator>
</param>
<param argument="--mask" type="data" format="png" optional="True" label="Mask to use for the image form"/>
<param argument="--colormask" type="data" format="png" optional="True" label="Color mask to use for image coloring"/>
Copy link
Owner

Choose a reason for hiding this comment

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

here are many "color" options, should they be in your color-conditional?

--max_font_size $max_font_size
--font_step $font_step
--margin $margin
--color $color
Copy link
Owner

Choose a reason for hiding this comment

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

This parameter is inside a conditional. You need to have an if-condition here that models your conditional I think.

@reytakop
Copy link
Contributor Author

The wordcloud.xml file was updated, and the related error was fixed.

tools/wordcloud/wordcloud.xml Outdated Show resolved Hide resolved
tools/wordcloud/wordcloud.xml Outdated Show resolved Hide resolved
@@ -0,0 +1,8 @@
<macros>
<token name="@TOOL_VERSION@">1.9.4</token>
Copy link
Owner

Choose a reason for hiding this comment

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

If its just one tool, you can move this into the tool if you like - not as a separate file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If its just one tool, you can move this into the tool if you like - not as a separate file.

Thanks for your comment. The files were updated based on your suggestion.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, you misunderstood: using the tokens instead of hard-coded versions is important for automated update suggestions, but you can set the macros right in the tool xml instead of expanding them from another file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, you misunderstood: using the tokens instead of hard-coded versions is important for automated update suggestions, but you can set the macros right in the tool xml instead of expanding them from another file.

Thanks for your comment. I updated the file.

@reytakop reytakop marked this pull request as ready for review December 12, 2024 14:37
@bgruening bgruening merged commit 6d08a14 into bgruening:master Dec 13, 2024
11 checks passed
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.

3 participants