-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Attempt to fix some URL bugs #525
base: main
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
yeah, tricky, it comes from the pypi json payload "project_url": "https://pypi.org/project/pyospackage/",
"project_urls": {
"Documentation": "https://github.com/pyopensci/pyospackage#readme",
"Homepage": "https://pypi.org/project/pyospackage/",
"Issues": "https://github.com/pyopensci/pyospackage/issues",
"Source": "https://github.com/pyopensci/pyospackage"
}, can you see that |
Woah, thanks a lot @marcelotrevisani for the advice and quick response! Not sure when I'll be able to make a second pass at this. Looks like maybe something needs to be quoted/escaped? |
Yeah, probably it does need some escaping. I can try to take a look later to give you a hint about that |
I think that there are two stacked bugs here. One bug has to do with the metadata getting passed around without being accidentally dropped. The other has to do with the I actually think that I fixed the bug with the metadata being dropped, but unmasking the bug due to the @lwasser, as a temporary workaround could you try removing the |
Restarting the CI due to the connection error... |
It has seemed like @maresb has this covered. Ben, if you need my help, please ping me. Otherwise, I'm leaving it in your capable hands and cheering you on. |
@lwasser it's your docs link: |
Thank you. i see that now. @maresb in testing this can i run grayskull against a sdist locally so i can skip releasing another version to pypi? i keep digging through the docs but don't see that option (may be user error)? |
You can, but you'll need to adjust the source section. From README.md: You can also generate a recipe from a local sdist archive:
Note that such a recipe isn't really portable as it will depend on the local path of the sdist file. It can be useful if you want to automatically generate a conda package. |
Thank you everyone @msarahan i missed that in the readme. i was checking the docs. As a side note would folks here be open to a documentation pr from me that had the get started info in the readme? it was confusing to me as i saw docs and assumed that info would be there rather than in the readme! I suppose the alternative coming with less maintenance would be to just include the readme in the docs! just a thought :) @maresb Ok i was not understanding the issue and now i see it. There is no reason to have a # in a url as you point out. when i remove that my metadata render perfectly (from your branch) with grayskull running in editable mode on my computer. The metadata / recipe now look like this: {% set name = "pyospackage" %}
{% set version = "0.1.10" %}
package:
name: {{ name|lower }}
version: {{ version }}
source:
url: file:///Users/leahawasser/Documents/GitHub/pyos/pyospackage/dist/pyospackage-0.1.10.tar.gz
sha256: 1db1ceb1d769a081c2945d235016ddb6dfe1b555c68014704c978b198b841ded
build:
noarch: python
script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
number: 0
requirements:
host:
- python >=3.9
- hatchling
- pip
run:
- python >=3.9
test:
imports:
- pyospackage
commands:
- pip check
requires:
- pip
about:
home: https://pypi.org/project/pyospackage/
summary: A package that adds numbers together
license: MIT
license_file: LICENSE
extra:
recipe-maintainers:
- lwasser i wonder if this pr could be merged as i am not seeing anything else broken here in the output. thank you all for walking me through what was going on. i think i misunderstood above what "breaking things" related to. |
@@ -401,11 +401,36 @@ def get_metadata(recipe, config) -> dict: | |||
test_requirements = optional_requirements.pop(config.extras_require_test, []) | |||
test_section = compose_test_section(metadata, test_requirements) | |||
|
|||
# Compute home, doc_url, and dev_url for the "about" section | |||
|
|||
if metadata.get("project_urls") and metadata["project_urls"].get("Homepage"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you encapsulate all this handling for the URLs in a function please?
so we can test that easily :)
I'm glad that this is sorted out, but that is still a bug that I can fix it later, because it should be able to handle the Thank you everybody for putting efforts into this. @maresb , would you like to change the status of this PR to "ready for review"? or are you going to work more in this front? |
Description
I made a quick attempt to fix #447, but it's not working yet. Output looks like:
I'm not sure where those
# readme
comments are coming from, and I'm not sure why thedoc_url
gets clobbered during the rendering. (It's correct whenabout_section
is defined.)