-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
548 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# This file defines the base branch a PR is coming from (for example master or develop) | ||
baseBranch="develop" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# | ||
# Copyright 2022 OICR and UCSC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# This script determines if all changed files rst files in a PR have a discourse topic | ||
source base-branch.sh | ||
|
||
# Determines if a file has a discourse topic | ||
|
||
function containsDiscourseTopic { | ||
grep -A1 "^.. discourse::" $fileToCheck | tail -n1 | grep -E "^( )*:topic_identifier:( )*[0-9]+" > /dev/null | ||
if [ $? != 0 ] | ||
then | ||
echo "${fileToCheck} does not have a discourse topic" | ||
return 1 | ||
else | ||
return 0 | ||
fi | ||
} | ||
|
||
RETURN_VALUE=0 | ||
DOES_NOT_REQUIRE_DISCOURSE_TOPIC=no-discourse-topic-required.txt | ||
|
||
if [[ -n $CIRCLE_PULL_REQUEST ]] | ||
then | ||
# This step requires the variable CIRCLE_PULL_REQUEST to be set to the URL of the PR, | ||
# this is done automatically in CircleCI. | ||
# An example value of CIRCLE_PULL_REQUEST is https://github.com/dockstore/dockstore-documentation/pull/209 | ||
pr=$(echo $CIRCLE_PULL_REQUEST | sed 's+https://github.com+https://api.github.com/repos+' | sed 's/pull/pulls/') | ||
baseBranch="$(curl -s $pr | jq -r '.base.ref')" | ||
fi | ||
|
||
for file in $(git diff --name-only "$baseBranch".. | grep -E "*\.rst" | grep -Fvxf $DOES_NOT_REQUIRE_DISCOURSE_TOPIC) | ||
do | ||
fileToCheck=$file | ||
if ! containsDiscourseTopic | ||
then | ||
RETURN_VALUE=1 | ||
fi | ||
done | ||
|
||
if [ $RETURN_VALUE != 0 ] | ||
then | ||
echo "If your files do not require a discourse topic you can add them to ${DOES_NOT_REQUIRE_DISCOURSE_TOPIC}" | ||
else | ||
echo "All of the modified files have discourse topics" | ||
fi | ||
|
||
exit $RETURN_VALUE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
docs/advanced-topics/dockstore-cli/yaml-command-line-validator-tool.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
Dockstore Yaml Command Line Validator Tool | ||
========================================== | ||
|
||
Description | ||
----------------- | ||
|
||
The Dockstore Yaml Command Line Validator Tool is used to verify that a :ref:`dict .dockstore.yml` file is valid for use in Dockstore and that all referenced files are present. | ||
|
||
The Dockstore Yaml Command Line Validator Tool is particularly helpful when you are trying to sync a GitHub repository with Dockstore by adding a :ref:`dict .dockstore.yml` to the root or ``.github`` directory of the repository. As you can verify that :ref:`dict .dockstore.yml` is valid before pushing, and it can help you to determine why your repository is not syncing with Dockstore. | ||
|
||
The Dockstore Yaml Command Line Validator Tool will first determine if :ref:`dict .dockstore.yml` is a valid yaml file and display the following if :ref:`dict .dockstore.yml` is a valid yaml file (but not necessarily valid for use in Dockstore), | ||
|
||
:: | ||
|
||
path/to/.dockstore.yml is a valid yaml file | ||
|
||
|
||
If :ref:`dict .dockstore.yml` is not a valid yaml file the following will be displayed along with an error message explaining why :ref:`dict .dockstore.yml` is not a valid yaml file, | ||
|
||
:: | ||
|
||
path/to/.dockstore.yml is not a valid yaml file | ||
|
||
|
||
|
||
Next, the Dockstore Yaml Command Line Validator Tool will determine if :ref:`dict .dockstore.yml` is valid for use in Dockstore, if it is it will display this message, | ||
|
||
:: | ||
|
||
path/to/.dockstore.yml is a valid dockstore yaml file and all required files are present | ||
If :ref:`dict .dockstore.yml` is not a valid for use in Dockstore the Dockstore Yaml Command Line Validator Tool will display a helpful error message, such as, | ||
|
||
:: | ||
|
||
Your file structure has the following errors: | ||
path/to/dockstore.cwl.json does not exist | ||
|
||
or, | ||
|
||
:: | ||
|
||
path/to/.dockstore.yml has the following errors: | ||
Unknown property: 'primaryDescriptorath'. Did you mean: 'primaryDescriptorPath'? | ||
|
||
Usage | ||
----------------- | ||
|
||
The Dockstore Yaml Command Line Validator Tool can be used with the following command in the :ref:`dict Dockstore CLI`, | ||
|
||
:: | ||
|
||
dockstore yaml validate --path directory/of/.dockstore.yml | ||
|
||
Path Parameter | ||
``````````````` | ||
|
||
The ``--path`` parameter must be set to the directory that contains :ref:`dict .dockstore.yml`, but must not include :ref:`dict .dockstore.yml`. | ||
For example, | ||
|
||
:: | ||
|
||
path/to/my/awesome/workflow | ||
|
||
is acceptable, however | ||
|
||
:: | ||
|
||
path/to/my/awesome/workflow/.dockstore.yml | ||
|
||
is not acceptable. | ||
|
||
The ``--path`` parameter can be either an absolute or relative directory. Therefore, the following are valid uses of the Dockstore Yaml Command Line Validator Tool, | ||
|
||
:: | ||
|
||
dockstore yaml validate --path . | ||
|
||
|
||
:: | ||
|
||
dockstore yaml validate --path directory/of/.dockstore.yml | ||
|
||
:: | ||
|
||
dockstore yaml validate --path ../../path/to/service | ||
|
||
:: | ||
|
||
dockstore yaml validate --path ~/path/to/workflow | ||
|
||
:: | ||
|
||
dockstore yaml validate --path /usr/jdoe/dockstore/workflow | ||
|
||
|
||
Please note that all files referenced in :ref:`dict .dockstore.yml`, are checked relative to the path parameter, unless the path parameter ends in ``.github``, in this case all files referenced in :ref:`dict .dockstore.yml` are checked relative to the parent of the path parameter. | ||
|
||
For example if ``./my/awesome/workflow/.dockstore.yml`` contained the following, | ||
|
||
:: | ||
|
||
testParameterFiles: | ||
- /dockstore.wdl.json | ||
|
||
and you selected ``./my/awesome/workflow`` as the path parameter, then the Dockstore Yaml Command Line Validator Tool would check that the file ``./my/awesome/workflow/dockstore.wdl.json`` exists. | ||
|
||
However, if ``./my/fantastic/workflow/.github/.dockstore.yml`` contained the following, | ||
|
||
:: | ||
|
||
testParameterFiles: | ||
- /workflow.cwl.json | ||
|
||
and you selected ``./my/fantastic/workflow/.github`` as the path parameter, then the Dockstore Yaml Command Line Validator Tool would check that the file ``./my/fantastic/workflow/workflow.cwl.json`` exists. | ||
|
||
.. discourse:: | ||
:topic_identifier: 5577 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added
BIN
+2.06 KB
docs/assets/images/Dockstore_Logos_and_Icons/Dockstore-icon-black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.29 KB
docs/assets/images/Dockstore_Logos_and_Icons/Dockstore-icon-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.19 KB
...ssets/images/Dockstore_Logos_and_Icons/Dockstore-logo-horizontal-black-blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.6 KB
docs/assets/images/Dockstore_Logos_and_Icons/Dockstore-logo-horizontal-black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.53 KB
docs/assets/images/Dockstore_Logos_and_Icons/Dockstore-logo-horizontal-blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.39 KB
...ssets/images/Dockstore_Logos_and_Icons/Dockstore-logo-horizontal-white-blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.1 KB
docs/assets/images/Dockstore_Logos_and_Icons/Dockstore-logo-horizontal-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.84 KB
.../assets/images/Dockstore_Logos_and_Icons/Dockstore-logo-vertical-black-blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.34 KB
docs/assets/images/Dockstore_Logos_and_Icons/Dockstore-logo-vertical-black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.33 KB
docs/assets/images/Dockstore_Logos_and_Icons/Dockstore-logo-vertical-blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.08 KB
.../assets/images/Dockstore_Logos_and_Icons/Dockstore-logo-vertical-white-blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.79 KB
docs/assets/images/Dockstore_Logos_and_Icons/Dockstore-logo-vertical-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-35.4 KB
(64%)
docs/assets/images/docs/docker/dockerhub-python-descript.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-72.5 KB
(51%)
docs/assets/images/docs/galaxy/create_galaxy_environment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.