-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
initial version of diff command wrapper #966
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
0683f46
add initial version of wrapper for diff
davelopez d2cdc7a
add shed.yml
davelopez c3f563c
fix owner in shed.yml
davelopez b693733
remove macros.xml
davelopez 4de2f3c
Update tools/diff/diff.xml
davelopez e906a24
add diffutils requirement
davelopez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
categories: | ||
- Text Manipulation | ||
description: GNU diff tool that calculates the differences between two files. | ||
homepage_url: http://www.gnu.org/software/diffutils/ | ||
long_description: | | ||
The diff utility is a data comparison tool that calculates and displays the differences between two files. | ||
Unlike edit distance notions used for other purposes, diff is line-oriented rather than character-oriented, | ||
but it is like Levenshtein distance in that it tries to determine the smallest set of deletions and insertions | ||
to create one file from the other. The diff command displays the changes made in a standard format, such that | ||
both humans and machines can understand the changes and apply them: given one file and the changes, the other | ||
file can be created. | ||
name: diff | ||
owner: bgruening | ||
remote_repository_url: https://github.com/bgruening/galaxytools/tree/master/tools/diff | ||
type: unrestricted |
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,87 @@ | ||
<tool id="diff" name="diff" version="3.6+galaxy0"> | ||
|
||
<description>analyzes two files and generates a text file with information about the lines that are different.</description> | ||
davelopez marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<stdio> | ||
<exit_code range="2:" level="fatal" description="Something went wrong trying to check differences in files. Please check output log for more details." /> | ||
<regex match="diff: memory exhausted" source="stdout" level="fatal_oom" description="Out of memory error occurred" /> | ||
</stdio> | ||
|
||
<command ><![CDATA[ | ||
diff -u '$input1' '$input2' > '$output1' | ||
]]> | ||
</command> | ||
|
||
<inputs> | ||
<param name="input1" type="data" format="txt" label="First input file" /> | ||
<param name="input2" type="data" format="txt" label="Second input file" /> | ||
</inputs> | ||
|
||
<outputs> | ||
<data name="output1" format="txt" /> | ||
</outputs> | ||
|
||
<tests> | ||
<test expect_exit_code="0" expect_failure="false"> | ||
<param name="input1" value="file1.txt" /> | ||
<param name="input2" value="file1.txt" /> | ||
<output name="output1"> | ||
<assert_contents> | ||
<has_n_lines n="0" /> | ||
</assert_contents> | ||
</output> | ||
</test> | ||
<test expect_exit_code="1" expect_failure="false"> | ||
<param name="input1" value="file1.txt" /> | ||
<param name="input2" value="file2.txt" /> | ||
<output name="output1"> | ||
<assert_contents> | ||
<has_n_lines n="5" /> | ||
<has_line line=" a" /> | ||
<has_line line="+b" /> | ||
</assert_contents> | ||
</output> | ||
</test> | ||
</tests> | ||
|
||
<help><![CDATA[ | ||
.. class:: infomark | ||
|
||
**Purpose** | ||
|
||
The **diff** utility is a data comparison tool that calculates and displays the differences between two files. | ||
|
||
Unlike edit distance notions used for other purposes, diff is line-oriented rather than character-oriented, but it is like Levenshtein distance in that it tries to determine the smallest set of deletions and insertions to create one file from the other. | ||
|
||
The diff command displays the changes made in a standard format, such that both humans and machines can understand the changes and apply them: given one file and the changes, the other file can be created. | ||
|
||
.. class:: infomark | ||
|
||
**Input** | ||
|
||
Two text files to be checked for differences line by line. | ||
|
||
.. class:: infomark | ||
|
||
**Output** | ||
|
||
A *single text file*, either: | ||
|
||
- containing the lines differences in **unified format** (*unidiff*), | ||
|
||
- or an **empty** file if the two input files are the same. | ||
]]> | ||
</help> | ||
|
||
<citations> | ||
<citation type="bibtex"> | ||
@misc{gnudiffutils, | ||
author = {The Free Software Foundation (FSF), Inc}, | ||
year = {2017}, | ||
title = {diff (GNU diffutils)}, | ||
publisher = {The Free Software Foundation (FSF), Inc}, | ||
url = {http://www.gnu.org/software/diffutils/}, | ||
} | ||
</citation> | ||
</citations> | ||
</tool> |
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 @@ | ||
a |
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 @@ | ||
a | ||
b |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know if
diff
is part of the coreutils package? If so we should probably depend on this package.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added conda-forge package for diffutils 3.6 and requirement 😃