salesforce / runway-browser

Interactive visualization framework for Runway models of distributed systems
https://runway.systems
MIT License
188 stars 31 forks source link

Can't run a model not at the root of a repo #9

Open dgryski opened 8 years ago

dgryski commented 8 years ago

My model checking playground is github.com/dgryski/modelchecking. I have a simulation at github.com/dgryski/modelchecking/runway/river that I can't figure out the URL structure to be able to view it on runway.systems.

(I exported it to its own repo so that http://runway.systems/?model=github.com/dgryski/runway-model-river works)

ongardie-sfdc commented 8 years ago

Seems like this URL works https://runway.systems/?model=github.com/dgryski/modelchecking/master/runway/river

This should be documented somewhere, of course.

And is there some de facto syntax for a Git repo easy to put in a URL, usually but not always GitHub, possibly at a particular branch/tag/sha1, possibly with a path within that repo? I made something up here, but it's probably not the right thing.

PS. I know you've left a few comments around. Please keep doing that :). Sorry I'm slow, but I'll get to the rest soon.

dgryski commented 8 years ago

Yes, that does work. I had tried a number of variations including urls with tree and blob. I think this is just a docs issue then.

There isn't a standard URL structure. runway-browser would need to know about the popular hosting providers (github, bitbucket, gitlab), plus some way to handle custom domains should be more than sufficient.

ongardie-sfdc commented 8 years ago

Maybe npm, godoc, sourcegraph, etc have come up with something sane?

/cc @sqs

sqs commented 8 years ago

Sourcegraph uses the Go remote import path spec to map from paths to (git URL, commit, subdir). It's not universal, and it has ambiguity, so it's not a solution. To be truly correct, I think you'd need to have people specify all of those elements separately, plus the VCS type (git/hg/etc.).

ongardie-sfdc commented 8 years ago

@sqs thanks for the pointer. I agree that this doesn't look ideal either. Hmm...