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

conda-forge.yml version numbers should be string, not float #76

Merged
merged 3 commits into from
Mar 11, 2024
Merged

conda-forge.yml version numbers should be string, not float #76

merged 3 commits into from
Mar 11, 2024

Conversation

ytausch
Copy link
Contributor

@ytausch ytausch commented Mar 11, 2024

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

To ensure compatibility with the new Pydantic schema of conda-smithy, version numbers should be strings, not floats in conda-forge.yml. Refer to conda-forge/conda-smithy#1756 (comment)

@conda-forge-webservices
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@ytausch ytausch changed the title conda-forge.yml versions numbers should be string, not float conda-forge.yml version numbers should be string, not float Mar 11, 2024
Copy link
Member

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

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

Thanks Yannik! 🙏

Had some questions below

recipe/meta.yaml Outdated Show resolved Hide resolved
@@ -4,7 +4,7 @@ azure:
swapfile_size: 10GiB
bot:
abi_migration_branches:
- 11.8
- '11.8'
Copy link
Member

Choose a reason for hiding this comment

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

Am curious, why was this not read as a string before?

Though the bot was previously reading this ok

Copy link
Member

@jaimergp jaimergp Mar 11, 2024

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, but I was under the impression that all values in conda-forge.yml are strings (ex: we have 10GiB above), so adding quotations or not does not make differences. Since when was this changed? I've read the linked issue but it was unclear to me.

Copy link
Contributor

@bdice bdice Mar 11, 2024

Choose a reason for hiding this comment

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

YAML parsers try to interpret some numerical values as floats (presumably those conforming to some regex, or something like that). The “GiB” part of the 10GiB value makes it parse as a string. This was a big problem when Python 3.10 came out because many YAML files had - 3.10 which was interpreted as 3.1.

This fix seems reasonable to me.

Copy link
Member

Choose a reason for hiding this comment

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

I see, thanks for letting me know the parser quirks...

@bdice bdice merged commit 3a2fa54 into conda-forge:main Mar 11, 2024
22 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.

5 participants