-
Notifications
You must be signed in to change notification settings - Fork 245
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
ENH: Add URL verification to s4ext file check #1788
base: main
Are you sure you want to change the base?
Conversation
The URL is requested from the server and verified that it returns with OK status (200). Also added the option to specify filenames with wildcards. For example, this allows easily running URL checks on all files locally: python.exe check_description_files.py --check-urls *.s4ext
Thanks for working on this. I spent some time working on this today as well and will add a follow up commit. The additional checks I considered are:
|
It would be great if you could fix this circleci configuration - I don't know how to pip install "requests" package.
I would remove the s4ext file generation from CMake and instead ask the user to create a .s4ext (or .json or .yaml) manually and CMake would get all the info it needs. It could be easily made backward-compatible (if the CMake script does not find a suitable extension description file then it falls back to use CMake variables). |
Re: fix circle ci Re: remove generation of s4ext To help revisit the current approach, here are few comments: (1) we need to submit the following Metadata when uploading an extension: (2) we need the following Metadata when building : Currently, the s4ext file fulfills two roles:
There are few approaches to move forward: Approach 1: decouple the two rolesThis could be done by:
To avoid keeping the 'depends' Metadata in sync between the build and metadata file ... ... we could always expect the build system to download the metadata file from the repo. That way, no duplication. Approach 2: having a single fileThe file Notes
|
I fully support this. Github actions might not be as sophisticated as CircleCI, but I find them much easier to use.
It would be better if we didn't invent something from scratch. Can we do something similar that is done in the Python Package Index? |
For python wheels, there are few aspects:
If we would like to also adopt Since starting with CMake 3.19, we have JSON support in CMake, adopting json would be a natural choice. Describing metadata using json works well in the javascript ecosystem, looking at https://docs.npmjs.com/cli/v7/configuring-npm/package-json is also sensible. Requirements:
|
I agree, we should just use json. Both toml and metadata format has rules for json conversion (see https://www.python.org/dev/peps/pep-0566/#json-compatible-metadata and https://github.com/toml-lang/toml/wiki#converters), so we should be able to keep the same or very similar structure, field names, values, etc. The Python metadata fields are quite limited compared to npm metadata file fields: single author, no explicit bugtracker URL, quite limited repository specification, etc. That said neither of them contain everything that we need (e.g. acknowledgments, funding sources, icon and screenshot URLs, ...), so we cannot just adopt one or the other, but we can just get inspirations and adopt some conventions. There seems to be a similar situation in duplication of metadata in Python wheels and source: https://packaging.python.org/specifications/core-metadata/#dynamic-multiple-use. However, I could not exactly understand their problem or their solution. |
The URL is requested from the server and verified that it returns with OK status (200).
Also added the option to specify filenames with wildcards. For example, this allows easily running URL checks on all files locally: