{"action":"opened","number":10893,"pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/10893","id":33617400,"html_url":"https://github.com/JuliaLang/julia/pull/10893","diff_url":"https://github.com/JuliaLang/julia/pull/10893.diff","patch_url":"https://github.com/JuliaLang/julia/pull/10893.patch","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/10893","number":10893,"state":"open","locked":false,"title":"adds_function_relpath, docs, tests","user":{"login":"peter1000","id":6168860,"avatar_url":"https://avatars.githubusercontent.com/u/6168860?v=3","gravatar_id":"","url":"https://api.github.com/users/peter1000","html_url":"https://github.com/peter1000","followers_url":"https://api.github.com/users/peter1000/followers","following_url":"https://api.github.com/users/peter1000/following{/other_user}","gists_url":"https://api.github.com/users/peter1000/gists{/gist_id}","starred_url":"https://api.github.com/users/peter1000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peter1000/subscriptions","organizations_url":"https://api.github.com/users/peter1000/orgs","repos_url":"https://api.github.com/users/peter1000/repos","events_url":"https://api.github.com/users/peter1000/events{/privacy}","received_events_url":"https://api.github.com/users/peter1000/received_events","type":"User","site_admin":false},"body":"hi @tkelman\r\n\r\nThis adds function `relpath` which has similar functionalities as python's [os.path.relpath](https://docs.python.org/3.4/library/os.path.html#os.path.relpath)\r\n\r\n*Return a relative filepath to path either from the current directory or from an optional start directory. This is a path computation: the filesystem is not accessed to confirm the existence or nature of path or start.*\r\n\r\nI tested it first with expected results generated by python's implementation to be on the save side (hopefully).\r\n\r\nCheers\r\nP\r\n\r\nAt the moment this is the last julia `File related function` I thought would be worthy to be included.\r\n\r\ne.g. Docile/Lexicon uses it already [Lexicon.jl](https://github.com/MichaelHatherly/Lexicon.jl/blob/master/src/render.jl#L113)","created_at":"2015-04-19T11:32:03Z","updated_at":"2015-04-19T11:32:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/JuliaLang/julia/pulls/10893/commits","review_comments_url":"https://api.github.com/repos/JuliaLang/julia/pulls/10893/comments","review_comment_url":"https://api.github.com/repos/JuliaLang/julia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/10893/comments","statuses_url":"https://api.github.com/repos/JuliaLang/julia/statuses/e3302bf2cb1a63f1e702dac75b30db87921725cf","head":{"label":"peter1000:adds_function_relpath","ref":"adds_function_relpath","sha":"e3302bf2cb1a63f1e702dac75b30db87921725cf","user":{"login":"peter1000","id":6168860,"avatar_url":"https://avatars.githubusercontent.com/u/6168860?v=3","gravatar_id":"","url":"https://api.github.com/users/peter1000","html_url":"https://github.com/peter1000","followers_url":"https://api.github.com/users/peter1000/followers","following_url":"https://api.github.com/users/peter1000/following{/other_user}","gists_url":"https://api.github.com/users/peter1000/gists{/gist_id}","starred_url":"https://api.github.com/users/peter1000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peter1000/subscriptions","organizations_url":"https://api.github.com/users/peter1000/orgs","repos_url":"https://api.github.com/users/peter1000/repos","events_url":"https://api.github.com/users/peter1000/events{/privacy}","received_events_url":"https://api.github.com/users/peter1000/received_events","type":"User","site_admin":false},"repo":{"id":31510655,"name":"julia","full_name":"peter1000/julia","owner":{"login":"peter1000","id":6168860,"avatar_url":"https://avatars.githubusercontent.com/u/6168860?v=3","gravatar_id":"","url":"https://api.github.com/users/peter1000","html_url":"https://github.com/peter1000","followers_url":"https://api.github.com/users/peter1000/followers","following_url":"https://api.github.com/users/peter1000/following{/other_user}","gists_url":"https://api.github.com/users/peter1000/gists{/gist_id}","starred_url":"https://api.github.com/users/peter1000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peter1000/subscriptions","organizations_url":"https://api.github.com/users/peter1000/orgs","repos_url":"https://api.github.com/users/peter1000/repos","events_url":"https://api.github.com/users/peter1000/events{/privacy}","received_events_url":"https://api.github.com/users/peter1000/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/peter1000/julia","description":"The Julia Language: A fresh approach to technical computing.","fork":true,"url":"https://api.github.com/repos/peter1000/julia","forks_url":"https://api.github.com/repos/peter1000/julia/forks","keys_url":"https://api.github.com/repos/peter1000/julia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peter1000/julia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peter1000/julia/teams","hooks_url":"https://api.github.com/repos/peter1000/julia/hooks","issue_events_url":"https://api.github.com/repos/peter1000/julia/issues/events{/number}","events_url":"https://api.github.com/repos/peter1000/julia/events","assignees_url":"https://api.github.com/repos/peter1000/julia/assignees{/user}","branches_url":"https://api.github.com/repos/peter1000/julia/branches{/branch}","tags_url":"https://api.github.com/repos/peter1000/julia/tags","blobs_url":"https://api.github.com/repos/peter1000/julia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peter1000/julia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peter1000/julia/git/refs{/sha}","trees_url":"https://api.github.com/repos/peter1000/julia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peter1000/julia/statuses/{sha}","languages_url":"https://api.github.com/repos/peter1000/julia/languages","stargazers_url":"https://api.github.com/repos/peter1000/julia/stargazers","contributors_url":"https://api.github.com/repos/peter1000/julia/contributors","subscribers_url":"https://api.github.com/repos/peter1000/julia/subscribers","subscription_url":"https://api.github.com/repos/peter1000/julia/subscription","commits_url":"https://api.github.com/repos/peter1000/julia/commits{/sha}","git_commits_url":"https://api.github.com/repos/peter1000/julia/git/commits{/sha}","comments_url":"https://api.github.com/repos/peter1000/julia/comments{/number}","issue_comment_url":"https://api.github.com/repos/peter1000/julia/issues/comments{/number}","contents_url":"https://api.github.com/repos/peter1000/julia/contents/{+path}","compare_url":"https://api.github.com/repos/peter1000/julia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peter1000/julia/merges","archive_url":"https://api.github.com/repos/peter1000/julia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peter1000/julia/downloads","issues_url":"https://api.github.com/repos/peter1000/julia/issues{/number}","pulls_url":"https://api.github.com/repos/peter1000/julia/pulls{/number}","milestones_url":"https://api.github.com/repos/peter1000/julia/milestones{/number}","notifications_url":"https://api.github.com/repos/peter1000/julia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peter1000/julia/labels{/name}","releases_url":"https://api.github.com/repos/peter1000/julia/releases{/id}","created_at":"2015-03-01T21:02:26Z","updated_at":"2015-04-19T09:10:42Z","pushed_at":"2015-04-19T11:18:53Z","git_url":"git://github.com/peter1000/julia.git","ssh_url":"git@github.com:peter1000/julia.git","clone_url":"https://github.com/peter1000/julia.git","svn_url":"https://github.com/peter1000/julia","homepage":"http://julialang.org/","size":67891,"stargazers_count":0,"watchers_count":0,"language":"Julia","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"JuliaLang:master","ref":"master","sha":"8f69307cef149405fe2908bccdb2d721ba28cfe1","user":{"login":"JuliaLang","id":743164,"avatar_url":"https://avatars.githubusercontent.com/u/743164?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaLang","html_url":"https://github.com/JuliaLang","followers_url":"https://api.github.com/users/JuliaLang/followers","following_url":"https://api.github.com/users/JuliaLang/following{/other_user}","gists_url":"https://api.github.com/users/JuliaLang/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaLang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaLang/subscriptions","organizations_url":"https://api.github.com/users/JuliaLang/orgs","repos_url":"https://api.github.com/users/JuliaLang/repos","events_url":"https://api.github.com/users/JuliaLang/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaLang/received_events","type":"Organization","site_admin":false},"repo":{"id":1644196,"name":"julia","full_name":"JuliaLang/julia","owner":{"login":"JuliaLang","id":743164,"avatar_url":"https://avatars.githubusercontent.com/u/743164?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaLang","html_url":"https://github.com/JuliaLang","followers_url":"https://api.github.com/users/JuliaLang/followers","following_url":"https://api.github.com/users/JuliaLang/following{/other_user}","gists_url":"https://api.github.com/users/JuliaLang/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaLang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaLang/subscriptions","organizations_url":"https://api.github.com/users/JuliaLang/orgs","repos_url":"https://api.github.com/users/JuliaLang/repos","events_url":"https://api.github.com/users/JuliaLang/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaLang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaLang/julia","description":"The Julia Language: A fresh approach to technical computing.","fork":false,"url":"https://api.github.com/repos/JuliaLang/julia","forks_url":"https://api.github.com/repos/JuliaLang/julia/forks","keys_url":"https://api.github.com/repos/JuliaLang/julia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaLang/julia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaLang/julia/teams","hooks_url":"https://api.github.com/repos/JuliaLang/julia/hooks","issue_events_url":"https://api.github.com/repos/JuliaLang/julia/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaLang/julia/events","assignees_url":"https://api.github.com/repos/JuliaLang/julia/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaLang/julia/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaLang/julia/tags","blobs_url":"https://api.github.com/repos/JuliaLang/julia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaLang/julia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaLang/julia/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaLang/julia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaLang/julia/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaLang/julia/languages","stargazers_url":"https://api.github.com/repos/JuliaLang/julia/stargazers","contributors_url":"https://api.github.com/repos/JuliaLang/julia/contributors","subscribers_url":"https://api.github.com/repos/JuliaLang/julia/subscribers","subscription_url":"https://api.github.com/repos/JuliaLang/julia/subscription","commits_url":"https://api.github.com/repos/JuliaLang/julia/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaLang/julia/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaLang/julia/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaLang/julia/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaLang/julia/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaLang/julia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaLang/julia/merges","archive_url":"https://api.github.com/repos/JuliaLang/julia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaLang/julia/downloads","issues_url":"https://api.github.com/repos/JuliaLang/julia/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaLang/julia/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaLang/julia/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaLang/julia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaLang/julia/labels{/name}","releases_url":"https://api.github.com/repos/JuliaLang/julia/releases{/id}","created_at":"2011-04-21T07:01:50Z","updated_at":"2015-04-19T09:03:29Z","pushed_at":"2015-04-19T11:31:29Z","git_url":"git://github.com/JuliaLang/julia.git","ssh_url":"git@github.com:JuliaLang/julia.git","clone_url":"https://github.com/JuliaLang/julia.git","svn_url":"https://github.com/JuliaLang/julia","homepage":"http://julialang.org/","size":191852,"stargazers_count":5380,"watchers_count":5380,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1134,"mirror_url":null,"open_issues_count":1238,"forks":1134,"open_issues":1238,"watchers":5380,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/10893"},"html":{"href":"https://github.com/JuliaLang/julia/pull/10893"},"issue":{"href":"https://api.github.com/repos/JuliaLang/julia/issues/10893"},"comments":{"href":"https://api.github.com/repos/JuliaLang/julia/issues/10893/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/10893/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/10893/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaLang/julia/statuses/e3302bf2cb1a63f1e702dac75b30db87921725cf"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":112,"deletions":0,"changed_files":4}}