-
Notifications
You must be signed in to change notification settings - Fork 563
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
Switch extension index entry format from "s4ext" to "json" | ⚠️ Changes removed from main #7629
Switch extension index entry format from "s4ext" to "json" | ⚠️ Changes removed from main #7629
Conversation
b9f087c
to
9722894
Compare
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.
Thanks a lot @jcfr the changes look good to me. I've just added a few small comments.
751498c
to
eeba6b0
Compare
This comment was marked as outdated.
This comment was marked as outdated.
eeba6b0
to
89a306e
Compare
This comment was marked as outdated.
This comment was marked as outdated.
89a306e
to
7b07924
Compare
This comment was marked as outdated.
This comment was marked as outdated.
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.
Thank you, I've added some comments. I'm OK with most of them left unchanged, the only thing that I feel strongly about is that we should include the schema name in the file. I would rather not add lots of json files that are not clear what contain, especially because neither the filename, nor the file extension or file content is specific enough to confidently tell that it is an extensions catalog entry.
Extensions/CMake/SlicerFunctionExtractExtensionDescription.cmake
Outdated
Show resolved
Hide resolved
0404746
to
3a58c0b
Compare
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.
Thank you, it looks good, just marked a few trivial things. If there is any trouble with removing "NA" then it is fine to leave it there.
3a58c0b
to
5c79b1f
Compare
Ditto. This should be addressed in the commit Also need to display warnings (when using Slicer >= 5.8) to suggest removal of |
14c8607
to
f96c71c
Compare
@jcfr let me know if this is ready for final review |
This is ready for review. That said, I still need to update the ExtensionIndex based in the new schema and create PR on existing Extension. |
f96c71c
to
0a243fe
Compare
0a243fe
to
3f37a26
Compare
@lassoan This is now ready for final review. |
Anticipating the simplification of the metadata used to describe an extension Simplifies handling of metadata catalog entry, this removes the parsing and handling of metadata already defined in the extension CMakeLists.txt by the extension index build-system. The following metadata values are now extracted from the `<extensionname>.s4ext` file locally generated in the extension build tree: - "category" - "contributors" - "enabled" - "depends" (runtime dependencies) - "description" - "iconurl" - "homepage" - "screenshots" The only metadata values propagated from the Slicer/ExtensionsIndex files are the following: - "scm", "scmurl" and "scmrevision" - "depends" (built-time dependencies) - "build_subdirectory" The extension name is still derived from the catalog entry filename.
3f37a26
to
5a7fc3d
Compare
This commit implements changes to the Extensions build-system, transitioning from `.s4ext` files to `.json` files for extension index entries. Additionally, it updates the ExtensionWizard and module templates to reflect this change and supports contributing `.json` files to the ExtensionsIndex. As the category is now expected to be defined in the extension catalog entry file, the support for setting the "Category" directly from the ExtensionWizard UI has been removed. While a .s4ext file is still generated in the built-tree and included in the extension package, this is considered an implementation detail to be addressed in subsequent commits. The motivations behind these changes include: * Eliminate redundant and unused information from the "description" file. * Simplify programmatic parsing of the "description" files * Decouple the metadata organized in the extension `CMakeLists.txt` from the ones organized in this repository and used to drive the build of extensions. * Enable Slicer maintainers to define and update the extension "category" and "enabled" metadata independently of the upstream extension sources.
Co-authored-by: Andras Lasso <[email protected]>
5a7fc3d
to
e6151f3
Compare
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.
Impressive work Jc 👍
I don't see anything obviously wrong so if you are comfortable I think we should go ahead. We'll know for sure once we try it for real.
Thanks for the cursory check.
On the |
e6151f3
to
783f401
Compare
While ensuring Slicer/ExtensionsIndex#2011 was also passing, I realized I missed one update1 to the schema, this is now fixed. @pieper I would appreciate a re-approval Footnotes |
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.
👍
main
by force pushing. Corresponding changes are superseded by #7709Rational:
Squash & Merge
instead ofRebase & Merge
In response to discussions during the Slicer developer hangout on March 12th, we have decided to revamp the organization of extension metadata in the extensions index, transitioning from the s4ext format to json.
Implements changes to the Extensions build-system, transitioning from
.s4ext
files to.json
files for extension catalog entries. Additionally, it updates the ExtensionWizard and module templates to reflect this change and supports contributing.json
files to the ExtensionsIndex.As the category is now expected to be defined in the extension catalog entry file, the support for setting the "Category" directly from the ExtensionWizard UI has been removed.
While a .s4ext file is still generated in the built-tree and included in the extension package, this is considered an implementation detail to be addressed in subsequent commits.
The motivations behind these changes include:
CMakeLists.txt
fromthe ones organized in this repository and used to drive the build of extensions.
and "enabled" metadata independently of the upstream extension sources.
It removes the parsing and handling of metadata already defined in the extension
CMakeLists.txt
by the extension index build-system.The metadata values now extracted from the
<extensionname>.s4ext
file locally generated in the extension build tree are the following:The only metadata values propagated from the
Slicer/ExtensionsIndex
files now formatted as JSON files (<extensionname.json
) are the following:The extension name is still derived from the catalog entry filename.
Related:
Extension description may now use a limited subset1 of HTML tags and attributes.
Related pull requests:
Footnotes
https://github.com/matthiask/html-sanitizer#settings ↩