diff --git a/.github/workflows/json-lint.yml b/.github/workflows/json-lint.yml new file mode 100644 index 0000000..17a8273 --- /dev/null +++ b/.github/workflows/json-lint.yml @@ -0,0 +1,20 @@ +name: JSON Lint + +on: + pull_request: + paths: + - '**.json' + push: + branches: + - main + paths: + - '**.json' + +jobs: + json-lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - uses: j178/prek-action@v1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..0bc7006 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,23 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: check-json + name: Check JSON syntax + + - repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.36.1 + hooks: + - id: check-jsonschema + name: Validate plugins.json schema + files: ^(_data/)?plugins\.json$ + args: ["--schemafile", "plugins.schema.json"] + + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v3.1.0 + hooks: + - id: prettier + types: [json] + name: Format JSON with Prettier + additional_dependencies: + - prettier@3.8.1 diff --git a/plugins.json b/plugins.json index 16cf6ab..2d35b01 100644 --- a/plugins.json +++ b/plugins.json @@ -1,176 +1,224 @@ -[{ - "id": "nft-fasta", - "latest": "1.0.0", - "url": "https://github.com/askimed/nft-fasta", - "github": "askimed/nft-fasta", - "description": "Provides support for FASTA files.", - "author": "Lukas Forer", - "keywords": [], - "releases": [{ - "version": "1.0.0", - "url": "https://github.com/askimed/nft-fasta/releases/download/v1.0.0/nft-fasta-1.0.0.jar" - }] -},{ - "id": "nft-vcf", - "latest": "1.0.7", - "url": "https://github.com/seppinho/nft-vcf", - "github": "seppinho/nft-vcf", - "description": "Provides support for VCF files.", - "author": "Sebastian Schönherr", - "keywords": [], - "releases": [{ - "version": "1.0.2", - "url": "https://github.com/seppinho/nft-vcf/releases/download/v1.0.2/nft-vcf-1.0.2-jar-with-dependencies.jar" - },{ - "version": "1.0.4", - "url": "https://github.com/seppinho/nft-vcf/releases/download/v1.0.4/nft-vcf-1.0.4.jar" - },{ - "version": "1.0.5", - "url": "https://github.com/seppinho/nft-vcf/releases/download/v1.0.5/nft-vcf-1.0.5.jar" - },{ - "version": "1.0.6", - "url": "https://github.com/seppinho/nft-vcf/releases/download/v1.0.6/nft-vcf-1.0.6.jar" - },{ - "version": "1.0.7", - "url": "https://github.com/seppinho/nft-vcf/releases/download/v1.0.7/nft-vcf-1.0.7.jar" - }] -},{ - "id": "nft-bam", - "latest": "0.6.0", - "url": "https://nvnieuwk.github.io/nft-bam", - "github": "nvnieuwk/nft-bam", - "description": "Provides some helper functionality for handling SAM/BAM/CRAM files during tests", - "author": "Nicolas Vannieuwkerke", - "keywords": [], - "releases": [{ - "version": "0.1.0", - "url": "https://github.com/nvnieuwk/nft-bam/releases/download/0.1.0/nft-bam-0.1.0.jar" - },{ - "version": "0.1.1", - "url": "https://github.com/nvnieuwk/nft-bam/releases/download/0.1.1/nft-bam-0.1.1.jar" - },{ - "version": "0.2.0", - "url": "https://github.com/nvnieuwk/nft-bam/releases/download/0.2.0/nft-bam-0.2.0.jar" - },{ - "version": "0.3.0", - "url": "https://github.com/nvnieuwk/nft-bam/releases/download/0.3.0/nft-bam-0.3.0.jar" - },{ - "version": "0.4.0", - "url": "https://github.com/nvnieuwk/nft-bam/releases/download/0.4.0/nft-bam-0.4.0.jar" - },{ - "version": "0.5.0", - "url": "https://github.com/nvnieuwk/nft-bam/releases/download/0.5.0/nft-bam-0.5.0.jar" - },{ - "version": "0.6.0", - "url": "https://github.com/nvnieuwk/nft-bam/releases/download/0.6.0/nft-bam-0.6.0.jar" - }] -},{ - "id": "nft-compress", - "latest": "0.1.0", - "url": "https://github.com/lukfor/nft-compress", - "github": "lukfor/nft-compress", - "description": "Provides support for ZIP files.", - "author": "Lukas Forer", - "keywords": [], - "releases": [{ - "version": "0.1.0", - "url": "https://github.com/lukfor/nft-compress/releases/download/0.1.0/nft-compress-0.1.0.jar" - }] -},{ - "id": "nft-csv", - "latest": "0.1.0", - "url": "https://github.com/lukfor/nft-csv", - "github": "lukfor/nft-csv", - "description": "Provides support for CSV files.", - "author": "Lukas Forer", - "keywords": [], - "releases": [{ - "version": "0.1.0", - "url": "https://github.com/lukfor/nft-csv/releases/download/0.1.0/nft-csv-0.1.0.jar" - }] -},{ - "id": "nft-utils", - "latest": "0.0.9", - "url": "https://github.com/nf-core/nft-utils", - "github": "nf-core/nft-utils", - "description": "nf-test utility functions for Nextflow pipelines.", - "author": "nf-core", - "keywords": [], - "releases": [{ - "version": "0.0.1", - "url": "https://github.com/nf-core/nft-utils/releases/download/0.0.1/nft-utils-0.0.1.jar" - },{ - "version": "0.0.2", - "url": "https://github.com/nf-core/nft-utils/releases/download/0.0.2/nft-utils-0.0.2.jar" - },{ - "version": "0.0.3", - "url": "https://github.com/nf-core/nft-utils/releases/download/0.0.3/nft-utils-0.0.3.jar" - },{ - "version": "0.0.4", - "url": "https://github.com/nf-core/nft-utils/releases/download/0.0.4/nft-utils-0.0.4.jar" - },{ - "version": "0.0.5", - "url": "https://github.com/nf-core/nft-utils/releases/download/0.0.5/nft-utils-0.0.5.jar" - },{ - "version": "0.0.6", - "url": "https://github.com/nf-core/nft-utils/releases/download/0.0.6/nft-utils-0.0.6.jar" - },{ - "version": "0.0.7", - "url": "https://github.com/nf-core/nft-utils/releases/download/0.0.7/nft-utils-0.0.7.jar" - },{ - "version": "0.0.8", - "url": "https://github.com/nf-core/nft-utils/releases/download/0.0.8/nft-utils-0.0.8.jar" - },{ - "version": "0.0.9", - "url": "https://github.com/nf-core/nft-utils/releases/download/0.0.9/nft-utils-0.0.9.jar" - }] -},{ - "id": "nft-fastq", - "latest": "0.0.1", - "url": "https://github.com/lukfor/nft-fastq", - "github": "lukfor/nft-fastq", - "description": "Provides support for FASTQ files.", - "author": "Lukas Forer", - "keywords": [], - "releases": [{ - "version": "0.0.1", - "url": "https://github.com/lukfor/nft-fastq/releases/download/v0.0.1/nft-fastq-0.0.1-all.jar" - }] -}, { - "id": "nft-anndata", - "latest": "0.1.0", - "url": "https://github.com/nictru/nft-anndata", - "github": "nictru/nft-anndata", - "description": "Provides support for AnnData (h5ad) files.", - "author": "Nico Trummer", - "keywords": [], - "releases": [{ - "version": "0.1.0", - "url": "https://github.com/nictru/nft-anndata/releases/download/v0.1.0/nft-anndata-0.1.0.jar" - }] -}, { - "id": "nft-tiff", - "latest": "0.1.0", - "url": "https://github.com/nf-core/nft-tiff", - "github": "nf-core/nft-tiff", - "description": "Provides support for TIFF files.", - "author": "nf-core", - "keywords": [], - "releases": [{ - "version": "0.1.0", - "url": "https://github.com/nf-core/nft-tiff/releases/download/v0.1.0/nft-tiff-0.1.0.jar" - }] -}, { - "id": "nft-parquet", - "latest": "0.0.1", - "url": "https://github.com/incsteps/nft-parquet", - "github": "incsteps/nft-parquet", - "description": "Provides support for Parquet files.", - "author": "Jorge Aguilera", - "keywords": ["parquet"], - "releases": [{ - "version": "0.0.1", - "url": "https://github.com/incsteps/nft-parquet/releases/download/0.0.1/nft-parquet-0.0.1.jar" - }] -} +[ + { + "id": "nft-fasta", + "latest": "1.0.0", + "url": "https://github.com/askimed/nft-fasta", + "github": "askimed/nft-fasta", + "description": "Provides support for FASTA files.", + "author": "Lukas Forer", + "keywords": [], + "releases": [ + { + "version": "1.0.0", + "url": "https://github.com/askimed/nft-fasta/releases/download/v1.0.0/nft-fasta-1.0.0.jar" + } + ] + }, + { + "id": "nft-vcf", + "latest": "1.0.7", + "url": "https://github.com/seppinho/nft-vcf", + "github": "seppinho/nft-vcf", + "description": "Provides support for VCF files.", + "author": "Sebastian Schönherr", + "keywords": [], + "releases": [ + { + "version": "1.0.2", + "url": "https://github.com/seppinho/nft-vcf/releases/download/v1.0.2/nft-vcf-1.0.2-jar-with-dependencies.jar" + }, + { + "version": "1.0.4", + "url": "https://github.com/seppinho/nft-vcf/releases/download/v1.0.4/nft-vcf-1.0.4.jar" + }, + { + "version": "1.0.5", + "url": "https://github.com/seppinho/nft-vcf/releases/download/v1.0.5/nft-vcf-1.0.5.jar" + }, + { + "version": "1.0.6", + "url": "https://github.com/seppinho/nft-vcf/releases/download/v1.0.6/nft-vcf-1.0.6.jar" + }, + { + "version": "1.0.7", + "url": "https://github.com/seppinho/nft-vcf/releases/download/v1.0.7/nft-vcf-1.0.7.jar" + } + ] + }, + { + "id": "nft-bam", + "latest": "0.6.0", + "url": "https://nvnieuwk.github.io/nft-bam", + "github": "nvnieuwk/nft-bam", + "description": "Provides some helper functionality for handling SAM/BAM/CRAM files during tests", + "author": "Nicolas Vannieuwkerke", + "keywords": [], + "releases": [ + { + "version": "0.1.0", + "url": "https://github.com/nvnieuwk/nft-bam/releases/download/0.1.0/nft-bam-0.1.0.jar" + }, + { + "version": "0.1.1", + "url": "https://github.com/nvnieuwk/nft-bam/releases/download/0.1.1/nft-bam-0.1.1.jar" + }, + { + "version": "0.2.0", + "url": "https://github.com/nvnieuwk/nft-bam/releases/download/0.2.0/nft-bam-0.2.0.jar" + }, + { + "version": "0.3.0", + "url": "https://github.com/nvnieuwk/nft-bam/releases/download/0.3.0/nft-bam-0.3.0.jar" + }, + { + "version": "0.4.0", + "url": "https://github.com/nvnieuwk/nft-bam/releases/download/0.4.0/nft-bam-0.4.0.jar" + }, + { + "version": "0.5.0", + "url": "https://github.com/nvnieuwk/nft-bam/releases/download/0.5.0/nft-bam-0.5.0.jar" + }, + { + "version": "0.6.0", + "url": "https://github.com/nvnieuwk/nft-bam/releases/download/0.6.0/nft-bam-0.6.0.jar" + } + ] + }, + { + "id": "nft-compress", + "latest": "0.1.0", + "url": "https://github.com/lukfor/nft-compress", + "github": "lukfor/nft-compress", + "description": "Provides support for ZIP files.", + "author": "Lukas Forer", + "keywords": [], + "releases": [ + { + "version": "0.1.0", + "url": "https://github.com/lukfor/nft-compress/releases/download/0.1.0/nft-compress-0.1.0.jar" + } + ] + }, + { + "id": "nft-csv", + "latest": "0.1.0", + "url": "https://github.com/lukfor/nft-csv", + "github": "lukfor/nft-csv", + "description": "Provides support for CSV files.", + "author": "Lukas Forer", + "keywords": [], + "releases": [ + { + "version": "0.1.0", + "url": "https://github.com/lukfor/nft-csv/releases/download/0.1.0/nft-csv-0.1.0.jar" + } + ] + }, + { + "id": "nft-utils", + "latest": "0.0.9", + "url": "https://github.com/nf-core/nft-utils", + "github": "nf-core/nft-utils", + "description": "nf-test utility functions for Nextflow pipelines.", + "author": "nf-core", + "keywords": [], + "releases": [ + { + "version": "0.0.1", + "url": "https://github.com/nf-core/nft-utils/releases/download/0.0.1/nft-utils-0.0.1.jar" + }, + { + "version": "0.0.2", + "url": "https://github.com/nf-core/nft-utils/releases/download/0.0.2/nft-utils-0.0.2.jar" + }, + { + "version": "0.0.3", + "url": "https://github.com/nf-core/nft-utils/releases/download/0.0.3/nft-utils-0.0.3.jar" + }, + { + "version": "0.0.4", + "url": "https://github.com/nf-core/nft-utils/releases/download/0.0.4/nft-utils-0.0.4.jar" + }, + { + "version": "0.0.5", + "url": "https://github.com/nf-core/nft-utils/releases/download/0.0.5/nft-utils-0.0.5.jar" + }, + { + "version": "0.0.6", + "url": "https://github.com/nf-core/nft-utils/releases/download/0.0.6/nft-utils-0.0.6.jar" + }, + { + "version": "0.0.7", + "url": "https://github.com/nf-core/nft-utils/releases/download/0.0.7/nft-utils-0.0.7.jar" + }, + { + "version": "0.0.8", + "url": "https://github.com/nf-core/nft-utils/releases/download/0.0.8/nft-utils-0.0.8.jar" + }, + { + "version": "0.0.9", + "url": "https://github.com/nf-core/nft-utils/releases/download/0.0.9/nft-utils-0.0.9.jar" + } + ] + }, + { + "id": "nft-fastq", + "latest": "0.0.1", + "url": "https://github.com/lukfor/nft-fastq", + "github": "lukfor/nft-fastq", + "description": "Provides support for FASTQ files.", + "author": "Lukas Forer", + "keywords": [], + "releases": [ + { + "version": "0.0.1", + "url": "https://github.com/lukfor/nft-fastq/releases/download/v0.0.1/nft-fastq-0.0.1-all.jar" + } + ] + }, + { + "id": "nft-anndata", + "latest": "0.1.0", + "url": "https://github.com/nictru/nft-anndata", + "github": "nictru/nft-anndata", + "description": "Provides support for AnnData (h5ad) files.", + "author": "Nico Trummer", + "keywords": [], + "releases": [ + { + "version": "0.1.0", + "url": "https://github.com/nictru/nft-anndata/releases/download/v0.1.0/nft-anndata-0.1.0.jar" + } + ] + }, + { + "id": "nft-tiff", + "latest": "0.1.0", + "url": "https://github.com/nf-core/nft-tiff", + "github": "nf-core/nft-tiff", + "description": "Provides support for TIFF files.", + "author": "nf-core", + "keywords": [], + "releases": [ + { + "version": "0.1.0", + "url": "https://github.com/nf-core/nft-tiff/releases/download/v0.1.0/nft-tiff-0.1.0.jar" + } + ] + }, + { + "id": "nft-parquet", + "latest": "0.0.1", + "url": "https://github.com/incsteps/nft-parquet", + "github": "incsteps/nft-parquet", + "description": "Provides support for Parquet files.", + "author": "Jorge Aguilera", + "keywords": ["parquet"], + "releases": [ + { + "version": "0.0.1", + "url": "https://github.com/incsteps/nft-parquet/releases/download/0.0.1/nft-parquet-0.0.1.jar" + } + ] + } ] diff --git a/plugins.schema.json b/plugins.schema.json new file mode 100644 index 0000000..ce3220c --- /dev/null +++ b/plugins.schema.json @@ -0,0 +1,81 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "latest", + "url", + "github", + "description", + "author", + "keywords", + "releases" + ], + "properties": { + "id": { + "type": "string", + "minLength": 1, + "description": "Unique identifier for the plugin" + }, + "latest": { + "type": "string", + "minLength": 1, + "description": "Latest version of the plugin", + "pattern": "^\\d+\\.\\d+\\.\\d+$" + }, + "url": { + "type": "string", + "minLength": 1, + "format": "uri", + "description": "URL to the plugin repository" + }, + "github": { + "type": "string", + "minLength": 1, + "description": "GitHub repository in format owner/repo", + "pattern": "^[^/]+/[^/]+$" + }, + "description": { + "type": "string", + "minLength": 1, + "description": "Description of the plugin" + }, + "author": { + "type": "string", + "minLength": 1, + "description": "Author of the plugin" + }, + "keywords": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Keywords associated with the plugin" + }, + "releases": { + "type": "array", + "additionalProperties": false, + "minItems": 1, + "items": { + "type": "object", + "required": ["version", "url"], + "properties": { + "version": { + "type": "string", + "description": "Version of the release", + "pattern": "^\\d+\\.\\d+\\.\\d+$" + }, + "url": { + "type": "string", + "format": "uri", + "description": "Download URL for the release" + } + } + } + } + } + } +}