also include patch files in --new-pr and --update-pr#1852
Merged
boegel merged 14 commits intoeasybuilders:developfrom Aug 12, 2016
Merged
also include patch files in --new-pr and --update-pr#1852boegel merged 14 commits intoeasybuilders:developfrom
boegel merged 14 commits intoeasybuilders:developfrom
Conversation
easybuild/tools/github.py
Outdated
| if soft_name: | ||
| patch_specs.append((patch_path, soft_name)) | ||
| else: | ||
| raise EasyBuildError("Failed to determine software name to which patch file %s relates", patch_path) |
Member
There was a problem hiding this comment.
@Caylo please hoist this blob of code that determines patch_specs into a separate function, it'll help make things clearer since it's rather big (and will get bigger if the FIXME is handled)
| @param target_dir: (parent) target directory, should contain easybuild/easyconfigs subdirectory | ||
| @param soft_name: software name (to determine location to copy to) | ||
| @param target_file: target file name | ||
| @return: full path to the right location |
11 tasks
easybuild/tools/github.py
Outdated
|
|
||
| @param patch_name: name of the patch file | ||
| """ | ||
| robot_path = build_option('robot_path')[0] |
Member
There was a problem hiding this comment.
why the [0]? you're only considering the first entry in the robot search path? why?
| def copy_file(path, target_dir, soft_name, target_name): | ||
|
|
||
| target_path = det_location_for(path, target_dir, soft_name, target_name) | ||
| new = os.path.exists(target_path) |
Member
There was a problem hiding this comment.
move this out of this function, this should b a generic function to copy files (also: add a docstring)
|
|
||
|
|
||
| def copy_file(path, target_path): | ||
|
|
easybuild/tools/github.py
Outdated
| raise EasyBuildError("Path doesn't exist or file to delete isn't found in target branch: %s", fn) | ||
|
|
||
| # copy edited/added files to right place | ||
| file_info = copy_easyconfigs(ec_paths, repo_path) |
test/framework/github.py
Outdated
| 'validate': False, | ||
| }) | ||
| self.mock_stdout(True) | ||
| ec = gh.scan_all_easyconfigs('toy-0.0_typo.patch') |
Member
|
Going in, thanks @Caylo! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
building on #1751
cfr #1674