Skip to content

Commit 4ee5eb1

Browse files
committed
add modules directory
1 parent 398155f commit 4ee5eb1

2 files changed

Lines changed: 226 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema",
3+
"title": "conda environment yaml",
4+
"description": "Validate the environment.yml file for an nf-core module",
5+
"type": "object",
6+
"properties": {
7+
"name": {
8+
"type": "string",
9+
"description": "The name of the component, same as in the meta.yml"
10+
},
11+
"channels": {
12+
"type": "array",
13+
"items": [
14+
{
15+
"enum": ["conda-forge"]
16+
},
17+
{
18+
"enum": ["bioconda"]
19+
},
20+
{
21+
"enum": ["defaults"]
22+
}
23+
],
24+
"minItems": 3
25+
},
26+
"dependencies": {
27+
"type": "array",
28+
"items": {
29+
"type": "string"
30+
}
31+
}
32+
},
33+
"required": ["name", "channels", "dependencies"]
34+
}

modules/mirpedrol/meta-schema.json

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema",
3+
"title": "Meta yaml",
4+
"description": "Validate the meta yaml file for an nf-core module",
5+
"type": "object",
6+
"properties": {
7+
"name": {
8+
"type": "string",
9+
"description": "Name of the module"
10+
},
11+
"description": {
12+
"type": "string",
13+
"description": "Description of the module"
14+
},
15+
"keywords": {
16+
"type": "array",
17+
"description": "Keywords for the module",
18+
"items": {
19+
"type": "string"
20+
},
21+
"minItems": 3
22+
},
23+
"class": {
24+
"type": "string",
25+
"description": "Class of the module"
26+
},
27+
"authors": {
28+
"type": "array",
29+
"description": "Authors of the module",
30+
"items": {
31+
"type": "string"
32+
}
33+
},
34+
"maintainers": {
35+
"type": "array",
36+
"description": "Maintainers of the module",
37+
"items": {
38+
"type": "string"
39+
}
40+
},
41+
"input": {
42+
"type": "array",
43+
"description": "Input channels for the module",
44+
"items": {
45+
"type": "array",
46+
"items": { "$ref": "#/definitions/elementProperties" }
47+
}
48+
},
49+
"output": {
50+
"type": "array",
51+
"description": "Output channels for the module",
52+
"items": {
53+
"type": "object",
54+
"items": { "$ref": "#/definitions/elementProperties" }
55+
}
56+
},
57+
"tools": {
58+
"type": "array",
59+
"description": "Tools used by the module",
60+
"items": {
61+
"type": "object",
62+
"patternProperties": {
63+
".*": {
64+
"type": "object",
65+
"properties": {
66+
"description": {
67+
"type": "string",
68+
"description": "Description of the output channel"
69+
},
70+
"homepage": {
71+
"type": "string",
72+
"description": "Homepage of the tool",
73+
"pattern": "^(http|https)://.*$"
74+
},
75+
"documentation": {
76+
"type": "string",
77+
"description": "Documentation of the tool",
78+
"pattern": "^(http|https|ftp)://.*$"
79+
},
80+
"tool_dev_url": {
81+
"type": "string",
82+
"description": "URL of the development version of the tool's documentation",
83+
"pattern": "^(http|https)://.*$"
84+
},
85+
"doi": {
86+
"description": "DOI of the tool",
87+
"anyOf": [
88+
{
89+
"type": "string",
90+
"pattern": "^10\\.\\d{4,9}\\/[^,]+$"
91+
},
92+
{
93+
"type": "string",
94+
"enum": ["no DOI available"]
95+
}
96+
]
97+
},
98+
"licence": {
99+
"type": "array",
100+
"items": {
101+
"type": "string"
102+
},
103+
"description": "Licence of the tool",
104+
"minItems": 1,
105+
"uniqueItems": true,
106+
"message": "Licence must be an array of one or more entries, e.g. [\"MIT\"]"
107+
},
108+
"identifier": {
109+
"type": "string",
110+
"description": "bio.tools identifier of the tool",
111+
"oneOf": [
112+
{
113+
"type": "string",
114+
"pattern": "^biotools:.*$"
115+
},
116+
{
117+
"type": "string",
118+
"enum": [""]
119+
}
120+
]
121+
}
122+
},
123+
"required": ["description"],
124+
"anyOf": [
125+
{
126+
"required": ["homepage"]
127+
},
128+
{
129+
"required": ["documentation"]
130+
},
131+
{
132+
"required": ["tool_dev_url"]
133+
},
134+
{
135+
"required": ["doi"]
136+
}
137+
]
138+
}
139+
}
140+
}
141+
}
142+
},
143+
"definitions": {
144+
"elementProperties": {
145+
"type": "object",
146+
"patternProperties": {
147+
".*": {
148+
"type": "object",
149+
"properties": {
150+
"type": {
151+
"type": "string",
152+
"description": "Type of the channel element",
153+
"enum": ["map", "file", "directory", "string", "integer", "float", "boolean", "list"]
154+
},
155+
"description": {
156+
"type": "string",
157+
"description": "Description of the channel"
158+
},
159+
"pattern": {
160+
"type": "string",
161+
"description": "Pattern of the channel, given in Java glob syntax"
162+
},
163+
"enum": {
164+
"type": "array",
165+
"description": "List of allowed values for the channel",
166+
"items": {
167+
"type": ["string", "number", "boolean", "array", "object"]
168+
},
169+
"uniqueItems": true
170+
},
171+
"ontologies": {
172+
"type": "array",
173+
"description": "List of ontologies for the channel",
174+
"uniqueItems": true,
175+
"items": {
176+
"type": "object",
177+
"patternProperties": {
178+
".*": {
179+
"type": "string",
180+
"pattern": "^(http|https)://.*"
181+
}
182+
}
183+
}
184+
}
185+
},
186+
"required": ["type", "description"]
187+
}
188+
}
189+
}
190+
},
191+
"required": ["name", "description", "keywords", "authors", "output", "tools"]
192+
}

0 commit comments

Comments
 (0)