diff --git a/_includes/instance-dropdown.html b/_includes/instance-dropdown.html
index 42f307c21d5a15..f97b4073477bc4 100644
--- a/_includes/instance-dropdown.html
+++ b/_includes/instance-dropdown.html
@@ -19,7 +19,7 @@
{% for inst in usegalaxy_exact %}
- {{ inst.name }} ✅ ⭐️
+ {{ inst.name }} ✅ ⭐️
{% endfor %}
diff --git a/_plugins/api.rb b/_plugins/api.rb
index 8f42c0b72a5dbb..480817611fb61d 100644
--- a/_plugins/api.rb
+++ b/_plugins/api.rb
@@ -375,6 +375,26 @@ def generate(site)
Jekyll::Hooks.register :site, :post_write do |site|
dir = File.join(site.dest, 'api', 'workflows')
+ # Public tool listing: reorganised
+ if site.data['public-server-tools'] and site.data['public-server-tools']['tools']
+ site.data['public-server-tools']['tools'].each do |tool, version_data|
+ path = File.join(site.dest, 'api', 'psl', "#{tool}.json")
+ dir = File.dirname(path)
+ FileUtils.mkdir_p(dir) unless File.directory?(dir)
+
+ d = version_data.dup
+ d.keys.each do |k|
+ # Replace the indexes with the server URLs from site['public-server-tools']['servers']
+ d[k] = d[k].map { |v| site.data['public-server-tools']['servers'][v] }
+ end
+
+ File.write(path, JSON.generate(d))
+ end
+ Jekyll.logger.debug "[GTN/API/PSL] PSL written"
+ else
+ Jekyll.logger.debug "[GTN/API/PSL] PSL Dataset not available, are you in a CI environment?"
+ end
+
# ro-crate-metadata.json
TopicFilter.list_all_materials(site).select { |m| m['workflows'] }.each do |material|
material['workflows'].each do |workflow|
diff --git a/api/swagger.json b/api/swagger.json
index 27e6a39ac17ce9..ed10cef2accb5e 100644
--- a/api/swagger.json
+++ b/api/swagger.json
@@ -345,6 +345,58 @@
}
}
}
+ },
+ "/psl.json": {
+ "get": {
+ "tags": [
+ "tools"
+ ],
+ "summary": "Get the GTN's public server tool listing. It lists all known public servers that are reachable at the time of the GTN's deployment, and which tool versions are installed on each of those servers.",
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Psl"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/psl/{toolId}.json": {
+ "get": {
+ "tags": [
+ "tools"
+ ],
+ "parameters": [
+ {
+ "name": "toolId",
+ "in": "path",
+ "example": "toolshed.g2.bx.psu.edu/repos/iuc/abricate/abricate",
+ "description": "Tool ID WITHOUT the version component!!",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "summary": "Get the GTN's public server tool listing for a specific tool ID. It lists all known public servers that are reachable at the time of the GTN's deployment, and which versions of this tool are available. It's very important that you strip the version component!",
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/PslIndividual"
+ }
+ }
+ }
+ }
+ }
+ }
}
},
"components": {
@@ -571,6 +623,53 @@
}
}
}
+ },
+ "Psl": {
+ "type": "object",
+ "properties": {
+ "servers": {
+ "$ref": "#/components/schemas/ArrayOfServers"
+ },
+ "tools": {
+ "$ref": "#/components/schemas/ArrayOfToolVersions"
+ }
+ }
+ },
+ "PslIndividual": {
+ "$ref": "#/components/schemas/ToolVersionClear"
+ },
+ "ArrayOfServers": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Server"
+ }
+ },
+ "Server": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string",
+ "description": "A url for the server"
+ },
+ "name": {
+ "type": "string",
+ "description": "A human readable description"
+ }
+ }
+ },
+ "ArrayOfToolVersions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ToolVersionOpaque"
+ }
+ },
+ "ToolVersionOpaque": {
+ "type": "object",
+ "description": "A hash/dict where the top level keys are the known versions of that tool (or '_' for built in tools), and then the servers that have that tool. Note that the servers are actually a list of integers which refer to the Server listing field."
+ },
+ "ToolVersionClear": {
+ "type": "object",
+ "description": "A hash/dict where the top level keys are the known versions of that tool (or '_' for built in tools), and then the servers that have that tool."
}
}
}
diff --git a/metadata/swagger.yaml b/metadata/swagger.yaml
index b0862370408f34..2156405bc22b7b 100644
--- a/metadata/swagger.yaml
+++ b/metadata/swagger.yaml
@@ -225,6 +225,40 @@ paths:
200:
description: successful operation
+ /psl.json:
+ get:
+ tags:
+ - tools
+ summary: Get the GTN's public server tool listing. It lists all known public servers that are reachable at the time of the GTN's deployment, and which tool versions are installed on each of those servers.
+ responses:
+ 200:
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Psl'
+
+ /psl/{toolId}.json:
+ get:
+ tags:
+ - tools
+ parameters:
+ - name: toolId
+ in: path
+ example: toolshed.g2.bx.psu.edu/repos/iuc/abricate/abricate
+ description: Tool ID WITHOUT the version component!! Also when you call it properly you do NOT need to encode the /.
+ required: true
+ schema:
+ type: string
+ summary: Get the GTN's public server tool listing for a specific tool ID. It lists all known public servers that are reachable at the time of the GTN's deployment, and which versions of this tool are available. It's very important that you strip the version component!
+ responses:
+ 200:
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PslIndividual'
+
components:
schemas:
TrainingMaterial:
@@ -389,3 +423,35 @@ components:
type: array
items:
$ref: '#/components/schemas/TrainingMaterial'
+ Psl:
+ type: object
+ properties:
+ servers:
+ $ref: '#/components/schemas/ArrayOfServers'
+ tools:
+ $ref: '#/components/schemas/ArrayOfToolVersions'
+ PslIndividual:
+ $ref: '#/components/schemas/ToolVersionClear'
+ ArrayOfServers:
+ type: array
+ items:
+ $ref: "#/components/schemas/Server"
+ Server:
+ type: object
+ properties:
+ url:
+ type: string
+ description: A url for the server
+ name:
+ type: string
+ description: A human readable description
+ ArrayOfToolVersions:
+ type: array
+ items:
+ $ref: "#/components/schemas/ToolVersionOpaque"
+ ToolVersionOpaque:
+ type: object
+ description: A hash/dict where the top level keys are the known versions of that tool (or '_' for built in tools), and then the servers that have that tool. Note that the servers are actually a list of integers which refer to the Server listing field.
+ ToolVersionClear:
+ type: object
+ description: A hash/dict where the top level keys are the known versions of that tool (or '_' for built in tools), and then the servers that have that tool.