Merging path and url for resources
See original GitHub issueAt the moment we have path
and url
. I originally had this to make it super easy for tool implementors (no lists of web protocols to match against `http://, https://, ftp://, etc).
At the same time it adds cognitive complexity to the spec and for publishers and confusion about whether one could use both #223 #232
The approach would be probably going forward just to have path
and define like:
the location of the resource specified either as a fully qualified url or a unix-style path.
Data Packages may be found online or locally on disk and path should be interpreted
relative to that context (on disk it is a file path, online it is a url path).
If a relative path is used it is interpreted relative to the base directory for the data
package (the parent directory of the datapackage.json).
Examples:
http://ex.datapackages.org/big-csv/my-big.csv
/examples/my-csv.csv # absolute path
examples/my-csv.csv # relative path
Issue Analytics
- State:
- Created 8 years ago
- Comments:37 (33 by maintainers)
Top Results From Across the Web
c# - Path.Combine for URLs?
42 Answers 42 ; /// Basically a Path.Combine for URLs. Ensures exactly one '/' separates each segment, /// and exactly on '&' separates...
Read more >Merging Path
Merge - Focus on forward action & merge the path from where we are to where we want to be. Motivationally Listen -...
Read more >Path.Combine Method (System.IO)
This method is intended to concatenate individual strings into a single string that represents a file path. However, if an argument other than...
Read more >Getting started with merge requests - GitLab Documentation
When working in a Git-based platform, you can use branching strategies to collaborate on code. A repository is composed by its default branch,...
Read more >Add app resources
Android Studio helps you add new resources and alternative resources in ... Add a resource directory; Change your resource directory; Resource merging.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@rgrp do you have a PR in the wings for this? I think the wording for the spec should be quite straight forward. I think we should also have a set of clear examples alongside that that addresses some of the above points.
Again here, I think in the various places this has been discussed, there is general agreement that it simplifies the prep of a data package for a publisher, and reduces ambiguity in multiple properties that do essentially the same thing, at the relatively small cost of implementing code needing to handle the file pointer disambiguation (fs vs http).
Any comments from the @frictionlessdata/specs-working-group before we start the PR process?
So @rgrp I’m in agreement with your points:
Additionally,
cache
should be implemented, and follow the same rules. (worth mentioning here for the possibility that users were relying on presence of bothurl
andpath
to keep local copies of remote resources.)@roll @amercader @akariv @vitorbaptista you are all writing code around this in various places. What do you think?