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

[BUG] about.home defaults to None instead of PyPI project page #447

Open
maresb opened this issue Feb 16, 2023 · 3 comments · May be fixed by #525
Open

[BUG] about.home defaults to None instead of PyPI project page #447

maresb opened this issue Feb 16, 2023 · 3 comments · May be fixed by #525
Labels
bug Something isn't working

Comments

@maresb
Copy link
Contributor

maresb commented Feb 16, 2023

Describe the bug
Without a PyPI "homepage" URL on PyPI, the key about.home defaults to None.

To Reproduce
Steps to reproduce the behavior:

grayskull pypi asyncache

Expected behavior
I would have expected it to be https://pypi.org/project/{{ name }}.

Environment:

  • grayskull v2.2.2
@maresb maresb added the bug Something isn't working label Feb 16, 2023
@maresb
Copy link
Contributor Author

maresb commented Feb 19, 2023

Another similar case:

grayskull pypi mkdocs-include-markdown-plugin

generates a meta.yaml with about.dev_url pointing to GitHub and about.home entirely missing.

This results in a complaint by the linter: conda-forge/staged-recipes#22080 (comment)

@lwasser
Copy link

lwasser commented Jan 31, 2024

hey there @maresb and grayskull maintainers 👋 i was just looking into this myself. Something is a bit odd with grayskull.

I have been testing this for our tutorials. And no matter what i add to my pyproject.toml file it seems like home is missing.

[project.urls]
Homepage = "https://pypi.org/project/pyospackage/"
Documentation = "https://github.com/pyopensci/pyospackage#readme"
Issues = "https://github.com/pyopensci/pyospackage/issues"
Source = "https://github.com/pyopensci/pyospackage"

as a result the conda-linter bot (very friendly!!) tells me something is wrong with my recipe. i can absolutely add home= to my recipe manually, but i would expect grayskull to do one of two things as well:

  1. read the homepage = metadata from the pyproject.toml / package sdist metadata / pypi homepage or
  2. because it is required by default to have home = , i would expect it to default to the github repo which is rendered in my recipe as dev_url
    as of now when i run:

grayskull pypi pyospackage

This is what i get in the about section:

about:
  summary: A package that adds numbers together
  dev_url: https://github.com/pyopensci/pyospackage
  license: MIT
  license_file: LICENSE

i think for now i'll tell folks to add home = manually but i wondered if someone could help us understand if this is actually a bug OR something that I am missing when running grayskull.

thank you for making this tool as it's takes a lot of the confusion around creating a recipe away! For a pure python package i'd just hope it worked out of the box and gave the linter everything that it needs to pass a build!

@maresb maresb linked a pull request Feb 1, 2024 that will close this issue
@maresb
Copy link
Contributor Author

maresb commented Feb 1, 2024

Hi @lwasser, this is definitely a bug. There's some seemingly overcomplicated logic for merging the various data sources. It looks like there may be typos in the names. It would be really nice to add validation, e.g. with a type checker. That would prevent these sorts of problems, but adding that would unfortunately be quite a lot of work.

I attempted a quick fix in #525, but unfortunately my changes broke other stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants