Skip to content

Latest commit

 

History

History
67 lines (48 loc) · 2.25 KB

index.rst

File metadata and controls

67 lines (48 loc) · 2.25 KB

Extension catalog model documentation

The extension catalog model is a pydantic model for creating, validating, reading and writing extension catalogs for use with an extension manager.

To create a catalog:

  • Install this package:
pip install git+https://github.com/qupath/extension-catalog-model.git
# create_catalog.py

from extension_catalog_model.model import *

version_range = VersionRange(min="v0.5.1")
release = Release(
   name="v0.1.0-rc5",
   main_url="https://github.com/qupath/qupath-extension-omero/releases/download/v0.1.0-rc5/qupath-extension-omero-0.1.0-rc5.jar",
   optional_dependency_urls=["https://github.com/ome/openmicroscopy/releases/download/v5.6.14/OMERO.java-5.6.14-ice36.zip"],
   version_range=version_range
)
extension = Extension(
   name="QuPath OMERO extension",
   description="QuPath extension to work with images through OMERO's APIs",
   author="QuPath",
   homepage="https://github.com/qupath/qupath-extension-omero",
   releases=[release]
)
catalog = Catalog(
   name="QuPath catalog",
   description="Extensions maintained by the QuPath team",
   extensions=[extension]
)

with open("catalog.json", "w") as file:
   file.write(catalog.model_dump_json(indent=2))
   print(file.name + " written")
python3 create_catalog.py
  • Create a GitHub repository.
  • Add the previously created catalog.json file to the repository.

An example can be found on the QuPath catalog repository.

Model specifications

.. toctree::
   :maxdepth: 2

   autodocs